diff --git a/TEMUKJD/BLL/YkdHttpResponseBLL.cs b/TEMUKJD/BLL/YkdHttpResponseBLL.cs new file mode 100644 index 0000000..a1b902f --- /dev/null +++ b/TEMUKJD/BLL/YkdHttpResponseBLL.cs @@ -0,0 +1,142 @@ +using AllBase; +using AllBase.Model.Result; +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace TemuKJD.BLL +{ + public class YkdHttpResponseBLL + { + public static string YangkeduoPostResponse(BuyerLoginInfo buyer, string _url, string _data, string referer) + { + string cookies = ""; + try + { + var cookieLst = JsonHelper.DeserializeJsonToList(buyer?.cookie.ParseToString()); + if (cookieLst == null) + cookieLst = new List(); + foreach (var cook in cookieLst) + { + cookies += cook.Name + "=" + cook.Value + ";"; + } + } + catch { } + + HttpWebResponse response = null; + string result; + try + { + string url = _url; + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + + request.KeepAlive = true; + request.Headers.Add("sec-ch-ua-platform", @"""Windows"""); + request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"; + request.Accept = "application/json, text/plain, */*"; + request.Headers.Add("sec-ch-ua", @"""Not)A;Brand"";v=""8"", ""Chromium"";v=""138"""); + request.Headers.Add("sec-ch-ua-mobile", @"?0"); + request.Headers.Set(HttpRequestHeader.Cookie, cookies); + request.Headers.Add("Sec-Fetch-Site", @"same-origin"); + request.Headers.Add("Sec-Fetch-Mode", @"cors"); + request.Headers.Add("Sec-Fetch-Dest", @"empty"); + request.Referer = referer; + //request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate"); + request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9"); + + request.Method = "POST"; + request.ServicePoint.Expect100Continue = false; + + string body = _data; + byte[] postBytes = System.Text.Encoding.UTF8.GetBytes(body); + request.ContentLength = postBytes.Length; + Stream stream = request.GetRequestStream(); + stream.Write(postBytes, 0, postBytes.Length); + stream.Close(); + + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException ex) + { + if (ex.Status == WebExceptionStatus.ProtocolError) + { + response = (HttpWebResponse)ex.Response; + result = GetProxyHtml.ReadResponse(response); + return result; + } + else return ex.Message; + } + catch (Exception e) + { + if (response != null) response.Close(); + return e.Message; + } + result = GetProxyHtml.ReadResponse(response); + return result; + } + + public static string YangkeduoGetResponse(BuyerLoginInfo buyer, string _url, string referer = "") + { + string cookies = ""; + try + { + var cookieLst = JsonHelper.DeserializeJsonToList(buyer?.cookie.ParseToString()); + if (cookieLst == null) + cookieLst = new List(); + foreach (var cook in cookieLst) + { + cookies += cook.Name + "=" + cook.Value + ";"; + } + } + catch { } + + HttpWebResponse response = null; + string result; + try + { + string url = _url; + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + + request.KeepAlive = true; + request.Headers.Add("sec-ch-ua-platform", @"""Windows"""); + request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"; + request.Accept = "application/json, text/plain, */*"; + request.Headers.Add("sec-ch-ua", @"""Not)A;Brand"";v=""8"", ""Chromium"";v=""138"""); + request.Headers.Add("sec-ch-ua-mobile", @"?0"); + request.Headers.Set(HttpRequestHeader.Cookie, cookies); + request.Headers.Add("Sec-Fetch-Site", @"same-origin"); + request.Headers.Add("Sec-Fetch-Mode", @"cors"); + request.Headers.Add("Sec-Fetch-Dest", @"empty"); + //request.Referer = "https://mobile.yangkeduo.com/goods.html?goods_id=668777537796&_oak_rcto=YWKWG77VXtDidZlaaAew84Hjoi0WMIkr6Sb3iSrTsNPiwhxdCIE-1DEr&_oc_trace_mark=199&_oc_adinfo=eyJwYWdlX3NuIjoxMDAwMiwic2NlbmVfaWQiOjUwNn0%3D&_oak_gallery_token=49fa7eda1bcf57d32ea05e34565ca727&_oak_gallery=https%3A%2F%2Fimg.pddpic.com%2Fmms-material-img%2F2025-08-19%2F74364405-4d67-4d13-ad64-1712f70865db.jpeg.a.jpeg&_oc_refer_ad=1&page_from=35&thumb_url=https%3A%2F%2Fimg.pddpic.com%2Fmms-material-img%2F2025-08-19%2F74364405-4d67-4d13-ad64-1712f70865db.jpeg.a.jpeg%3FimageMogr2%2Fthumbnail%2F400x%257CimageView2%2F2%2Fw%2F400%2Fq%2F80%2Fformat%2Fwebp&refer_page_name=index&refer_page_id=10002_1775730536937_hocm3gfy6j&refer_page_sn=10002&uin=CFS2K7V47GEISCE6TLYY6HRWPI_GEXDA"; + request.Referer = referer; + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); + request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9"); + + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException ex) + { + if (ex.Status == WebExceptionStatus.ProtocolError) + { + response = (HttpWebResponse)ex.Response; + result = GetProxyHtml.ReadResponse(response); + return result; + } + else return ex.Message; + } + catch (Exception e) + { + if (response != null) response.Close(); + return e.Message; + } + result = GetProxyHtml.ReadResponse(response); + return result; + } + } +} diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 2d6d5ac..504c416 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -130,6 +130,7 @@ + @@ -154,6 +155,7 @@ PDDAddActivityForm.cs + Form @@ -195,6 +197,12 @@ ImgToolForm.cs + + Form + + + PddMobileLoginForm.cs + Form @@ -1157,11 +1165,11 @@ WxTalkForm.cs - + Form - - WxOrderListForm.cs + + BuyerOrderListForm.cs BaseTalkForm.cs @@ -1193,6 +1201,9 @@ ImgToolForm.cs + + PddMobileLoginForm.cs + WebForm.cs @@ -1645,8 +1656,8 @@ WxTalkForm.cs - - WxOrderListForm.cs + + BuyerOrderListForm.cs diff --git a/TEMUKJD/KJD.csproj.user b/TEMUKJD/KJD.csproj.user index cebb4cf..7a74901 100644 --- a/TEMUKJD/KJD.csproj.user +++ b/TEMUKJD/KJD.csproj.user @@ -1,7 +1,7 @@  - ProjectFiles + ShowAllFiles publish\ diff --git a/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.Designer.cs b/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.Designer.cs index 869f747..e3feb60 100644 --- a/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.Designer.cs @@ -32,16 +32,19 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.label5 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.txtSleepTime = new System.Windows.Forms.TextBox(); this.chk23456 = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chk23730 = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkDownNoPrice = new TemuKJD.UserComponent.UcCheckBox(this.components); @@ -103,6 +106,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.chk23513 = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chk15996 = new TemuKJD.UserComponent.UcCheckBox(this.components); this.txtTest20981 = new System.Windows.Forms.TextBox(); this.btnTest20981 = new DevComponents.DotNetBar.PanelEx(); @@ -185,6 +189,9 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms | System.Windows.Forms.AnchorStyles.Right))); this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx2.Controls.Add(this.label5); + this.ucGroupBoxEx2.Controls.Add(this.label3); + this.ucGroupBoxEx2.Controls.Add(this.txtSleepTime); this.ucGroupBoxEx2.Controls.Add(this.chk23456); this.ucGroupBoxEx2.Controls.Add(this.chk23730); this.ucGroupBoxEx2.Controls.Add(this.chkDownNoPrice); @@ -220,6 +227,38 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms this.ucGroupBoxEx2.TabStop = false; this.ucGroupBoxEx2.Text = "活动价格配置"; // + // label5 + // + this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(831, 18); + this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(20, 17); + this.label5.TabIndex = 893; + this.label5.Text = "秒"; + // + // label3 + // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(713, 18); + this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(80, 17); + this.label3.TabIndex = 892; + this.label3.Text = "报名休眠间隔"; + // + // txtSleepTime + // + this.txtSleepTime.Location = new System.Drawing.Point(793, 15); + this.txtSleepTime.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtSleepTime.Name = "txtSleepTime"; + this.txtSleepTime.Size = new System.Drawing.Size(38, 23); + this.txtSleepTime.TabIndex = 891; + this.txtSleepTime.Text = "5"; + this.txtSleepTime.TextChanged += new System.EventHandler(this.txtSleepTime_TextChanged); + // // chk23456 // this.chk23456.AutoSize = true; @@ -947,6 +986,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms // // splitContainer2.Panel2 // + this.splitContainer2.Panel2.Controls.Add(this.chk23513); this.splitContainer2.Panel2.Controls.Add(this.chk15996); this.splitContainer2.Panel2.Controls.Add(this.txtTest20981); this.splitContainer2.Panel2.Controls.Add(this.btnTest20981); @@ -974,19 +1014,19 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.dgvShop.AutoRowNumber = true; this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -1100,6 +1140,18 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms this.colMessage.Name = "colMessage"; this.colMessage.ReadOnly = true; // + // chk23513 + // + this.chk23513.AutoSize = true; + this.chk23513.Location = new System.Drawing.Point(234, 38); + this.chk23513.Name = "chk23513"; + this.chk23513.Size = new System.Drawing.Size(62, 21); + this.chk23513.TabIndex = 891; + this.chk23513.Text = "23513"; + this.chk23513.UseVisualStyleBackColor = true; + this.chk23513.Visible = false; + this.chk23513.CheckedChanged += new System.EventHandler(this.chkActivityDetail_CheckedChanged); + // // chk15996 // this.chk15996.AutoSize = true; @@ -1179,19 +1231,19 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms // this.dgvActProduct.AllowUserToAddRows = false; this.dgvActProduct.AllowUserToDeleteRows = false; - dataGridViewCellStyle11.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvActProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvActProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; this.dgvActProduct.AutoRowNumber = true; this.dgvActProduct.BackgroundColor = System.Drawing.Color.White; this.dgvActProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvActProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvActProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; this.dgvActProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvActProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheck, @@ -1240,8 +1292,8 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms // // colSupplierName // - dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle13; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5; this.colSupplierName.Frozen = true; this.colSupplierName.HeaderText = "店铺名称"; this.colSupplierName.Name = "colSupplierName"; @@ -1296,8 +1348,8 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms // // colProductName // - dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductName.DefaultCellStyle = dataGridViewCellStyle14; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle6; this.colProductName.HeaderText = "商品标题"; this.colProductName.Name = "colProductName"; this.colProductName.ReadOnly = true; @@ -1324,8 +1376,8 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms // // colUpdateTime // - dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colUpdateTime.DefaultCellStyle = dataGridViewCellStyle15; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colUpdateTime.DefaultCellStyle = dataGridViewCellStyle7; this.colUpdateTime.FillWeight = 80F; this.colUpdateTime.HeaderText = "上架时间"; this.colUpdateTime.Name = "colUpdateTime"; @@ -1341,8 +1393,8 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms // // colOpResult // - dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colOpResult.DefaultCellStyle = dataGridViewCellStyle16; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colOpResult.DefaultCellStyle = dataGridViewCellStyle8; this.colOpResult.HeaderText = "操作结果"; this.colOpResult.Name = "colOpResult"; this.colOpResult.ReadOnly = true; @@ -1580,5 +1632,9 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; private UserComponent.UcCheckBox chk23730; private UserComponent.UcCheckBox chk23456; + private UserComponent.UcCheckBox chk23513; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox txtSleepTime; } } \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs b/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs index ea3b6b3..7551ece 100644 --- a/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs +++ b/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs @@ -39,7 +39,6 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms public bool IsLoadComplate { get; set; } = false; bool isInit = false; - bool isChanceApi = true; bool isStepAddPrice = false; CheckBox chkSelectAll = null; Dictionary dicShopGetCount = new Dictionary(); @@ -116,10 +115,11 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms pddActivityRule = NaiBa.Util.Helper.ConfigHelper.LoadConfig("pdd_add_activity_rule"); if (pddActivityRule == null) pddActivityRule = new PddAddActivityRule(); - this.chk20981.Checked = pddActivityRule.sign20981; - this.chk15996.Checked = pddActivityRule.sign15996; - this.chk21365.Checked = pddActivityRule.sign21365; this.chk22347.Checked = pddActivityRule.sign22347; + this.chk20981.Checked = pddActivityRule.sign20981; + this.chk21365.Checked = pddActivityRule.sign21365; + this.chk15996.Checked = pddActivityRule.sign15996; + this.chk23513.Checked = pddActivityRule.sign23513; this.chk23730.Checked = pddActivityRule.sign23730; this.chk23456.Checked = pddActivityRule.sign23456; this.chkUseExtCodePrice.Checked = pddActivityRule.IsUseExtCodePrice; @@ -376,8 +376,8 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms /// /// /// - public string SignActivity(ShopLoginInfo shop, PDDProductUploadParam prodParam, bool sign22347 = true, bool sign20981 = true, bool sign21365 = true, bool sign15996 = true, - bool sign23730 = true, bool sign23456 = true) + public string SignActivity(ShopLoginInfo shop, PDDProductUploadParam prodParam, bool sign22347 = true, bool sign20981 = true, bool sign21365 = true, + bool sign15996 = true, bool sign23513 = true, bool sign23730 = true, bool sign23456 = true) { string activityErr = ""; @@ -405,6 +405,12 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms activityErr += SignActivity22347(shop, prodParam); } + // 23513 补贴多人团频道 需要设置营销电话,暂时作废 + if (1==2 && sign23513) + { + activityErr += SignActivity23513(shop, prodParam); + } + // 超级晚8 单件折扣 if (1 == 1 && sign23730) { @@ -436,10 +442,16 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms { string activityErr = ""; var activityRst2 = activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 21365, 27); + Thread.Sleep(Randomx.GetId(500, 1500)); + Thread.Sleep(Randomx.GetId(500, 1500)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); for (int i = 0; i < 5 && !activityRst2.Contains("\"success\":true"); i++) { - Thread.Sleep(Randomx.GetId(1000, 2000)); activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 21365, 27); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); } if (!activityRst2.Contains("\"success\":true")) { @@ -553,12 +565,14 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms string CheckActivity20981(ShopLoginInfo shop, PDDProductUploadParam prodParam) { string activityErr = ""; - Thread.Sleep(Randomx.GetId(500, 1500)); var activityRst1 = activity_goods_info(shop, prodParam.goods_id.ParseToString(), "20981"); + Thread.Sleep(Randomx.GetId(500, 1500)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); for (int i = 0; i < 5 && !activityRst1.Contains("\"success\":true"); i++) { - Thread.Sleep(Randomx.GetId(1000, 2000)); activityRst1 = activity_goods_info(shop, prodParam.goods_id.ParseToString(), "20981"); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); } if (!activityRst1.Contains("\"success\":true")) { @@ -619,12 +633,14 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms string SignActivity20981(ShopLoginInfo shop, PDDProductUploadParam prodParam) { string activityErr = ""; - Thread.Sleep(Randomx.GetId(500, 1500)); var activityRst1 = activity_goods_info(shop, prodParam.goods_id.ParseToString(), "20981"); + Thread.Sleep(Randomx.GetId(500, 1500)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); for (int i = 0; i < 5 && !activityRst1.Contains("\"success\":true"); i++) { - Thread.Sleep(Randomx.GetId(1000, 2000)); activityRst1 = activity_goods_info(shop, prodParam.goods_id.ParseToString(), "20981"); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); } if (!activityRst1.Contains("\"success\":true")) { @@ -731,6 +747,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms Thread.Sleep(Randomx.GetId(2000, 5000)); addActivityRst = add_activity_goods(shop, actSubmitParam, prodParam.goods_id.ParseToString(), 20981, 27); } + err_msg = BaseRegex.GetStringJson(ref addActivityRst, "error_msg"); if (!addActivityRst.Contains("\"success\":true") || !string.IsNullOrEmpty(err_msg)) { var error = BaseRegex.GetStringJson(ref addActivityRst, "error_msg"); @@ -758,8 +775,9 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms string SignActivity15996(ShopLoginInfo shop, PDDProductUploadParam prodParam) { string activityErr = ""; - Thread.Sleep(Randomx.GetId(500, 1500)); var activityRst3 = activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 15996, 18); + Thread.Sleep(Randomx.GetId(500, 1500)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); if (!activityRst3.Contains("\"success\":true")) { var error = BaseRegex.GetStringJson(ref activityRst3, "error_msg"); @@ -861,12 +879,17 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms string SignActivity22347(ShopLoginInfo shop, PDDProductUploadParam prodParam) { string activityErr = ""; - Thread.Sleep(Randomx.GetId(500, 1500)); var activityRst2 = activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 22347, 27); + Thread.Sleep(Randomx.GetId(500, 1500)); + Thread.Sleep(Randomx.GetId(500, 1500)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); if (!activityRst2.Contains("\"success\":true")) { - Thread.Sleep(Randomx.GetId(1000, 2000)); activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 22347, 27); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); } if (!activityRst2.Contains("\"success\":true")) { @@ -968,6 +991,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms Thread.Sleep(Randomx.GetId(2000, 5000)); addActivityRst = add_activity_goods(shop, actSubmitParam, prodParam.goods_id.ParseToString(), 22347, 27); } + err_msg = BaseRegex.GetStringJson(ref addActivityRst, "error_msg"); if (!addActivityRst.Contains("\"success\":true") || !string.IsNullOrEmpty(err_msg)) { var error = BaseRegex.GetStringJson(ref addActivityRst, "error_msg"); @@ -992,18 +1016,166 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms return activityErr; } + string SignActivity23513(ShopLoginInfo shop, PDDProductUploadParam prodParam) + { + string activityErr = ""; + var activityRst2 = activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 23513, 414); + Thread.Sleep(Randomx.GetId(500, 1500)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); + if (!activityRst2.Contains("\"success\":true")) + { + activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 23513, 414); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); + } + if (!activityRst2.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref activityRst2, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = activityRst2; + activityErr += "\r\n报名错误 513查询失败 " + error; + if (BaseClass.SaLevel != 1 && 1 != 1) + activityErr = "报名错误"; + //goto restoreSkuImg1; + return activityErr; + } + try + { + var jObj = JObject.Parse(activityRst2); + var jStr = JsonHelper.SerializeObject(jObj["result"]); + var pddActivitiPriceInfo = JsonHelper.DeserializeJsonToObject(jStr); + var pddActivitiPriceProd = pddActivitiPriceInfo.enroll_goods_rule_vos.FirstOrDefault(); + + if (pddActivitiPriceProd == null) + { + activityErr += "\r\n报名错误 513查询/新建失败 商品未提交成功或不满足参加活动条件"; + if (BaseClass.SaLevel != 1 && 1 != 1) + activityErr = "报名错误"; + //goto restoreSkuImg1; + return activityErr; + } + foreach (var activitySkuInfo in pddActivitiPriceProd.enroll_rule_param.enroll_goods_resource_price.sku_info_list) + { + //var sku = prodParam.skus.FirstOrDefault(s => s.sku_id == activitySku.sku_id); + var sku = prodParam.skus.FirstOrDefault(sk => string.Join(",", sk.spec.Select(s => s.spec_name)) == activitySkuInfo.spec_info_str); + if (sku == null || sku.multi_price > activitySkuInfo.require_price) + { + activityErr += "\r\n报名错误 513价格低于产品价 " + activitySkuInfo.require_price + " < " + sku.multi_price; + if (BaseClass.SaLevel != 1 && 1 != 1) + activityErr = "报名错误"; + //goto restoreSkuImg1; + return activityErr; + } + } + + PDDActivitySubmitParam actSubmitParam = new PDDActivitySubmitParam(); + actSubmitParam.activity_id = pddActivitiPriceInfo.activity_id; + actSubmitParam.enroll_source_ctx.enroll_type = 3; + actSubmitParam.enroll_source_ctx.scene_full_coverage = "mmsActBatchEnrollV1"; + actSubmitParam.enroll_source_ctx.source_type = null; + actSubmitParam.enroll_source_ctx.scene_type = null; + + var goods_vo_item = new goods_vo_param(); + goods_vo_item.goods_id = prodParam.goods_id; + var skuSamePrice = prodParam.skus.Max(s => s.multi_price); + foreach (var activitySkuInfo in pddActivitiPriceProd.enroll_rule_param.enroll_goods_resource_price.sku_info_list) + { + //var sku = prodParam.skus.FirstOrDefault(s => s.sku_id == activitySku.sku_id); + var sku = prodParam.skus.FirstOrDefault(sk => string.Join(",", sk.spec.Select(s => s.spec_name)) == activitySkuInfo.spec_info_str); + if (sku == null) + { + activityErr += "\r\n报名错误 513价格sku未找到"; + if (BaseClass.SaLevel != 1 && 1 != 1) + activityErr = "报名错误"; + //goto restoreSkuImg1; + return activityErr; + } + + create_sku_vo_param sku_vo_item = new create_sku_vo_param(); + sku_vo_item.sku_id = activitySkuInfo.sku_id; + sku_vo_item.sku_activity_price = sku.multi_price; //skuSamePrice; //sku.multi_price; //activitySku.suggest_price; + sku_vo_item.sku_front_ctx_vo = new sku_front_ctx_vo_param() + { + filling_sku_price = sku.multi_price, + gear_rule = activitySkuInfo.gear_rule, + require_price = sku.multi_price, + filling_sku_price_gear_rule = activitySkuInfo.filling_sku_price_gear_rule, + }; + + goods_vo_item.create_activity_price_vo.create_sku_vos.Add(sku_vo_item); + } + actSubmitParam.goods_volist.Add(goods_vo_item); + // 设置活动库存 + goods_vo_item.create_activity_price_vo.create_quantity_vo.goods_activity_quantity = + pddActivitiPriceInfo.enroll_goods_rule_vos.FirstOrDefault().enroll_rule_param.enroll_goods_resource_price.goods_on_sale_quantity; + // 活动列表图 + goods_vo_item.create_material_vo.create_goods_image_vo.raw_activity_image_url = prodParam.gallery.FirstOrDefault(g => g.type == 1).url; + actSubmitParam.create_protocol_vo.need_create_cost_template = true; + + //if (pddActivitiInfo.need_goods_activity_price == true) + actSubmitParam.goods_volist.FirstOrDefault().view_confirmed_goods_protocol_vo.confirm_hit_cut_price = true; + + var addActivityRst = add_activity_goods(shop, actSubmitParam, prodParam.goods_id.ParseToString(), 23513, 414); + var err_msg = BaseRegex.GetStringJson(ref addActivityRst, "error_msg"); + if (err_msg.ParseToString().Contains("报名该活动需要签署降价补差协议,立即前往链接签署")) + { + Invoke(new Action(() => + { + PDDShopLoginForm loginForm = new PDDShopLoginForm(shop); + loginForm.openType = EnumOpenType.manage; + loginForm.InitUrl = err_msg.Substring(err_msg.IndexOf("https://")); //"https://mms.pinduoduo.com/mallcenter/signProtocol/21"; + loginForm.ShowDialog(); + })); + addActivityRst = add_activity_goods(shop, actSubmitParam, prodParam.goods_id.ParseToString(), 23513, 414); + err_msg = BaseRegex.GetStringJson(ref addActivityRst, "error_msg"); + } + for (int i = 0; i < 3 && !addActivityRst.Contains("\"success\":true"); i++) + { + Thread.Sleep(Randomx.GetId(2000, 5000)); + addActivityRst = add_activity_goods(shop, actSubmitParam, prodParam.goods_id.ParseToString(), 23513, 414); + } + err_msg = BaseRegex.GetStringJson(ref addActivityRst, "error_msg"); + if (!addActivityRst.Contains("\"success\":true") || !string.IsNullOrEmpty(err_msg)) + { + var error = BaseRegex.GetStringJson(ref addActivityRst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = addActivityRst; + activityErr += "\r\n报名错误 513新建失败 " + error; + if (BaseClass.SaLevel != 1 && 1 != 1) + activityErr = "报名错误"; + //goto restoreSkuImg1; + return activityErr; + } + } // 活动1 + catch (Exception ex) + { + activityErr += "\r\n报名错误 513查询/新建失败 " + ex.Message; + if (BaseClass.SaLevel != 1 && 1 != 1) + activityErr = "报名错误"; + //goto restoreSkuImg1; + return activityErr; + } + activityErr = "\r\n513报名成功"; + return activityErr; + } + /// /// 超级晚8 单件折扣 /// string SignActivity23730(ShopLoginInfo shop, PDDProductUploadParam prodParam) { string activityErr = ""; - Thread.Sleep(Randomx.GetId(500, 1500)); var activityRst3 = activity_goods_price_rule3(shop, prodParam.goods_id.ParseToString(), 23730, 424); - if (!activityRst3.Contains("\"success\":true")) + Thread.Sleep(Randomx.GetId(500, 1500)); + Thread.Sleep(Randomx.GetId(500, 1500)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); + for (int i = 0; i < 5 && activityRst3.Contains("频繁"); i++) { - Thread.Sleep(Randomx.GetId(1000, 2000)); activity_goods_price_rule3(shop, prodParam.goods_id.ParseToString(), 23730, 424); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); } if (!activityRst3.Contains("\"success\":true")) { @@ -1037,7 +1209,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms if (mmsEnrollParamsInfo.max_discount_threshold.ParseToInt() < 98) { - activityErr += "\r\n放弃报名 730最大折扣 " + mmsEnrollParamsInfo.max_discount_threshold + " 折低于 98 折 "; + activityErr += "\r\n放弃报名 730 最大折扣 " + mmsEnrollParamsInfo.max_discount_threshold + " 折低于 98 折 "; if (BaseClass.SaLevel != 1 && 1 != 1) activityErr = "报名错误"; return activityErr; @@ -1086,7 +1258,8 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms Thread.Sleep(Randomx.GetId(2000, 5000)); addActivityRst = add_activity_goods(shop, actSubmitParamV2, prodParam.goods_id.ParseToString(), 23730, 424); } - if (!addActivityRst.Contains("\"success\":true")) + var err_msg = BaseRegex.GetStringJson(ref addActivityRst, "error_msg"); + if (!addActivityRst.Contains("\"success\":true") || !string.IsNullOrEmpty(err_msg)) { var error = BaseRegex.GetStringJson(ref addActivityRst, "error_msg"); if (string.IsNullOrEmpty(error)) @@ -1117,12 +1290,17 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms string SignActivity23456(ShopLoginInfo shop, PDDProductUploadParam prodParam) { string activityErr = ""; - Thread.Sleep(Randomx.GetId(500, 1500)); var activityRst3 = activity_goods_price_rule3(shop, prodParam.goods_id.ParseToString(), 23456, 422); - if (!activityRst3.Contains("\"success\":true")) + Thread.Sleep(Randomx.GetId(500, 1500)); + Thread.Sleep(Randomx.GetId(500, 1500)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); + for (int i = 1; i < 5 && activityRst3.Contains("频繁"); i++) { - Thread.Sleep(Randomx.GetId(1000, 2000)); activity_goods_price_rule3(shop, prodParam.goods_id.ParseToString(), 23456, 422); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep(Randomx.GetId(1000, 2000)); + Thread.Sleep((moreSleepTime * 1000).ParseToInt()); } if (!activityRst3.Contains("\"success\":true")) { @@ -1205,7 +1383,8 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms Thread.Sleep(Randomx.GetId(2000, 5000)); addActivityRst = add_activity_goods(shop, actSubmitParamV2, prodParam.goods_id.ParseToString(), 23456, 422); } - if (!addActivityRst.Contains("\"success\":true")) + var err_msg = BaseRegex.GetStringJson(ref addActivityRst, "error_msg"); + if (!addActivityRst.Contains("\"success\":true") || !string.IsNullOrEmpty(err_msg)) { var error = BaseRegex.GetStringJson(ref addActivityRst, "error_msg"); if (string.IsNullOrEmpty(error)) @@ -2155,10 +2334,11 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms // chkActivity.Checked = false; if (IsLoadComplate) { - pddActivityRule.sign20981 = chk20981.Checked; - pddActivityRule.sign15996 = chk15996.Checked; - pddActivityRule.sign21365 = chk21365.Checked; pddActivityRule.sign22347 = chk22347.Checked; + pddActivityRule.sign20981 = chk20981.Checked; + pddActivityRule.sign21365 = chk21365.Checked; + pddActivityRule.sign15996 = chk15996.Checked; + pddActivityRule.sign23513 = chk23513.Checked; pddActivityRule.sign23730 = chk23730.Checked; pddActivityRule.sign23456 = chk23456.Checked; NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_add_activity_rule", pddActivityRule); @@ -2301,6 +2481,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms try { prodInfo = JsonHelper.DeserializeJsonToObject(dbProd.product_json); + actProd.productInfo = prodInfo; } catch (Exception ex) { @@ -2482,6 +2663,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms PDDProductUploadParam prodParam = new PDDProductUploadParam(); prodParam.goods_id = actProd.goods_id; + prodParam.gallery = JsonHelper.DeserializeJsonToList(JsonHelper.SerializeObject(actProd.productInfo.detail.galleries)); // 生成正常加价的sku列表 int index = -1; @@ -2520,14 +2702,15 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms prodParam.skus.Add(skuParam); } - bool sign20981 = chk20981.Checked && chk20981.Visible; bool sign22347 = chk22347.Checked && chk22347.Visible; - bool sign15996 = chk15996.Checked && chk15996.Visible; + bool sign20981 = chk20981.Checked && chk20981.Visible; bool sign21365 = chk21365.Checked && chk21365.Visible; + bool sign15996 = chk15996.Checked && chk15996.Visible; + bool sign23513 = chk23513.Checked && chk23513.Visible; bool sign23730 = chk23730.Checked && chk23730.Visible; bool sign23456 = chk23456.Checked && chk23456.Visible; - if ((sign20981 || sign22347 || sign15996 || sign21365 || sign23730 || sign23456) == false) + if ((sign22347 || sign20981 || sign21365 || sign15996 || sign23513 || sign23730 || sign23456) == false) { Invoke(new Action(() => { @@ -2620,10 +2803,20 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms } } - string activityErr = SignActivity(shop, prodParam, sign22347, sign20981, sign21365, sign15996, sign23730, sign23456); + string activityRsts = SignActivity(shop, prodParam, sign22347, sign20981, sign21365, sign15996, sign23513, sign23730, sign23456); + var activityRstArr = activityRsts.Split(new string[] { "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries); + var actSuccessStr = ""; + var actFailStr = ""; + foreach (var actRst in activityRstArr) + { + if (actRst.Contains("报名成功")) + actSuccessStr += " " + actRst; + else + actFailStr += "\r\n" + actRst; + } Invoke(new Action(() => { - row.Cells["colOpResult"].Value = activityErr.Trim('\r', '\n'); + row.Cells["colOpResult"].Value = (actSuccessStr + actFailStr).Trim('\r', '\n', ' '); })); } catch (Exception ex) @@ -2730,6 +2923,14 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms } } } + + public decimal moreSleepTime = 5; + private void txtSleepTime_TextChanged(object sender, EventArgs e) + { + moreSleepTime = txtSleepTime.Text.Trim().ParseToDecimal(); + if (moreSleepTime < 5) + moreSleepTime = 5; + } } public class PddAddActivityRule @@ -2746,11 +2947,19 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms public bool IsUseExtCodePrice { get; set; } - public bool sign20981 { get; set; } public bool sign22347 { get; set; } - public bool sign15996 { get; set; } + public bool sign20981 { get; set; } public bool sign21365 { get; set; } + public bool sign15996 { get; set; } + public bool sign23513 { get; set; } + + /// + /// 折扣活动1 + /// public bool sign23730 { get; set; } + /// + /// 折扣活动2 + /// public bool sign23456 { get; set; } } } diff --git a/TEMUKJD/PDDForms/ProductForms/WXProdViolationManage.cs b/TEMUKJD/PDDForms/ProductForms/WXProdViolationManage.cs new file mode 100644 index 0000000..d2aa45b --- /dev/null +++ b/TEMUKJD/PDDForms/ProductForms/WXProdViolationManage.cs @@ -0,0 +1,172 @@ +using AllBase; +using AllBase.Helper; +using AllBase.Model.Result; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using TemuKJD.BLL; +using TemuKJD.WXForms.ProductForms; +using Work; + +namespace TemuKJD.PDDForms.ProductForms +{ + public class WXProdViolationManage + { + public static void GetShopProdViolation() + { + Task.Run(() => + { + if (!Directory.Exists("wxProdViolation")) + Directory.CreateDirectory("wxProdViolation"); + + while (true) + { + //break; + foreach (var shop in GlobalConfig.ShopLoginList) + { + if (shop.LoginStatus != "登录成功") + continue; + + Thread.Sleep(Randomx.GetId(500, 1500)); + + WXProdViolationGetInfo info = new WXProdViolationGetInfo() { shopId = shop.ShopId, updateDay = DateTime.Now.ToString("yyMMdd") }; + try + { + info = NaiBa.Util.Helper.ConfigHelper.LoadConfig("wxProdViolation\\" + shop.ShopId); + if (info == null) + info = new WXProdViolationGetInfo() { shopId = shop.ShopId, updateDay = DateTime.MinValue.ToString("yyMMdd") }; + + if (info.updateDay == DateTime.Now.ToString("yyMMdd")) + { + // 今日同步过,跳过 + continue; + } + + info.failReason = ""; + + var result = getShopiolationProd(shop); + Thread.Sleep(Randomx.GetId(1000, 2000)); + if (!result.Contains("\"code\":0")) + { + WXForms.ShopForms.WXShopListForm.CheckShopLogin(shop); + + info.failReason = "读取失败"; + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wxProdViolation\\" + shop.ShopId, info); + continue; + } + + JObject recordObj = JsonHelper.JObjectParse(result)["record"] as JObject; + JArray jArr = JsonHelper.JObjectParse(result)["record"]["items"] as JArray; + if (recordObj != null && jArr == null) + { + jArr = new JArray(); + } + foreach(var jObj in jArr) + { + string sVioInfo = JsonHelper.SerializeObject(jObj); + var punishUuid = BaseRegex.GetStringJson(ref sVioInfo, "punishUuid"); + var punishReason = BaseRegex.GetStringJson(ref sVioInfo, "punishReason"); + var productId = BaseRegex.GetStringJson(ref sVioInfo, "productId"); + var productDesc = BaseRegex.GetStringJson(ref sVioInfo, "productDesc"); + //相似同款低质商品 品牌资质问题 不当使用他人权利 + if (!punishReason.Contains("发布违禁信息") && !punishReason.Contains("材质夸大宣传") && + !punishReason.Contains("价格违规") && !punishReason.Contains("售假")) + continue; + if (!string.IsNullOrWhiteSpace(productDesc) && !string.IsNullOrWhiteSpace(productId)) + { + var url = BaseClass.BuildPDDObjString("product/mdy_violation_prod"); + var data = UserLogin.GetSignaturex(); + data += "&wx_safe_status=违规商品"; + data += "¬es=" + ("违规轮询-" + shop.ShopId + "-" + punishUuid + "-" + punishReason).Trim(); + data += "&product_name=" + productDesc; + var html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (!html.Contains("\"code\":200")) + { + info.failReason = "更新商品状态失败"; + break; + } + + if(html.Contains("商品不存在")) + { + var getProdRst = WXUpload.searchProductWithTitle(shop, GetHtml.UrlEncodeUtf8(productDesc)); + var spuCode = BaseRegex.GetStringJson(ref getProdRst, "spuCode"); + var secrec_spu_id = ""; + var spu_id = ""; + if (string.IsNullOrEmpty(spuCode) || spuCode.Length < 10) + { + continue; + } + if (spuCode.StartsWith("EC1") && spuCode.EndsWith("A")) + { + spu_id = spuCode.Substring(3, spuCode.Length - 4); + } + else + { + secrec_spu_id = spuCode; + } + + url = BaseClass.BuildPDDObjString("product/mdy_violation_prod"); + data = UserLogin.GetSignaturex(); + data += "&wx_safe_status=违规商品"; + data += "¬es=" + ("违规轮询-" + shop.ShopId + "-" + punishUuid + "-" + punishReason).Trim(); + data += "&secret_spu_id=" + secrec_spu_id; + data += "&spu_id=" + spu_id; + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (!html.Contains("\"code\":200")) + { + info.failReason = "更新商品状态失败"; + break; + } + } + } + } + + if (string.IsNullOrEmpty(info.failReason)) + info.updateDay = DateTime.Now.ToString("yyMMdd"); + + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wxProdViolation\\" + shop.ShopId, info); + Thread.Sleep(5000); + } + catch (Exception ex) + { + try + { + if (info == null) + info = new WXProdViolationGetInfo() { shopId = shop.ShopId, updateDay = DateTime.Now.ToString("yyMMdd") }; + info.failReason = ex.Message; + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wxProdViolation\\" + shop.ShopId, info); + } + catch { } + } + } + // 休眠一小时 + Thread.Sleep(1000 * 60 * 60); + } + }); + } + + public static string getShopiolationProd(ShopLoginInfo shop) + { + string url = "https://store.weixin.qq.com/shop-faas/mmecnodeviolationsec/violation/cgi/get?token=&lang=zh_CN&violationType=finder&shopId="; + string referer = "https://store.weixin.qq.com/shop/violation/home"; + var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer); + return result; + } + } + + public class WXProdViolationGetInfo + { + public string shopId { get; set; } + public string updateDay { get; set; } // yyMMdd + public string failReason { get; set; } // "", "掉线"... + } +} diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs index 19328e4..7bc9875 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs @@ -30,13 +30,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle46 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle47 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle48 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle49 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.chkChance = new TemuKJD.UserComponent.UcCheckBox(this.components); @@ -109,7 +110,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.txtIdFilter = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.cmbCateFilter1 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); - this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); + this.btnRandomAdd = new DevComponents.DotNetBar.PanelEx(); this.label2 = new System.Windows.Forms.Label(); this.cmbGroupFilter = new System.Windows.Forms.ComboBox(); this.label20 = new System.Windows.Forms.Label(); @@ -1041,7 +1042,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.ucGroupBoxEx4.Controls.Add(this.txtIdFilter); this.ucGroupBoxEx4.Controls.Add(this.label1); this.ucGroupBoxEx4.Controls.Add(this.cmbCateFilter1); - this.ucGroupBoxEx4.Controls.Add(this.panelEx2); + this.ucGroupBoxEx4.Controls.Add(this.btnRandomAdd); this.ucGroupBoxEx4.Controls.Add(this.label2); this.ucGroupBoxEx4.Controls.Add(this.cmbGroupFilter); this.ucGroupBoxEx4.Controls.Add(this.label20); @@ -1253,30 +1254,30 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.cmbCateFilter1.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter1_SelectedIndexChanged); this.cmbCateFilter1.TextChanged += new System.EventHandler(this.cmbCateFilter1_TextChanged); // - // panelEx2 + // btnRandomAdd // - this.panelEx2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - 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(274, 105); - this.panelEx2.Name = "panelEx2"; - this.panelEx2.Size = new System.Drawing.Size(62, 23); - this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx2.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.panelEx2.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.panelEx2.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.panelEx2.Style.ForeColor.Color = System.Drawing.Color.White; - this.panelEx2.Style.GradientAngle = 90; - this.panelEx2.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx2.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.panelEx2.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.panelEx2.TabIndex = 431; - this.panelEx2.Text = "随机添加"; - this.panelEx2.Click += new System.EventHandler(this.btnRandomAdd_Click); + this.btnRandomAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnRandomAdd.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnRandomAdd.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnRandomAdd.DisabledBackColor = System.Drawing.Color.Empty; + this.btnRandomAdd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnRandomAdd.Location = new System.Drawing.Point(274, 105); + this.btnRandomAdd.Name = "btnRandomAdd"; + this.btnRandomAdd.Size = new System.Drawing.Size(62, 23); + this.btnRandomAdd.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnRandomAdd.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRandomAdd.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRandomAdd.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnRandomAdd.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnRandomAdd.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnRandomAdd.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnRandomAdd.Style.GradientAngle = 90; + this.btnRandomAdd.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnRandomAdd.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRandomAdd.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRandomAdd.TabIndex = 431; + this.btnRandomAdd.Text = "随机添加"; + this.btnRandomAdd.Click += new System.EventHandler(this.btnRandomAdd_Click); // // label2 // @@ -1597,19 +1598,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle43.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle43; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.dgvShop.AutoRowNumber = true; this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle44.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle44.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle44.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle44.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle44.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle44.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle44.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle44; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -1835,19 +1836,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.dgvSelectProduct.AllowUserToAddRows = false; this.dgvSelectProduct.AllowUserToDeleteRows = false; - dataGridViewCellStyle45.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle45; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; this.dgvSelectProduct.AutoRowNumber = true; this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White; this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle46.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle46.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle46.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle46.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle46.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle46.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle46.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle46; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheck, @@ -1909,8 +1910,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colSupplierName // - dataGridViewCellStyle47.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle47; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5; this.colSupplierName.Frozen = true; this.colSupplierName.HeaderText = "店铺名称"; this.colSupplierName.Name = "colSupplierName"; @@ -1988,8 +1989,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colProductName // - dataGridViewCellStyle48.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductName.DefaultCellStyle = dataGridViewCellStyle48; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle6; this.colProductName.HeaderText = "商品标题"; this.colProductName.Name = "colProductName"; this.colProductName.ReadOnly = true; @@ -2049,8 +2050,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colAddTime // - dataGridViewCellStyle49.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colAddTime.DefaultCellStyle = dataGridViewCellStyle49; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colAddTime.DefaultCellStyle = dataGridViewCellStyle7; this.colAddTime.FillWeight = 80F; this.colAddTime.HeaderText = "上传时间"; this.colAddTime.Name = "colAddTime"; @@ -2058,6 +2059,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colOpResult // + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colOpResult.DefaultCellStyle = dataGridViewCellStyle8; this.colOpResult.HeaderText = "操作结果"; this.colOpResult.Name = "colOpResult"; this.colOpResult.ReadOnly = true; @@ -2229,7 +2232,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms private System.Windows.Forms.Label label4; private DevComponents.DotNetBar.PanelEx btnStop; private UserComponent.UcCheckBox chkChance; - private DevComponents.DotNetBar.PanelEx panelEx2; + private DevComponents.DotNetBar.PanelEx btnRandomAdd; private System.Windows.Forms.TextBox txtAddCount; private System.Windows.Forms.Label lblGoodsCount; private DevComponents.DotNetBar.PanelEx btnClearUpload; @@ -2293,28 +2296,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms private UserComponent.UcCheckBox chkSkipQualification; private DevComponents.DotNetBar.PanelEx btnApiUpload; private DevComponents.DotNetBar.PanelEx btnRefreshApi; - private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; - private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId; - private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; - private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName; - private System.Windows.Forms.DataGridViewLinkColumn colLogin; - private System.Windows.Forms.DataGridViewLinkColumn colInShop; - private System.Windows.Forms.DataGridViewLinkColumn colSpuId; - private System.Windows.Forms.DataGridViewLinkColumn colSkcId; - private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl; - private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic; - private System.Windows.Forms.DataGridViewTextBoxColumn colSkuFakeImgUrl; - private System.Windows.Forms.DataGridViewImageColumn colSkuFakeImg; - private System.Windows.Forms.DataGridViewTextBoxColumn colProductName; - private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat; - private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode; - private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; - private System.Windows.Forms.DataGridViewTextBoxColumn colDraftId; - private System.Windows.Forms.DataGridViewTextBoxColumn colNotes; - private System.Windows.Forms.DataGridViewLinkColumn colUserNotes; - private System.Windows.Forms.DataGridViewLinkColumn ColDelete; - private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime; - private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; private System.Windows.Forms.TextBox txtAddShippingFeeTimes; private System.Windows.Forms.Label label12; private System.Windows.Forms.PictureBox pbShopLoading; @@ -2349,5 +2330,27 @@ namespace TemuKJD.PDDForms.ProductSelectForms private UserComponent.UcComboBoxMutiSelect cmbCateFilter1; private UserComponent.UcComboBoxMutiSelect cmbCateFilter3; private UserComponent.UcComboBoxMutiSelect cmbCateFilter2; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; + private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName; + private System.Windows.Forms.DataGridViewLinkColumn colLogin; + private System.Windows.Forms.DataGridViewLinkColumn colInShop; + private System.Windows.Forms.DataGridViewLinkColumn colSpuId; + private System.Windows.Forms.DataGridViewLinkColumn colSkcId; + private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic; + private System.Windows.Forms.DataGridViewTextBoxColumn colSkuFakeImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colSkuFakeImg; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductName; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat; + private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode; + private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; + private System.Windows.Forms.DataGridViewTextBoxColumn colDraftId; + private System.Windows.Forms.DataGridViewTextBoxColumn colNotes; + private System.Windows.Forms.DataGridViewLinkColumn colUserNotes; + private System.Windows.Forms.DataGridViewLinkColumn ColDelete; + private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime; + private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; } } \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs index f665c31..275ab76 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs @@ -46,7 +46,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms "跑步鞋", "棉鞋", "高帮休闲鞋", "网面鞋", "勃肯鞋/软木鞋", "包头拖", "足部磨砂", "老爹鞋", "工装鞋", "豆豆鞋", "汉服鞋", "雨鞋" }; public CancellationTokenSource cancellationTokenSource { get; set; } = null; - public CancellationTokenSource cancelAddProd { get; set; } = null; + public CancellationTokenSource getProdTokenSource { get; set; } = null; public bool IsLoadComplate { get; set; } = false; bool isInit = false; @@ -5912,38 +5912,66 @@ Content-Type: image/jpeg private void btnRandomAdd_Click(object sender, EventArgs e) { - int addCount = txtAddCount.Text.Trim().ParseToInt(); - pictureBox1.Visible = true; - if (cancelAddProd != null) - cancelAddProd.Cancel(); - cancelAddProd = new CancellationTokenSource(); + btnRandomAdd.Enabled = false; Task.Run(() => { - int prodCount = 0; - List list = new List(); + Thread.Sleep(5000); + Invoke(new Action(() => + { + btnRandomAdd.Enabled = true; + })); + }); + + pictureBox1.Visible = true; + int addCount = txtAddCount.Text.Trim().ParseToInt(); + if (getProdTokenSource != null) + getProdTokenSource.Cancel(); + getProdTokenSource = new CancellationTokenSource(); + Task.Run(() => + { + List prodLst = new List(); + int index = 0; + int pageSize = 50; + int prodCount = 99999999; while (addCount > 0) { - if (cancelAddProd.IsCancellationRequested) + if (getProdTokenSource.IsCancellationRequested) break; - // 等于50说明还有更多,不足50就不用再查了 - if (list.Count == 0 || list.Count == 50) + + index++; + // 如果产品数量在0到50之间,说明数据库商品数量不足,无需再重复筛选,直接随机打乱 + if (prodLst.Count == 0 || prodCount > pageSize) { - list = GetRandomProductList(out prodCount, 1, 50); - Thread.Sleep(Randomx.GetId(50,100)); + if (prodCount != 99999999) + { + //不重复筛选 + prodLst = GetRandomProductList(out prodCount, 1, Math.Min(pageSize, addCount), true, prodCount); + } + else + { + prodLst = GetRandomProductList(out prodCount, 1, Math.Min(pageSize, addCount)); + } + //Thread.Sleep(Randomx.GetId(50, 100)); + Thread.Sleep(Randomx.GetId(250, 500)); + } + else + { + prodLst = prodLst.OrderBy(x => Guid.NewGuid()).ToList(); + Thread.Sleep(Randomx.GetId(10, 30)); } - if (list.Count == 0) // 等于0要么库里没数据要么出错了,跳出 - break; Invoke(new Action(() => { lblGoodsCount.Text = "产品库 " + prodCount + " 件"; })); - foreach (var prod in list) + if (prodLst.Count == 0) // 等于0要么库里没数据要么出错了,跳出 + break; + foreach (var prod in prodLst) { var selectProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(prod)); selectProd.out_product_Id = prod.id.ToString(); selectProd.id = 1; if (lstTemuDBProductSelect.Count > 0) - selectProd.id = lstTemuDBProductSelect.Max(p => p.id).ParseToInt() + 1; + selectProd.id = lstTemuDBProductSelect.Max(p => p.id) + 1; this.lstTemuDBProductSelect.Add(selectProd); Invoke(new Action(() => @@ -5957,10 +5985,10 @@ Content-Type: image/jpeg NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", this.lstTemuDBProductSelect); } Invoke(new Action(() => { pictureBox1.Visible = false; })); - }, cancelAddProd.Token); + }, getProdTokenSource.Token); } - public List GetRandomProductList(out int totalCount, int page = 1, int pageSize = 50) + public List GetRandomProductList(out int totalCount, int page = 1, int pageSize = 50, bool isNotCount = false, int totalProdCount = 0) { var lstShopId = dgvShop.Rows.Cast().Where(row => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); @@ -5980,36 +6008,32 @@ Content-Type: image/jpeg data += "&in_spu_ids=" + txtIdFilter.Text; data += "&in_groups=" + cmbGroupFilter.Text; - var selectCate1 = GlobalConfig.WxCatList.Where(c => c.level == 1 && (";" + cmbCateFilter1.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); - var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList(); - var selectCate2 = cates2.Where(c => c.level == 2 && (";" + cmbCateFilter2.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); - var cates3 = GlobalConfig.WxCatList.Where(c => selectCate2.Any(c2 => c.f_cat_id == c2.cat_id)).ToList(); - var selectCate3 = cates3.Where(c => c.level == 3 && (";" + cmbCateFilter3.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店") { data += "&in_cates=" + (cmbCateFilter1.Text == "全部" ? "" : cmbCateFilter1.Text); } else { + var selectCate1 = GlobalConfig.WxCatList.Where(c => c.level == 1 && (";" + cmbCateFilter1.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList(); + var selectCate2 = cates2.Where(c => c.level == 2 && (";" + cmbCateFilter2.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates3 = GlobalConfig.WxCatList.Where(c => selectCate2.Any(c2 => c.f_cat_id == c2.cat_id)).ToList(); + var selectCate3 = cates3.Where(c => c.level == 3 && (";" + cmbCateFilter3.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + + if (selectCate1?.Count == 0 && chkSkipQualification.Checked) + { + // 厂商直采普通店铺不要随特殊商品 + data += "&wx_cat_1=" + string.Join(",", GlobalConfig.WxCatList.Where(c => c.level == 1 && !(c.name == "图书" || c.name == "食品饮料" || c.name == "成人用品")) + .Select(c => c.cat_id)); + } + if (!string.IsNullOrEmpty(cmbCateFilter1.Text) && selectCate1?.Count > 0) data += "&wx_cat_1=" + string.Join(",", selectCate1.Select(c => c.cat_id).ToList()); - //else if (chkSkipQualification.Checked) - //{ - // // 厂商直采普通店铺不要随特殊商品 - // data += "&wx_cat_1=" + string.Join(",", GlobalConfig.WxCatList.Where(c => c.level == 1 && !(c.name == "图书" || c.name == "食品饮料" || c.name == "成人用品")) - // .Select(c => c.cat_id)); - //} if (!string.IsNullOrEmpty(cmbCateFilter2.Text) && selectCate2?.Count > 0) data += "&wx_cat_2=" + string.Join(",", selectCate2.Select(c => c.cat_id).ToList()); if (!string.IsNullOrEmpty(cmbCateFilter3.Text) && selectCate3?.Count > 0) data += "&wx_cat_3=" + string.Join(",", selectCate3.Select(c => c.cat_id).ToList()); } - if (selectCate1.Count == 0 && cmbSourceType.Text == "厂商直采" && chkSkipQualification.Checked) - { - // 厂商直采普通店铺不要随特殊商品 - data += "&wx_cat_1=" + string.Join(",", GlobalConfig.WxCatList.Where(c => c.level == 1 && !(c.name == "图书" || c.name == "食品饮料" || c.name == "成人用品")) - .Select(c => c.cat_id)); - } data += "&product_get_type=" + cmbSourceType.Text.Trim(); if (cmbSourceType.Text.Trim() == "厂商直采") @@ -6438,8 +6462,8 @@ Content-Type: image/jpeg private void pictureBox1_Click(object sender, EventArgs e) { - if (cancelAddProd != null) - cancelAddProd.Cancel(); + if (getProdTokenSource != null) + getProdTokenSource.Cancel(); } private void btnTest20981_Click(object sender, EventArgs e) diff --git a/TEMUKJD/StartUp.cs b/TEMUKJD/StartUp.cs index e769b6b..2373c07 100644 --- a/TEMUKJD/StartUp.cs +++ b/TEMUKJD/StartUp.cs @@ -23,6 +23,7 @@ using AllBase.Model.Param.TemuProductManage; using TemuKJD.KJDForms.ShopForms; using TemuKJD.KJDForms.AdminForms; using TemuKJD.BLL.PddApi; +using TemuKJD.PDDForms.ProductForms; namespace TemuKJD { @@ -182,7 +183,24 @@ namespace TemuKJD } } }); -#endregion + #endregion + + #region Pdd读取违规商品信息 + + Task.Run(() => + { + while (!IsShopInit) + { + Thread.Sleep(1000); + } + + if (BaseClass.MainPath != "weixin") // 跨境达才读取库存 + return; + + WXProdViolationManage.GetShopProdViolation(); + }); + + #endregion } public static void InitProxy() diff --git a/TEMUKJD/ToolForms/PddMobileLoginForm.Designer.cs b/TEMUKJD/ToolForms/PddMobileLoginForm.Designer.cs new file mode 100644 index 0000000..29fd348 --- /dev/null +++ b/TEMUKJD/ToolForms/PddMobileLoginForm.Designer.cs @@ -0,0 +1,320 @@ +namespace TemuKJD.ToolForms +{ + partial class PddMobileLoginForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PddMobileLoginForm)); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx(); + this.label2 = new System.Windows.Forms.Label(); + this.btnCopyPassword = new TemuKJD.UserControls.ButtonEx(); + this.btnCopyUserName = new TemuKJD.UserControls.ButtonEx(); + this.txtPassWord = new System.Windows.Forms.TextBox(); + this.txtUserName = new System.Windows.Forms.TextBox(); + this.btnStop = new TemuKJD.UserControls.ButtonEx(); + this.btnReload = new TemuKJD.UserControls.ButtonEx(); + this.chkCloseAfterLogin = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.txtAddress = new System.Windows.Forms.TextBox(); + this.panel2 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White; + this.splitContainer1.Panel2.Controls.Add(this.label3); + this.splitContainer1.Panel2.Controls.Add(this.panel2); + this.splitContainer1.Panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.splitContainer1_Panel2_Paint); + this.splitContainer1.Size = new System.Drawing.Size(1022, 704); + this.splitContainer1.SplitterDistance = 484; + this.splitContainer1.SplitterWidth = 3; + this.splitContainer1.TabIndex = 4; + // + // btnLoginAgain + // + this.btnLoginAgain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnLoginAgain.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnLoginAgain.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnLoginAgain.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnLoginAgain.ForeColor = System.Drawing.Color.White; + this.btnLoginAgain.Location = new System.Drawing.Point(56, 163); + this.btnLoginAgain.Margin = new System.Windows.Forms.Padding(2); + this.btnLoginAgain.Name = "btnLoginAgain"; + this.btnLoginAgain.Size = new System.Drawing.Size(91, 25); + this.btnLoginAgain.TabIndex = 462; + this.btnLoginAgain.Text = "重新登录"; + this.btnLoginAgain.UseVisualStyleBackColor = false; + this.btnLoginAgain.Click += new System.EventHandler(this.btnLoginAgain_Click); + // + // label2 + // + this.label2.Location = new System.Drawing.Point(73, 67); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(44, 17); + this.label2.TabIndex = 378; + this.label2.Text = "密码"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // btnCopyPassword + // + this.btnCopyPassword.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCopyPassword.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnCopyPassword.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCopyPassword.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCopyPassword.ForeColor = System.Drawing.Color.White; + this.btnCopyPassword.Location = new System.Drawing.Point(255, 63); + this.btnCopyPassword.Margin = new System.Windows.Forms.Padding(2); + this.btnCopyPassword.Name = "btnCopyPassword"; + this.btnCopyPassword.Size = new System.Drawing.Size(57, 25); + this.btnCopyPassword.TabIndex = 376; + this.btnCopyPassword.Text = "复制"; + this.btnCopyPassword.UseVisualStyleBackColor = false; + this.btnCopyPassword.Click += new System.EventHandler(this.btnCopyPassword_Click); + // + // btnCopyUserName + // + this.btnCopyUserName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCopyUserName.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnCopyUserName.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCopyUserName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCopyUserName.ForeColor = System.Drawing.Color.White; + this.btnCopyUserName.Location = new System.Drawing.Point(255, 36); + this.btnCopyUserName.Margin = new System.Windows.Forms.Padding(2); + this.btnCopyUserName.Name = "btnCopyUserName"; + this.btnCopyUserName.Size = new System.Drawing.Size(57, 25); + this.btnCopyUserName.TabIndex = 375; + this.btnCopyUserName.Text = "复制"; + this.btnCopyUserName.UseVisualStyleBackColor = false; + this.btnCopyUserName.Click += new System.EventHandler(this.btnCopyUserName_Click); + // + // txtPassWord + // + this.txtPassWord.Location = new System.Drawing.Point(117, 64); + this.txtPassWord.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txtPassWord.Name = "txtPassWord"; + this.txtPassWord.PasswordChar = '●'; + this.txtPassWord.ReadOnly = true; + this.txtPassWord.Size = new System.Drawing.Size(135, 23); + this.txtPassWord.TabIndex = 374; + // + // txtUserName + // + this.txtUserName.Location = new System.Drawing.Point(117, 37); + this.txtUserName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txtUserName.Name = "txtUserName"; + this.txtUserName.ReadOnly = true; + this.txtUserName.Size = new System.Drawing.Size(135, 23); + this.txtUserName.TabIndex = 373; + // + // btnStop + // + this.btnStop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnStop.ForeColor = System.Drawing.Color.White; + this.btnStop.Location = new System.Drawing.Point(243, 163); + this.btnStop.Margin = new System.Windows.Forms.Padding(2); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(91, 25); + this.btnStop.TabIndex = 372; + this.btnStop.Text = "停止操作"; + this.btnStop.UseVisualStyleBackColor = false; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // + // btnReload + // + this.btnReload.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnReload.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnReload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnReload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnReload.ForeColor = System.Drawing.Color.White; + this.btnReload.Location = new System.Drawing.Point(150, 163); + this.btnReload.Margin = new System.Windows.Forms.Padding(2); + this.btnReload.Name = "btnReload"; + this.btnReload.Size = new System.Drawing.Size(91, 25); + this.btnReload.TabIndex = 371; + this.btnReload.Text = "重新加载"; + this.btnReload.UseVisualStyleBackColor = false; + this.btnReload.Click += new System.EventHandler(this.btnReload_Click); + // + // chkCloseAfterLogin + // + // + // + // + this.chkCloseAfterLogin.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.chkCloseAfterLogin.Checked = true; + this.chkCloseAfterLogin.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkCloseAfterLogin.CheckValue = "Y"; + this.chkCloseAfterLogin.Location = new System.Drawing.Point(207, 138); + this.chkCloseAfterLogin.Name = "chkCloseAfterLogin"; + this.chkCloseAfterLogin.Size = new System.Drawing.Size(135, 23); + this.chkCloseAfterLogin.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.chkCloseAfterLogin.TabIndex = 8; + this.chkCloseAfterLogin.Text = "登录成功后关闭窗口"; + // + // splitContainer2 + // + this.splitContainer2.BackColor = System.Drawing.Color.White; + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer2.Location = new System.Drawing.Point(1, 33); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.txtAddress); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.splitContainer1); + this.splitContainer2.Size = new System.Drawing.Size(1022, 734); + this.splitContainer2.SplitterDistance = 26; + this.splitContainer2.TabIndex = 5; + // + // txtAddress + // + this.txtAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtAddress.Location = new System.Drawing.Point(3, 3); + this.txtAddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txtAddress.Name = "txtAddress"; + this.txtAddress.Size = new System.Drawing.Size(1016, 23); + this.txtAddress.TabIndex = 7; + this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown); + // + // panel2 + // + this.panel2.Anchor = System.Windows.Forms.AnchorStyles.None; + this.panel2.Controls.Add(this.txtUserName); + this.panel2.Controls.Add(this.btnLoginAgain); + this.panel2.Controls.Add(this.chkCloseAfterLogin); + this.panel2.Controls.Add(this.label2); + this.panel2.Controls.Add(this.btnReload); + this.panel2.Controls.Add(this.label1); + this.panel2.Controls.Add(this.btnStop); + this.panel2.Controls.Add(this.btnCopyPassword); + this.panel2.Controls.Add(this.txtPassWord); + this.panel2.Controls.Add(this.btnCopyUserName); + this.panel2.Location = new System.Drawing.Point(79, 195); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(376, 257); + this.panel2.TabIndex = 463; + this.panel2.Visible = false; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(73, 40); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(44, 17); + this.label1.TabIndex = 377; + this.label1.Text = "用户名"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label3 + // + this.label3.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(128, 58); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(285, 28); + this.label3.TabIndex = 464; + this.label3.Text = "请使用拼多多手机版扫码登录"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.label3.Visible = false; + // + // PddMobileLoginForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(1024, 768); + this.Controls.Add(this.splitContainer2); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "PddMobileLoginForm"; + this.ShowMaximizeBox = true; + this.Text = "店铺登录"; + this.TitleText = "店铺登录"; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ShopLoginForm_FormClosed); + this.Load += new System.EventHandler(this.ShopLoginForm_Load); + this.Controls.SetChildIndex(this.splitContainer2, 0); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel1.PerformLayout(); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private UserControls.ButtonEx btnStop; + private UserControls.ButtonEx btnReload; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.TextBox txtAddress; + private UserControls.ButtonEx btnLoginAgain; + public DevComponents.DotNetBar.Controls.CheckBoxX chkCloseAfterLogin; + public System.Windows.Forms.TextBox txtPassWord; + public System.Windows.Forms.TextBox txtUserName; + public System.Windows.Forms.Label label2; + public UserControls.ButtonEx btnCopyPassword; + public UserControls.ButtonEx btnCopyUserName; + private System.Windows.Forms.Panel panel2; + public System.Windows.Forms.Label label3; + public System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/TEMUKJD/ToolForms/PddMobileLoginForm.cs b/TEMUKJD/ToolForms/PddMobileLoginForm.cs new file mode 100644 index 0000000..fc151f3 --- /dev/null +++ b/TEMUKJD/ToolForms/PddMobileLoginForm.cs @@ -0,0 +1,547 @@ +using AllBase; +using AllBase.Helper; +using AllBase.Model.Result; +using CefSharp; +using CefSharp.WinForms; +//using TemuKJD.DashBoardForms; +using TemuKJD.Helper; +using TemuKJD.BaseForms; +using Microsoft.Win32; +using NaiBa.CefHelper; +using NaiBa.CefHelper.Handler; +using NaiBa.Util.Extension; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +//using System.Web.Hosting; +using System.Windows.Forms; +using Work; +using Work.BLL.Tools; +using TemuKJD.BLL; +using AllBase.Model.Result.PDDResult; +using AllBase.Model.Param.PDDProdParam; +using TemuKJD.PDDForms.ShopForms; + +namespace TemuKJD.ToolForms +{ + public partial class PddMobileLoginForm : BaseGeneralForm + { + public static PddMobileLoginForm PddMobileLoginInstance { get; set; } = null; + + public int CloseAfterSecond { get; set; } + public EnumOpenType openType = EnumOpenType.manage; + public string InitUrl = ""; + private string shopCookieHead = "yangkeduo.com"; + private string shopLoginUrl = "https://mobile.yangkeduo.com/login.html?from=https%3A%2F%2Fmobile.yangkeduo.com%2Fpersonal.html"; + private string shopMainUrl = "https://mobile.yangkeduo.com/index.html"; + public ChromiumWebBrowser cefWebBrowser = null; + private BuyerLoginInfo buyer = null; + private List lstShopCompany = new List(); + private string currentUrl = ""; + + public PddMobileLoginForm(BuyerLoginInfo buyerInfo) + { + PddMobileLoginInstance = this; + + InitializeComponent(); + + this.buyer = buyerInfo; + this.txtUserName.Text = buyerInfo?.buyer_name; + this.txtPassWord.Text = ""; //DataOpenSSL.DecryptString(buyerInfo.Password); + } + + private void ShopLoginForm_Load(object sender, EventArgs e) + { + //this.splitContainer1.SplitterDistance = this.splitContainer1.Height - 62; + if (openType == EnumOpenType.login) + this.label3.Visible = true; + + if (CloseAfterSecond > 0) + { + Task.Run(() => + { + Thread.Sleep(1000 * CloseAfterSecond); + if (this.Created) + { + Invoke(new Action(() => { this.Close(); })); + } + }); + } + + AutoLogin(); + CheckAndSaveShop(); //判断登录是否成功,成功则保存店铺信息和店铺cookie + //ClosePopWindow(); //自动关闭弹窗 + } + + /// + /// 判断登录,保存店铺 + /// + private void CheckAndSaveShop() + { + } + + /// + /// 自动关闭弹窗 + /// + private void ClosePopWindow() + { + // 关闭弹窗 + Task.Run(() => + { + var sleepTime = 2500; + int i = 0; + while (true && i++ < 50) + { + try + { + Thread.Sleep(sleepTime); + var jsStr1 = "function ClosePopWindow(txt) {\r\n" + + " var result = 'no_pop'\r\n" + + " var item = document.getElementsByClassName(txt);\r\n" + + " for(i = 0; i < item.length; i++) {\r\n" + + " item[i].click();\r\n" + + " result = 'success'\r\n" + + " }\r\n" + + " return result;\r\n" + + "}\r\n" + + "ClosePopWindow('anticon-close-circle');\r\n" + + "ClosePopWindow('ant-modal-close-x');\r\n"; + var jsStr2 = "function clickPopWindow(txt) {\r\n" + + "var child = document.body.firstElementChild;\r\n" + + "var element1 = null;\r\n" + + " while (child) {\r\n" + + " if (child.innerHTML.indexOf(txt) >= 0) {\r\n" + + " element1 = child;\r\n" + + " if (child.firstElementChild) {\r\n" + + " child = child.firstElementChild; continue;\r\n" + + " } else break;\r\n" + + " }\r\n" + + " child = child.nextElementSibling;\r\n" + + " }\r\n" + + " if (element1) {\r\n" + + " element1.click(); return 'success';\r\n" + + " } else return 'no_pop';\r\n" + + "}\r\n" + + "clickPopWindow('我知道了');\r\n" + + "clickPopWindow('知道了');\r\n"; + if (cefWebBrowser != null && cefWebBrowser.IsBrowserInitialized) + { + var t1 = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr1); + t1.Wait(); + var t2 = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr2); + t2.Wait(); + if (t1.Result?.Result?.ToString() == "success" || t2.Result?.Result?.ToString() == "success") + sleepTime = Randomx.GetId(550, 650); + else + sleepTime = Randomx.GetId(1500, 2000); + } + } + catch (Exception ex) { } + } + }); + } + + /// + /// 自动登录店铺后台 + /// + private void AutoLogin() + { + if (openType != EnumOpenType.login && buyer == null) + return; + + if (cefWebBrowser == null) + { + //cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser("about:blank", false); + if (!string.IsNullOrEmpty(InitUrl)) + cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(InitUrl, false); + else + cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(shopMainUrl, false); + CustomResourceRequestHandlerLocal resourceRequestHandler = new CustomResourceRequestHandlerLocal(); + resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete; + resourceRequestHandler.BeforeResourceLoadEvent += RequestHandler_BeforeResourceLoad; + cefWebBrowser.RequestHandler = new CustomRequestHandler(resourceRequestHandler); + var lifeSapnHandler = new LifeSpanHandlerLocal(PopWindowType.SelfWindow); + cefWebBrowser.LifeSpanHandler = lifeSapnHandler; + cefWebBrowser.KeyboardHandler = new KeyboardHandler(); + cefWebBrowser.FrameLoadEnd += CefWebBrowser_FrameLoadEnd; + cefWebBrowser.AddressChanged += CefWebBrowser_AddressChanged; + cefWebBrowser.LoadError += CefWebBrowser_LoadError; + cefWebBrowser.Dock = DockStyle.Fill; + + //js绑定C#对象 + //PDDShopBrowserObject shopObj = new PDDShopBrowserObject(); + //shopObj.OnInfoReceived += ShopObj_OnInfoReceived; + //CefSharpSettings.WcfEnabled = true; + //cefWebBrowser.JavascriptObjectRepository.Register( + // name: "shopObj", + // objectToBind: shopObj, + // isAsync: false, + // options: new BindingOptions { Binder = BindingOptions.DefaultBinder.Binder /*CamelCaseJavascriptNames = false*/ /*cef79*/ } + //); + + //if (buyer.cookie == null) + // buyer.cookie = ""; + + List cookieLst = new List(); + try + { + if (buyer != null) + { + cookieLst = JsonHelper.DeserializeJsonToList(buyer?.cookie); + if (cookieLst == null) + cookieLst = new List(); + } + } + catch + { + } + + Task.Run(() => + { + Invoke(new Action(() => + { + splitContainer1.Panel1.Controls.Add(cefWebBrowser); + //cefWebBrowser.Load(shopMainUrl); + })); + // cef138必须init后方可设置或删除cookie + while (!cefWebBrowser.IsBrowserInitialized || !cefWebBrowser.GetBrowser().MainFrame.IsValid) + Thread.Sleep(20); + CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null)); + + //if (cookieLst.Any(c => c.Value.StartsWith("windows_1"))) + // cefWebBrowser.ExecuteScriptAsync("navigator.__defineGetter__('userAgent', function() { return 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12'; });"); + + //cef 138 如果没有设置RequestContext 可能为空,直接getCookieManager + //if (this.openType != EnumOpenType.login) + { + var t = CEFBrowser.SetCookieAsync(JsonHelper.SerializeObject(cookieLst), cefWebBrowser.GetCookieManager(null)); + //foreach (var cook in cookieLst) + //{ + // var t = CEFBrowser.SetCookieAsync(cook.Domain, cook.Name + "=" + cook.Value + ";", cefWebBrowser.GetCookieManager(null)); + // t.Wait(5000); + //} + } + + //根据登录的具体店铺设置local storage + if (!string.IsNullOrEmpty(buyer?.buyer_id)) + { + //var storageJsCode = "window.localStorage.setItem('" + "mall-info-id" + "', '" + shop.ShopId + "');\r\n"; + //storageJsCode += "window.localStorage.setItem('" + "agentseller-mall-info-id" + "', '" + shop.ShopId + "');\r\n"; + //while (!cefWebBrowser.IsBrowserInitialized || !cefWebBrowser.GetBrowser().MainFrame.IsValid) + // Thread.Sleep(20); + //cefWebBrowser.GetBrowser().MainFrame.ExecuteJavaScriptAsync(storageJsCode); + } + + if (!string.IsNullOrEmpty(InitUrl)) + cefWebBrowser.Load(InitUrl); + else + cefWebBrowser.Load(shopMainUrl); + + //不是登录的话就此返回 + if (openType != EnumOpenType.login) + { + Invoke(new Action(() => + { + chkCloseAfterLogin.Visible = false; + btnLoginAgain.Visible = false; + })); + return; + } + + for (int i = 0; i < 50; i++) + { + if (cefWebBrowser.IsLoading) + Thread.Sleep(100); + } + Thread.Sleep(Randomx.GetId(1500,2000)); + + if (!this.Created) + return; + + while (!cefWebBrowser.Address.StartsWith(shopLoginUrl)) + { + Thread.Sleep(1000); + if (!this.Created) + return; + } + + //CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null)); + //InputUserNameAndPassword(cefWebBrowser, shop.LoginName, DataOpenSSL.DecryptString(shop.Password)); + }); + } + } + + private void ShopObj_OnInfoReceived(string information) + { + //BaseMsgForm.ShowInfo(information); + if (!string.IsNullOrEmpty(information)) + cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync("alert('" + information + "');"); + } + + private void CefWebBrowser_LoadError(object sender, CefSharp.LoadErrorEventArgs e) + { + } + + private void CefWebBrowser_AddressChanged(object sender, CefSharp.AddressChangedEventArgs e) + { + if (this.Created && !this.Disposing && !this.IsDisposed) + { + Invoke(new Action(() => + { + currentUrl = e.Address; + txtAddress.Text = e.Address; + })); + } + } + + private void CefWebBrowser_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs e) + { + //js绑定C#对象 html页面内声明绑定的C#对象 + StringBuilder sb = new StringBuilder(); + sb.Append("(function(){"); + sb.Append("CefSharp.BindObjectAsync('shopObj');"); + sb.Append("})();"); + cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString()); + } + + //public Func BeforeResourceLoadEvent; // sender, requestUrl, postData, request, true(表示取消执行) + private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request) + { + return false; + } + public PDDProductUploadParam prodParam = null; + + static int GetAntiContentsTimes = 40; + private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request) + { + //if (url.Contains("https://mobile.yangkeduo.com/personal.html?refer_page_name=login") && openType == EnumOpenType.login) + if (url.Contains("https://mobile.yangkeduo.com/personal.html") && openType == EnumOpenType.login) + { + Task.Run(() => + { + var data = responseData; + if (data.Contains("\"success\":true") || data.Contains("nickname")) + { + var uid = BaseRegex.GetStringJson(ref data, "uid"); + var nickname = BaseRegex.GetStringJson(ref data, "nickname"); + var username = nickname; + + if (!string.IsNullOrEmpty(nickname) && !string.IsNullOrEmpty(uid)) + { + List cookieList = CEFBrowser.GetCookieList(shopCookieHead, cefWebBrowser.GetCookieManager(null)); + + var buyerUrl = BaseClass.BuildPDDObjString("user/add_buyer"); + + if (this.buyer == null) + buyer = GlobalConfig.BuyerLoginList.FirstOrDefault(buyer => buyer.buyer_id == uid); + if (this.buyer != null) + { + this.buyer.user_name = username; + this.buyer.buyer_nick = nickname; + this.buyer.cookie = JsonHelper.SerializeObject(cookieList); + buyerUrl = BaseClass.BuildPDDObjString("user/mdy_buyer"); + } + + var buyerData = UserLogin.GetSignaturex() + + "&buyer_id=" + uid + + "&buyer_name=" + username + + "&buyer_nick=" + nickname; + var result = GetHtml.PostUtf8(buyerUrl, buyerData); + if (string.IsNullOrEmpty(result) || !result.Contains("\"code\":200")) + result = GetHtml.PostUtf8(buyerUrl, buyerData); + + buyerUrl = BaseClass.BuildPDDObjString("user/mdy_buyer_cookie"); + buyerData = UserLogin.GetSignaturex() + + "&buyer_id=" + uid + + "&status=" + "在线" + + "&cookie=" + GetHtml.UrlEncodeUtf8(JsonHelper.SerializeObject(cookieList)); + result = GetHtml.PostUtf8(buyerUrl, buyerData); + if (string.IsNullOrEmpty(result) || !result.Contains("\"code\":200")) + result = GetHtml.PostUtf8(buyerUrl, buyerData); + + Invoke(new Action(() => + { + try + { + if (chkCloseAfterLogin.Checked) + this.Close(); + } + catch (Exception ex) + { } + })); + } + } + }); + } + } + + // 鼠标左键按下,移动,移动...左键抬起。 + public static void CefMouseDragDou(ChromiumWebBrowser webBrowser, int x1, int y1, int x2, int y2) + { + Thread.Sleep(100); + var host = webBrowser.GetBrowser().GetHost(); + + var rx = -6 + Randomx.GetId(13); + x2 = x2 + rx; + // 随机按下点的位置(正负6像素),提高仿真性 + int x = x1 + rx; + int y = y1 - 6 + Randomx.GetId(13); + + // 按下鼠标左键 + host.SendMouseClickEvent(x, y, MouseButtonType.Left, false, 1, CefEventFlags.None); + Thread.Sleep(100 + Randomx.GetId(300)); + + // 滑动光标 + int times = -20; + while (x < x2 + 4 - Randomx.GetId(9)) + { + times++; + x += (15 + Randomx.GetId(15)) / 8; + if (times % 5 == 0) + y = y - 1 + Randomx.GetId(3); + Thread.Sleep(6 + Math.Abs(times) / 5 + Randomx.GetId(16)); + host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton); + } + if (x < x2 - 1) + while (x < x2) + { + times++; + x += (8 + Randomx.GetId(8)) / 8; + if (times % 5 == 0) + y = y - 1 + Randomx.GetId(3); + Thread.Sleep(6 + Math.Abs(times) / 5 + Randomx.GetId(16)); + host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton); + } + else if (x > x2 + 1) + while (x > x2) + { + times++; + x -= (8 + Randomx.GetId(8)) / 8; + if (times % 5 == 0) + y = y - 1 + Randomx.GetId(3); + Thread.Sleep(6 + Math.Abs(times) / 5 + Randomx.GetId(16)); + host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton); + } + + // 如果最后位置偏差较多,再做一次调整 + x = x2 - 1 + Randomx.GetId(3); + x = x2; + Thread.Sleep(18 + Math.Abs(times) / 5 + Randomx.GetId(16)); + Thread.Sleep(18 + Math.Abs(times) / 5 + Randomx.GetId(16)); + host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton); + + // 抬起鼠标左键 + Thread.Sleep(300 + Randomx.GetId(500)); + host.SendMouseClickEvent(x, y, MouseButtonType.Left, true, 1, CefEventFlags.None); + host.SendMouseClickEvent(x, y, MouseButtonType.Left, true, 1, CefEventFlags.None); + } + + private void btnStop_Click(object sender, EventArgs e) + { + } + + private void btnCopyUserName_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtUserName.Text)) + Clipboard.SetDataObject(txtUserName.Text); + } + + private void btnCopyPassword_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtPassWord.Text)) + Clipboard.SetDataObject(txtPassWord.Text); + } + + private void btnReload_Click(object sender, EventArgs e) + { + if (cefWebBrowser != null) + { + if (txtAddress.Text != "about:blank") + cefWebBrowser.Load(txtAddress.Text); + else + cefWebBrowser.Load(shopMainUrl); + } + } + + private void ShopLoginForm_FormClosed(object sender, FormClosedEventArgs e) + { + //OnSaveComplete(shop); + Task.Run(() => { + Thread.Sleep(500); + if (!this.Disposing && !this.IsDisposed) + { + //MainForm.instance.Invoke(new Action(() => { this.Dispose(); })); + } + }); + } + + private void txtAddress_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + if (cefWebBrowser != null) + { + cefWebBrowser.Load(txtAddress.Text); + } + } + } + + string sInputValueChange { get; set; } = @" +let usernameId = document.getElementById('usernameId'); +usernameId.value = '1'; + +var event = document.createEvent('HTMLEvents'); +event.initEvent('input', true, true); +event.eventType = 'message'; +usernameId.dispatchEvent(event); +"; + + string sInputValueChange2 { get; set; } = @" +function changeReactInputValue(inputDom,newText){ + let lastValue = inputDom.value; + inputDom.value = newText; + let event = new Event('input', { bubbles: true }); + event.simulated = true; + let tracker = inputDom._valueTracker; + if (tracker) { + tracker.setValue(lastValue); + } + inputDom.dispatchEvent(event); +} +"; + + string sGetElementWithText { get; set; } = @" +function getElementWithText(sText) +{ + var elem=null; + const elements = document.querySelectorAll('*'); // 选择所有元素 + elements.forEach(element => { + if (element.textContent.includes(sText)) { + // 对每个匹配的元素执行操作 + //console.log(element); + elem=element; + } + }); + return elem; +}; +"; + + private void btnLoginAgain_Click(object sender, EventArgs e) + { + if (this.currentUrl != shopLoginUrl) + this.cefWebBrowser.Load(shopLoginUrl); + } + + private void splitContainer1_Panel2_Paint(object sender, PaintEventArgs e) + { + + } + } +} diff --git a/TEMUKJD/ToolForms/PddMobileLoginForm.resx b/TEMUKJD/ToolForms/PddMobileLoginForm.resx new file mode 100644 index 0000000..c963c3c --- /dev/null +++ b/TEMUKJD/ToolForms/PddMobileLoginForm.resx @@ -0,0 +1,298 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAgIAQYAAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP// + AAD///8AAAAAAAAAAAAAAAAABEZmbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZkQAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAZszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMxmAAAAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMxkAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzGQAAAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAABszMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAbMzMzMzMzMzMzMzMzM + zMzMzMzMzMx3d4iIiIiIiIh3fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAABszMzMzMzMzMzM + zMzMzMzMzMzHeIiIiIj/////////iIiIiId8zMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAGzMzMzMzM + zMzMzMzMzMzMzMeIiI/////////////////////4iIh8zMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAATMzM + zMzMzMzMzMzMzMzMzHiI////////////////////////////iIfMzMzMzMzMzMzMzMzMzMzMxAAAAAAA + AGzMzMzMzMzMzMzMzMzMx3iP///////////////////////////////4iHzMzMzMzMzMzMzMzMzMzMYA + AAAAAAbMzMzMzMzMzMzMzMzMx3iP//////////////////////////////////+IfMzMzMzMzMzMzMzM + zMzMYAAAAABMzMzMzMzMzMzMzMzMx3iP/////////////////////////////////////4h8zMzMzMzM + zMzMzMzMzMQAAAAAbMzMzMzMzMzMzMzMzHiP////////////////////////////////////////h3zM + zMzMzMzMzMzMzMzGAAAABMzMzMzMzMzMzMzMzHiP//////////////////////////////////////// + //iHzMzMzMzMzMzMzMzMzEAAAAbMzMzMzMzMzMzMzMeI//////////////////////////////////// + ////////+IfMzMzMzMzMzMzMzMxgAABMzMzMzMzMzMzMzMx4//////////////////////////////// + //////////////+IfMzMzMzMzMzMzMzMxAAAbMzMzMzMzMzMzMzHj/////////////////////////// + /////////////////////4fMzMzMzMzMzMzMzMYAAMzMzMzMzMzMzMzMeP////////////////////// + ///////////////////////////4fMzMzMzMzMzMzMzMAAbMzMzMzMzMzMzMx4////////////////// + /////////////////////////////////4fMzMzMzMzMzMzMzGAGzMzMzMzMzMzMzHj///////////// + ///////////////////////////////////////4fMzMzMzMzMzMzMxgDMzMzMzMzMzMzMyI//////// + /////////////////////////////////////////////4zMzMzMzMzMzMzMwEzMzMzMzMzMzMzHj/// + //////////////////////////////////////////////////+HzMzMzMzMzMzMzMRszMzMzMzMzMzM + eP//////////////////////////////////////////////////////+HzMzMzMzMzMzMzGbMzMzMzM + zMzMzHj///////////////////////////////////////////////////////+MzMzMzMzMzMzMxmzM + zMzMzMzMzMyP////+IiP////////////////////////////////////////+I//////h8zMzMzMzMzM + zMZszMzMzMzMzMzHj////4iIiI//////////////////////////////////////+IiIj/////jMzMzM + zMzMzMzGbMzMzMzMzMzMyP////iIiIiI/////////////////////////////////////4iIiIj////4 + fMzMzMzMzMzMxszMzMzMzMzMzHj////4iIiIiP////////////////////////////////////+IiIiI + j////4zMzMzMzMzMzMbMzMzMzMzMzMx4////iIiIiIj////////////////////////////////////4 + iIiIiI////+HzMzMzMzMzMzMzMzMzMzMzMzMj////4iIiIiI//////////////+IiP//iI////////// + ////+IiIiIiP////h8zMzMzMzMzMzMzMzMzMzMzMzI/////4iIiIiP/////////////4d3eIiIeIj/// + //////////+IiIiIj/////jMzMzMzMzMzMzMzMzMzMzMzMyP////+IiIiIj/////////////iIiId3eI + iI//////////////iIiIiI/////4zMzMzMzMzMzMzMzMzMzMzMzHj/////+IiIiP/////////////4// + /4d4j/+P//////////////iIiIj/////+MzMzMzMzMzMzMzMzMzMzMzMx4//////+IiP//////////// + ///////4j///////////////////iIiP//////jMzMzMzMzMzMzMzMzMzMzMzMeP//////////+IiIj/ + ///////////////////////////////////////////4fMzMzMzMzMzMzMzMzMzMzMzH//////////+H + fMx8eP//////////////////////////iId3iP//////////+HzMzMzMzMzMzMzMzMzMzMzMyP////// + ///4fMzHh8eP////////////////////////+MzMzMd4//////////h8zMzMzMzMzMzMzMzMzMzMzMf/ + ////////+MzMePjMeP///////////////////////4zMzMeHx4/////////4fMzMzMzMzMzMzMzMzMzM + zMzH/////////4fMd3eHzMeP//////////////////////iMzMzIiHx4////////+HzMzMzMzMzMzMzM + zMzMzMzMx/////////+Hx4iIfMzMj//////////////////////4h3d8x4h8yP////////jMzMzMzMzM + zMzMzMzMzMzMzMeP////////+HiP+IfMzI//////////////////////+HiIiHd3zHj////////4zMzM + zMzMzMzMzMzMzMzMzMzHj/////////h4//+HzMeP//////////////////////h4//h8zMyP//////// + +MzMzMzMzMzMzMzMzMzMzMzMzI/////////4iP//h8x4///////////////////////4j//4fMzHj/// + //////jMzMzMzMzMzMzMzMzMzMzMzMyP///////4iIiP+IfHj///////////////////////+Ij/+HzM + eP/////////4zMzMzMzMzMzMzMzMzMzMzMzMj///////iIiIiIh3eP////////////////////////+I + j4h8x3iI////////h8zMzMzMzMzMzMzMzMzMzMzMzH//////+Hj///iIiI////////////////////// + /////4iId4iIiIj//////4zMzMzMzMzMzMzMzMzMzMzMzMx4//////iP////iP////////////////// + /////////////4iP//iI//////+MzMzMzMzMzMzMzMzMzMzMzMzMyP//////////+I////////////// + ///////////////////4eP//iP//////jMzMzMzMzMzMzMzMzMzMzMzMzMj///////////iP//////// + /////////////////////////4j/////////+HzMzMzMzMzMzMzMzMzMzMzMzMzHj/////////////// + //////////////////////////////+I//////////jMzMzMzMzMzMzMzMzMzMzMzMzMzI////////// + //////////////////////////////////////////////+HzMzMzMzMzMzMzMzMzMzMzMzMzMyP//// + ////////////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzM + eP///////////////////////////////////////////////////////4zMzMzMzMzMzMzMzMzMzMzM + zMzMzMj///////////////////////////////////////////////////////h8zMzMzMzMzMzMzMzM + zMzMzMzMzMzHj//////////////////////////////////////////////////////4zMzMzMzMzMzM + zMzMzMzMzMzMzMzMzI//////////////////////////////////////////////////////h8zMzMzM + zMzMzMzMzMzMzMzMzMzMzMx4////////////////////////////////////////////////////+HzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMyI////+I//////////////////////////////////////////// + //h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////+Ij///////////////////////////////////// + //////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////+IiIiIj//////////////////////////4 + ////iI/////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMiP/////4iIiP////////////////////// + ////+IiIiIj/////iHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP////////////////////////// + ///////////4iIj//////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP//////////////////// + //////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP////////////// + //////////////////////////////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHj///////// + ///////////////////////////////////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP//// + ////////////////////////////////////////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzI + j/////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMeP//////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMx4////////+I//////////////////////////////////////jMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMeP///////4iIj///////////////////////////iP///////4fMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMx4////////iIiIiP///////////////////////4iIiP///////4zMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiI////////////////////+IiIiIj///////+HzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIj////////////////////4iIiIiIj/////// + +MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiI////////////////////+IiIiIiI// + //////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIiP////////////////////iIiI + iIiI///////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiIj/////iIiIiIiIj///// + /4iIiIiIiP///////4zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIiI/////4zMzMzMzM + j/////+IiIiIiIiP//////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP//////+IiIiIiIj/////+MzM + zMzMzI//////+IiIiIiIj///////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzI////////iIiIiIiI//// + //jMzMzMzMyP//////iIiIiIiIj///////jMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP///////4iIiIiI + iP/////4zMzMzMzMj//////4iIiIiIiI///////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzI////////iI + iIiIiI//////+MzMzMzMzI//////+IiIiIiIiP///////4zMzMzMzMzMzMzMzMzMzMzMzMzMzMyP//// + ///4iIiIiIiP//////fMzMzMzMyP//////+IiIiIiIj///////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzH + j///////+IiIiIiI//////+HzMzMzMzMeP//////iIiIiIiIj///////jMzMzMzMzMzMzMzMzMzMzMzM + zMzMyP////////iIiIiIiP//////jMzMzMzMzHj///////iIiIiIiI///////4fMzMzMzMzMzMzMzMzM + zMzMzMzMzMj///////+IiIiIiI///////4zMzMzMzMzI///////4iIiIiIiI///////3zMzMzMzMzMzM + zMzMzMzMzMzMzMzI////////iIiIiIiP//////+MzMzMzMzMyP//////+IiIiIiIiP//////+MzMzMzM + zMzMzMzMzMzMzMzMzMzMeP///////4iIiIiIj///////jMzMzMzMzMj///////+IiIiIiIj///////jM + zMzMzMzMzMzMzMzMzMzMzMzMzI////////+IiIiIiP//////+HzMzMzMzMzHj///////iIiIiIiI//// + ///4zMzMzMzMzMzMzMzMzMzMzMzMzMyP////////iIiIiI////////jMzMzMzMzMzI///////4iIiIiI + iI//////+MzMzMzMzMzMzMzMzMzMzMzMzMzMj////////4iIiIiP///////4zMzMzMzMzMyP///////4 + iIiIiIiP//////jMzMzMzMzMzMzMzMzMzMzMzMzMzI////////+IiIiI////////h8zMzMzMzMzMeP// + /////4iIiIiIj//////4fMzMzMzMzMzMzMzMzMzMzMzMzMyP////////iIiIj////////4fMzMzMzMzM + zHj///////+IiIiIiI//////+HzMzMzMzMzMzMzMzMzMzMzMzMzHj/////////iIiP////////+MzMzM + zMzMzMzI////////+IiIiIiP//////h8zMzMzMzMzMzMxmzMzMzMzMzMx4/////////4iP/////////4 + fMzMzMzMzMzMx4////////+IiIiIj//////4fMzMzMzMzMzMzMZszMzMzMzMzMeP//////////////// + ////+MzMzMzMzMzMzMyP////////iIiIiP//////+HzMzMzMzMzMzMzGbMzMzMzMzMzH//////////// + //////////fMzMzMzMzMzMzMeP////////iIiIj///////98zMzMzMzMzMzMxmzMzMzMzMzMyP////// + //////////////+HzMzMzMzMzMzMzHj/////////+IiP////////jMzMzMzMzMzMzMZszMzMzMzMzMj/ + ////////////////////jMzMzMzMzMzMzMzIj////////////////////4zMzMzMzMzMzMzGTMzMzMzM + zMzH////////////////////+HzMzMzMzMzMzMzMx4////////////////////+MzMzMzMzMzMzMxAzM + zMzMzMzMx/////////////////////jMzMzMzMzMzMzMzMyI///////////////////4fMzMzMzMzMzM + zMAGzMzMzMzMzMeP//////////////////+HzMzMzMzMzMzMzMzMeP//////////////////+HzMzMzM + zMzMzMxgBszMzMzMzMzHj//////////////////4fMzMzMzMzMzMzMzMzMeP//////////////////h8 + zMzMzMzMzMzMYADMzMzMzMzMzI//////////////////+HzMzMzMzMzMzMzMzMzHj/////////////// + ///4zMzMzMzMzMzMzAAAbMzMzMzMzMyP/////////////////4fMzMzMzMzMzMzMzMzMzHj///////// + ////////+MzMzMzMzMzMzMYAAEzMzMzMzMzMj/////////////////+MzMzMzMzMzMzMzMzMzMzIj/// + /////////////4fMzMzMzMzMzMzEAAAGzMzMzMzMzHj////////////////4fMzMzMzMzMzMzMzMzMzM + x4////////////////+MzMzMzMzMzMzMYAAABMzMzMzMzMx4////////////////h8zMzMzMzMzMzMzM + zMzMzMx4///////////////4fMzMzMzMzMzMzEAAAABszMzMzMzMx4//////////////+HzMzMzMzMzM + zMzMzMzMzMzMx4//////////////+MzMzMzMzMzMzMYAAAAATMzMzMzMzMyP/////////////4fMzMzM + zMzMzMzMzMzMzMzMzMeI/////////////4fMzMzMzMzMzMzEAAAAAAbMzMzMzMzMeP////////////h8 + zMzMzMzMzMzMzMzMzMzMzMzMeI////////////h8zMzMzMzMzMzMYAAAAAAAbMzMzMzMzMeP//////// + //iHzMzMzMzMzMzMzMzMzMzMzMzMzMyI//////////+HzMzMzMzMzMzMxgAAAAAAAEzMzMzMzMzMeP// + //////iHfMzMzMzMzMzMzMzMzMzMzMzMzMzMx4/////////4fMzMzMzMzMzMzMQAAAAAAAAGzMzMzMzM + zMeI//////iHfMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4j//////4h8zMzMzMzMzMzMxgAAAAAAAAAGzM + zMzMzMzMx4iIiIiHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiIj/+Ih3zMzMzMzMzMzMzGAAAAAAAA + AAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx3iId8zMzMzMzMzMzMzMYAAA + AAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + xgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzGAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzGQAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAABGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAAAABmzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGZmzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZEAAAAAAAAAAAAAAAAD////+AAAAAAAAAAD/////////AAAA + AAAAAAAAAP//////+AAAAAAAAAAAAAAf/////+AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAH////+ + AAAAAAAAAAAAAAAAf////AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAAP///gAAAAAAAAAAAAAAAA + B///wAAAAAAAAAAAAAAAAAP//4AAAAAAAAAAAAAAAAAB//8AAAAAAAAAAAAAAAAAAP/+AAAAAAAAAAAA + AAAAAAB//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAAAAAAAAAf+AAAAAAA + AAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAAAAAAAAAAAAAAB+AA + AAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAA + AAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABAAAAAAAA + AAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAADwAAAAAAA + AAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AA + AAAAAAAAAAAAAAAAAA/4AAAAAAAAAAAAAAAAAAAf+AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAA + AD/+AAAAAAAAAAAAAAAAAAB//gAAAAAAAAAAAAAAAAAAf/8AAAAAAAAAAAAAAAAAAP//gAAAAAAAAAAA + AAAAAAH//8AAAAAAAAAAAAAAAAAD///gAAAAAAAAAAAAAAAAB///8AAAAAAAAAAAAAAAAA////wAAAAA + AAAAAAAAAAA////+AAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAf///// + +AAAAAAAAAAAAAAf//////8AAAAAAAAAAAAA/////////gAAAAAAAAAAf////w== + + + \ No newline at end of file diff --git a/TEMUKJD/UserComponent/UcCheckBox.cs b/TEMUKJD/UserComponent/UcCheckBox.cs index e9e4065..ccf605a 100644 --- a/TEMUKJD/UserComponent/UcCheckBox.cs +++ b/TEMUKJD/UserComponent/UcCheckBox.cs @@ -34,10 +34,16 @@ namespace TemuKJD.UserComponent { //base.OnPaint(e); // 禁用系统绘制 + //if (e.ClipRectangle.X != 0 || e.ClipRectangle.Y != 0) + // return; + Graphics g = e.Graphics; + g.Clear(this.BackColor); //填充背景色 - g.FillRectangle(new SolidBrush(this.BackColor), e.ClipRectangle); + //g.FillRectangle(new SolidBrush(this.BackColor), e.ClipRectangle); + g.FillRectangle(new SolidBrush(this.BackColor), this.ClientRectangle); + //绘制圆形(注释此句,以备后用) //Brush brush = new SolidBrush(this.Checked ? checkBoxCheckColor : checkBoxColor); @@ -64,8 +70,10 @@ namespace TemuKJD.UserComponent } Size size = TextRenderer.MeasureText(this.Text, Font); e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; // 或者 AntiAliasGridFit // 平滑字体 - e.Graphics.DrawString(this.Text, Font, new SolidBrush(this.ForeColor), - new PointF(e.ClipRectangle.X + checkBoxSize + 2 + Padding.Left, e.ClipRectangle.Y + (Height - size.Height) / 2)); + //e.Graphics.DrawString(this.Text, Font, new SolidBrush(this.ForeColor), + // new PointF(e.ClipRectangle.X + checkBoxSize + 2 + Padding.Left, e.ClipRectangle.Y + (Height - size.Height) / 2)); + e.Graphics.DrawString(this.Text, Font, new SolidBrush(this.ForeColor), + new PointF(this.ClientRectangle.X + checkBoxSize + 2 + Padding.Left, this.ClientRectangle.Y + (Height - size.Height) / 2)); } private void DrawRoundedRectangle(Graphics g, Rectangle rect, int radius, Color color, bool isFill = false) diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs index bf383dd..4b0cfea 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs @@ -41,6 +41,7 @@ namespace TemuKJD.WXForms.ProductForms System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.chkRandomCompanyProd = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkUseWXComplateProd = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkSaveBound = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkAiShortTitle = new TemuKJD.UserComponent.UcCheckBox(this.components); @@ -96,17 +97,17 @@ namespace TemuKJD.WXForms.ProductForms this.pbSelectProd = new System.Windows.Forms.PictureBox(); this.cmbSourceType = new System.Windows.Forms.ComboBox(); this.cmbJstInitSet = new System.Windows.Forms.ComboBox(); - this.cmbCateFilter3 = new System.Windows.Forms.ComboBox(); + this.cmbCateFilter3 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); this.label21 = new System.Windows.Forms.Label(); this.cmbGroupFilter = new System.Windows.Forms.ComboBox(); this.txtIdFilter = new System.Windows.Forms.TextBox(); - this.cmbCateFilter2 = new System.Windows.Forms.ComboBox(); + this.cmbCateFilter2 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); this.label19 = new System.Windows.Forms.Label(); this.btnClearFilter = new DevComponents.DotNetBar.PanelEx(); this.lblGoodsCount = new System.Windows.Forms.Label(); this.cmbWxSafe = new System.Windows.Forms.ComboBox(); this.btnClearUpload = new DevComponents.DotNetBar.PanelEx(); - this.cmbCateFilter1 = new System.Windows.Forms.ComboBox(); + this.cmbCateFilter1 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); this.label2 = new System.Windows.Forms.Label(); this.lblWaitToUp = new System.Windows.Forms.Label(); this.btnRandomAdd = new DevComponents.DotNetBar.PanelEx(); @@ -186,7 +187,6 @@ namespace TemuKJD.WXForms.ProductForms this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.panel1 = new System.Windows.Forms.Panel(); - this.chkRandomCompanyProd = new TemuKJD.UserComponent.UcCheckBox(this.components); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -295,6 +295,18 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx2.TabStop = false; this.ucGroupBoxEx2.Text = "商品上传"; // + // chkRandomCompanyProd + // + this.chkRandomCompanyProd.Checked = true; + this.chkRandomCompanyProd.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkRandomCompanyProd.Location = new System.Drawing.Point(856, 110); + this.chkRandomCompanyProd.Name = "chkRandomCompanyProd"; + this.chkRandomCompanyProd.Size = new System.Drawing.Size(87, 21); + this.chkRandomCompanyProd.TabIndex = 889; + this.chkRandomCompanyProd.Text = "随机工厂商品"; + this.chkRandomCompanyProd.UseVisualStyleBackColor = true; + this.chkRandomCompanyProd.Visible = false; + // // chkUseWXComplateProd // this.chkUseWXComplateProd.Location = new System.Drawing.Point(727, 42); @@ -1075,12 +1087,18 @@ namespace TemuKJD.WXForms.ProductForms // // cmbCateFilter3 // + this.cmbCateFilter3.DefaultText = "全部"; + this.cmbCateFilter3.DropDownHeight = 1; + this.cmbCateFilter3.DropDownWidth = 1; this.cmbCateFilter3.FormattingEnabled = true; + this.cmbCateFilter3.IntegralHeight = false; this.cmbCateFilter3.Location = new System.Drawing.Point(309, 20); this.cmbCateFilter3.Name = "cmbCateFilter3"; this.cmbCateFilter3.Size = new System.Drawing.Size(92, 25); this.cmbCateFilter3.TabIndex = 710; + this.cmbCateFilter3.Text = "全部"; this.cmbCateFilter3.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter3_SelectedIndexChanged); + this.cmbCateFilter3.TextChanged += new System.EventHandler(this.cmbCateFilter3_TextChanged); // // label21 // @@ -1113,12 +1131,18 @@ namespace TemuKJD.WXForms.ProductForms // // cmbCateFilter2 // + this.cmbCateFilter2.DefaultText = "全部"; + this.cmbCateFilter2.DropDownHeight = 1; + this.cmbCateFilter2.DropDownWidth = 1; this.cmbCateFilter2.FormattingEnabled = true; + this.cmbCateFilter2.IntegralHeight = false; this.cmbCateFilter2.Location = new System.Drawing.Point(178, 20); this.cmbCateFilter2.Name = "cmbCateFilter2"; this.cmbCateFilter2.Size = new System.Drawing.Size(92, 25); this.cmbCateFilter2.TabIndex = 708; + this.cmbCateFilter2.Text = "全部"; this.cmbCateFilter2.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter2_SelectedIndexChanged); + this.cmbCateFilter2.TextChanged += new System.EventHandler(this.cmbCateFilter2_TextChanged); // // label19 // @@ -1208,12 +1232,18 @@ namespace TemuKJD.WXForms.ProductForms // // cmbCateFilter1 // + this.cmbCateFilter1.DefaultText = "全部"; + this.cmbCateFilter1.DropDownHeight = 1; + this.cmbCateFilter1.DropDownWidth = 1; this.cmbCateFilter1.FormattingEnabled = true; + this.cmbCateFilter1.IntegralHeight = false; this.cmbCateFilter1.Location = new System.Drawing.Point(47, 20); this.cmbCateFilter1.Name = "cmbCateFilter1"; this.cmbCateFilter1.Size = new System.Drawing.Size(92, 25); this.cmbCateFilter1.TabIndex = 663; + this.cmbCateFilter1.Text = "全部"; this.cmbCateFilter1.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter1_SelectedIndexChanged); + this.cmbCateFilter1.TextChanged += new System.EventHandler(this.cmbCateFilter1_TextChanged); // // label2 // @@ -2292,18 +2322,6 @@ namespace TemuKJD.WXForms.ProductForms this.panel1.Size = new System.Drawing.Size(873, 86); this.panel1.TabIndex = 189; // - // chkRandomCompanyProd - // - this.chkRandomCompanyProd.Checked = true; - this.chkRandomCompanyProd.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkRandomCompanyProd.Location = new System.Drawing.Point(856, 110); - this.chkRandomCompanyProd.Name = "chkRandomCompanyProd"; - this.chkRandomCompanyProd.Size = new System.Drawing.Size(87, 21); - this.chkRandomCompanyProd.TabIndex = 889; - this.chkRandomCompanyProd.Text = "随机工厂商品"; - this.chkRandomCompanyProd.UseVisualStyleBackColor = true; - this.chkRandomCompanyProd.Visible = false; - // // WXDBProdUploadForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -2403,7 +2421,6 @@ namespace TemuKJD.WXForms.ProductForms private DevComponents.DotNetBar.PanelEx panelEx1; private System.Windows.Forms.TextBox txtIdFilter; private System.Windows.Forms.Label lblIdFilter; - private System.Windows.Forms.ComboBox cmbCateFilter1; private System.Windows.Forms.Label label2; public System.Windows.Forms.Label lblWaitToUp; private System.Windows.Forms.Label label7; @@ -2431,9 +2448,7 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.PictureBox pbLoadingShop; private System.Windows.Forms.ComboBox cmbJstInitSet; private System.Windows.Forms.Label lblJstInitSet; - private System.Windows.Forms.ComboBox cmbCateFilter3; private System.Windows.Forms.Label label21; - private System.Windows.Forms.ComboBox cmbCateFilter2; private System.Windows.Forms.Label label19; private System.Windows.Forms.PictureBox pbLoading; private DevComponents.DotNetBar.PanelEx btnFilterBound; @@ -2505,5 +2520,8 @@ namespace TemuKJD.WXForms.ProductForms private UserComponent.UcCheckBox chkUseWXComplateProd; private DevComponents.DotNetBar.PanelEx btnProdDb; private UserComponent.UcCheckBox chkRandomCompanyProd; + private UserComponent.UcComboBoxMutiSelect cmbCateFilter1; + private UserComponent.UcComboBoxMutiSelect cmbCateFilter3; + private UserComponent.UcComboBoxMutiSelect cmbCateFilter2; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs index c2d8a55..34c39d0 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -1173,7 +1173,7 @@ namespace TemuKJD.WXForms.ProductForms })); } - public static KJDDBProduct GetProductDetail(string prodDbId, out string errMsg) + public static KJDDBProduct GetProductDetail(string prodDbId, out string errMsg, bool noViolationProduct = false) { errMsg = ""; @@ -1186,9 +1186,9 @@ namespace TemuKJD.WXForms.ProductForms List list = new List(); var url = BaseClass.BuildObjString("product/get_pdd_product_detail_list"); - var data = ""; - - data = UserLogin.GetSignaturex() + "&search_db_ids=" + prodDbId; + var data = UserLogin.GetSignaturex() + "&search_db_ids=" + prodDbId; + if (noViolationProduct) + data += "&wx_safe_status=安全商品,未校验"; var html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) @@ -4227,7 +4227,6 @@ namespace TemuKJD.WXForms.ProductForms private void btnRandomAdd_Click(object sender, EventArgs e) { btnRandomAdd.Enabled = false; - pbSelectProd.Visible = true; Task.Run(() => { Thread.Sleep(5000); @@ -4236,6 +4235,8 @@ namespace TemuKJD.WXForms.ProductForms btnRandomAdd.Enabled = true; })); }); + + pbSelectProd.Visible = true; int addCount = txtAddCount.Text.Trim().ParseToInt(); if (getProdTokenSource != null) getProdTokenSource.Cancel(); @@ -4245,18 +4246,19 @@ namespace TemuKJD.WXForms.ProductForms List prodLst = new List(); int index = 0; int pageSize = 50; + int prodCount = 99999999; while (addCount > 0) { if (getProdTokenSource.IsCancellationRequested) break; index++; - int prodCount = 0; // 如果产品数量在0到50之间,说明数据库商品数量不足,无需再重复筛选,直接随机打乱 - if (prodLst.Count == 0 || prodLst.Count == Math.Min(pageSize, addCount)) + if (prodLst.Count == 0 || prodCount > pageSize) { - if (index > 1 && prodCount > 0) + if (prodCount != 99999999) { + //不重复筛选 prodLst = GetRandomProductList(out prodCount, 1, Math.Min(pageSize, addCount), true, prodCount); } else @@ -4282,7 +4284,7 @@ namespace TemuKJD.WXForms.ProductForms var selectProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(prod)); selectProd.out_product_Id = prod.id.ToString(); selectProd.id = 1; - if(lstTemuDBProductSelect.Count > 0) + if (lstTemuDBProductSelect.Count > 0) selectProd.id = lstTemuDBProductSelect.Max(p => p.id) + 1; this.lstTemuDBProductSelect.Add(selectProd); @@ -4328,28 +4330,49 @@ namespace TemuKJD.WXForms.ProductForms data += "&in_ext_codes=" + txtExtCodeFilter.Text; data += "&in_spu_ids=" + txtIdFilter.Text; data += "&in_groups=" + cmbGroupFilter.Text; + if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店") - data += "&in_cates=" + cmbCateFilter1.Text; + data += "&in_cates=" + (cmbCateFilter1.Text == "全部" ? "" : cmbCateFilter1.Text); else { - var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim()); - var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); - var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCateFilter2.Text.Trim()); - var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList(); - var cate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCateFilter3.Text.Trim()); + //var selectCate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim()); + //var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == selectCate1?.cat_id).ToList(); + //var selectCate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCateFilter2.Text.Trim()); + //var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == selectCate2?.cat_id).ToList(); + //var selectCate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCateFilter3.Text.Trim()); - if (!string.IsNullOrEmpty(cmbCateFilter1.Text) && cate1 != null) - data += "&wx_cat_1=" + cate1.cat_id; - else if (chkSkipQualification.Checked) + //if (!string.IsNullOrEmpty(cmbCateFilter1.Text) && selectCate1 != null) + // data += "&wx_cat_1=" + selectCate1.cat_id; + //else if (chkSkipQualification.Checked) + //{ + // // 厂商直采普通店铺不要随特殊商品 + // data += "&wx_cat_1=" + string.Join(",", GlobalConfig.WxCatList.Where(c=>c.level == 1 && !(c.name == "图书" || c.name == "食品饮料" || c.name == "成人用品")) + // .Select(c => c.cat_id)); + //} + //if (!string.IsNullOrEmpty(cmbCateFilter2.Text) && selectCate2 != null) + // data += "&wx_cat_2=" + selectCate2.cat_id; + //if (!string.IsNullOrEmpty(cmbCateFilter3.Text) && selectCate3 != null) + // data += "&wx_cat_3=" + selectCate3.cat_id; + + var selectCate1 = GlobalConfig.WxCatList.Where(c => c.level == 1 && (";" + cmbCateFilter1.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList(); + var selectCate2 = cates2.Where(c => c.level == 2 && (";" + cmbCateFilter2.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates3 = GlobalConfig.WxCatList.Where(c => selectCate2.Any(c2 => c.f_cat_id == c2.cat_id)).ToList(); + var selectCate3 = cates3.Where(c => c.level == 3 && (";" + cmbCateFilter3.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + + if (selectCate1?.Count == 0 && chkSkipQualification.Checked) { // 厂商直采普通店铺不要随特殊商品 - data += "&wx_cat_1=" + string.Join(",", GlobalConfig.WxCatList.Where(c=>c.level == 1 && !(c.name == "图书" || c.name == "食品饮料" || c.name == "成人用品")) + data += "&wx_cat_1=" + string.Join(",", GlobalConfig.WxCatList.Where(c => c.level == 1 && !(c.name == "图书" || c.name == "食品饮料" || c.name == "成人用品")) .Select(c => c.cat_id)); } - if (!string.IsNullOrEmpty(cmbCateFilter2.Text) && cate2 != null) - data += "&wx_cat_2=" + cate2.cat_id; - if (!string.IsNullOrEmpty(cmbCateFilter3.Text) && cate3 != null) - data += "&wx_cat_3=" + cate3.cat_id; + + if (!string.IsNullOrEmpty(cmbCateFilter1.Text) && selectCate1?.Count > 0) + data += "&wx_cat_1=" + string.Join(",", selectCate1.Select(c => c.cat_id).ToList()); + if (!string.IsNullOrEmpty(cmbCateFilter2.Text) && selectCate2?.Count > 0) + data += "&wx_cat_2=" + string.Join(",", selectCate2.Select(c => c.cat_id).ToList()); + if (!string.IsNullOrEmpty(cmbCateFilter3.Text) && selectCate3?.Count > 0) + data += "&wx_cat_3=" + string.Join(",", selectCate3.Select(c => c.cat_id).ToList()); } data += "&product_get_type=" + cmbSourceType.Text.Trim(); data += "&wx_safe_status=" + cmbWxSafe.Text.Trim().Replace("安全+未校验", "安全商品,未校验"); @@ -4777,46 +4800,97 @@ namespace TemuKJD.WXForms.ProductForms private void cmbCateFilter1_SelectedIndexChanged(object sender, EventArgs e) { - if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "微信店采") - return; - - cmbCateFilter2.Text = ""; - cmbCateFilter2.Items.Clear(); - var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim()); - var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); - foreach (var cate2 in cates2) - { - cmbCateFilter2.Items.Add(cate2.name); - } + //if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "微信店采") + // return; + //cmbCateFilter2.Text = ""; + //cmbCateFilter2.Items.Clear(); + //var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim()); + //var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); + //foreach (var cate2 in cates2) + //{ + // cmbCateFilter2.Items.Add(cate2.name); + //} } private void cmbCateFilter2_SelectedIndexChanged(object sender, EventArgs e) { - if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "微信店采") - return; + //if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "微信店采") + // return; - cmbCateFilter3.Text = ""; - cmbCateFilter3.Items.Clear(); - var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim()); - var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); - var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCateFilter2.Text.Trim()); - var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList(); - foreach (var cate3 in cates3) - { - cmbCateFilter3.Items.Add(cate3.name); - } + //cmbCateFilter3.Text = ""; + //cmbCateFilter3.Items.Clear(); + //var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim()); + //var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); + //var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCateFilter2.Text.Trim()); + //var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList(); + //foreach (var cate3 in cates3) + //{ + // cmbCateFilter3.Items.Add(cate3.name); + //} } private void cmbCateFilter3_SelectedIndexChanged(object sender, EventArgs e) { - var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim()); - var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); - var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCateFilter2.Text.Trim()); - var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList(); - var cate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCateFilter3.Text.Trim()); + //var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim()); + //var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); + //var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCateFilter2.Text.Trim()); + //var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList(); + //var cate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCateFilter3.Text.Trim()); } + private void cmbCateFilter1_TextChanged(object sender, EventArgs e) + { + if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店") + return; + + cmbCateFilter2.Text = ""; + cmbCateFilter2.Items.Clear(); + cmbCateFilter3.Text = ""; + cmbCateFilter3.Items.Clear(); + var selectCate1 = GlobalConfig.WxCatList + .Where(c => c.level == 1 && (cmbCateFilter1.Text.Trim() == cmbCateFilter1.DefaultText || (";" + cmbCateFilter1.Text.Trim() + ";") + .Contains(";" + c.name + ";"))).ToList(); + var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList(); + //foreach (var cate2 in cates2) + //{ + // cmbCat2.Items.Add(cate2.name); + //} + cmbCateFilter2.Items.AddRange(cates2.Select(c => c.name).ToArray()); + } + + private void cmbCateFilter2_TextChanged(object sender, EventArgs e) + { + if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店") + return; + + cmbCateFilter3.Text = ""; + cmbCateFilter3.Items.Clear(); + var selectCate1 = GlobalConfig.WxCatList + .Where(c => c.level == 1 && (cmbCateFilter1.Text.Trim() == cmbCateFilter1.DefaultText || (";" + cmbCateFilter1.Text.Trim() + ";") + .Contains(";" + c.name + ";"))).ToList(); + var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList(); + var selectCate2 = cates2 + .Where(c => c.level == 2 && (cmbCateFilter2.Text.Trim() == cmbCateFilter1.DefaultText || (";" + cmbCateFilter2.Text.Trim() + ";") + .Contains(c.name))).ToList(); + var cates3 = GlobalConfig.WxCatList.Where(c => selectCate2.Any(c2 => c.f_cat_id == c2.cat_id)).ToList(); + //foreach (var cate3 in cates3) + //{ + // cmbCat3.Items.Add(cate3.name); + //} + cmbCateFilter3.Items.AddRange(cates3.Select(c => c.name).ToArray()); + } + + private void cmbCateFilter3_TextChanged(object sender, EventArgs e) + { + //var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCat1.Text.Trim()); + //var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); + //var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCat1.Text.Trim()); + //var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList(); + //var cate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCat1.Text.Trim()); + } + + private void btnFilterBound_Click(object sender, EventArgs e) { var boundMax = txtFilterBoundMax.Text.Trim().ParseToInt(); @@ -5023,6 +5097,15 @@ namespace TemuKJD.WXForms.ProductForms return result; } + public static string searchProductWithTitle(ShopLoginInfo shop, string urlEncodeTitle) + { + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/searchProduct?" + + "token=&lang=zh_CN&pageSize=20&productStatus[]=-1&productSource=[1,16,32]&searchSource=1&useNew=true&pageNum=1&status[]=-1&title=" + urlEncodeTitle; + string refere = "https://store.weixin.qq.com/shop/goods/list"; + var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, refere); + return result; + } + public static string getUploadTempImgAuth(ShopLoginInfo shop, int uploadScene = 3) { string url = "https://store.weixin.qq.com/shop-faas/mmecchannelspicture/cgi/getUploadTempImgAuth?token=&lang=zh_CN&uploadScene=" + uploadScene; diff --git a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs index f64ae0e..362f666 100644 --- a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs @@ -404,7 +404,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat3.DropDownWidth = 1; this.cmbCat3.FormattingEnabled = true; this.cmbCat3.IntegralHeight = false; - this.cmbCat3.Location = new System.Drawing.Point(733, 5); + this.cmbCat3.Location = new System.Drawing.Point(733, 7); this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat3.Name = "cmbCat3"; this.cmbCat3.Size = new System.Drawing.Size(151, 25); @@ -432,7 +432,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat2.DropDownWidth = 1; this.cmbCat2.FormattingEnabled = true; this.cmbCat2.IntegralHeight = false; - this.cmbCat2.Location = new System.Drawing.Point(525, 5); + this.cmbCat2.Location = new System.Drawing.Point(525, 7); this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat2.Name = "cmbCat2"; this.cmbCat2.Size = new System.Drawing.Size(151, 25); @@ -460,7 +460,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat1.DropDownWidth = 1; this.cmbCat1.FormattingEnabled = true; this.cmbCat1.IntegralHeight = false; - this.cmbCat1.Location = new System.Drawing.Point(298, 5); + this.cmbCat1.Location = new System.Drawing.Point(298, 7); this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat1.Name = "cmbCat1"; this.cmbCat1.Size = new System.Drawing.Size(151, 25); @@ -520,7 +520,7 @@ namespace TemuKJD.WXForms.ProductForms "安全+未校验", "安全商品", "未校验"}); - this.cmbWxSafe.Location = new System.Drawing.Point(71, 40); + this.cmbWxSafe.Location = new System.Drawing.Point(71, 42); this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbWxSafe.Name = "cmbWxSafe"; this.cmbWxSafe.Size = new System.Drawing.Size(151, 25); @@ -543,7 +543,7 @@ namespace TemuKJD.WXForms.ProductForms // this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cmbGroupFilter.FormattingEnabled = true; - this.cmbGroupFilter.Location = new System.Drawing.Point(934, 7); + this.cmbGroupFilter.Location = new System.Drawing.Point(934, 5); this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbGroupFilter.Name = "cmbGroupFilter"; this.cmbGroupFilter.Size = new System.Drawing.Size(151, 25); @@ -564,7 +564,7 @@ namespace TemuKJD.WXForms.ProductForms "机会商品", "以图搜品", "外部数据"}); - this.cmbSourceType.Location = new System.Drawing.Point(733, 40); + this.cmbSourceType.Location = new System.Drawing.Point(733, 42); this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbSourceType.Name = "cmbSourceType"; this.cmbSourceType.Size = new System.Drawing.Size(151, 25); diff --git a/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs index 379e6fc..6ba3a90 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs @@ -703,7 +703,7 @@ namespace TemuKJD.WXForms.ShopForms return result; } - public static string CheckShopLogin(ShopLoginInfo shop, string refere = "https://mms.pinduoduo.com/home/") + public static string CheckShopLogin(ShopLoginInfo shop, string refere = "https://store.weixin.qq.com/shop/home") { string url = "https://store.weixin.qq.com/shop-faas/mmecnodebase/reachDiolog/getBizNotifyConfig?token=&lang=zh_CN"; string body = @"{""path"":""https://store.weixin.qq.com/shop/home""}"; diff --git a/TEMUKJD/WXForms/TalkForms/WxOrderListForm.Designer.cs b/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.Designer.cs similarity index 60% rename from TEMUKJD/WXForms/TalkForms/WxOrderListForm.Designer.cs rename to TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.Designer.cs index 2aa40f8..5d04333 100644 --- a/TEMUKJD/WXForms/TalkForms/WxOrderListForm.Designer.cs +++ b/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.Designer.cs @@ -1,7 +1,7 @@  namespace TemuKJD.WXForms.TalkForms { - partial class WxOrderListForm + partial class BuyerOrderListForm { /// /// Required designer variable. @@ -29,6 +29,7 @@ namespace TemuKJD.WXForms.TalkForms /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); @@ -37,37 +38,18 @@ namespace TemuKJD.WXForms.TalkForms System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WxOrderListForm)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BuyerOrderListForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.btnCheck = new DevComponents.DotNetBar.PanelEx(); + this.btnRefresh = new DevComponents.DotNetBar.PanelEx(); this.btnStopStop = new DevComponents.DotNetBar.PanelEx(); - this.lblCurrentShop = new System.Windows.Forms.Label(); - this.btnSelect = new DevComponents.DotNetBar.PanelEx(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.btnSearch = new DevComponents.DotNetBar.PanelEx(); - this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); - this.label17 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.txtOrderSn = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); + this.btnAddBuyler = new DevComponents.DotNetBar.PanelEx(); + this.btnDel = new DevComponents.DotNetBar.PanelEx(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); - this.pbLoading = new System.Windows.Forms.PictureBox(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); this.dgvDbProduct = new TemuKJD.UserComponent.DataGridViewEx(); - this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); - this.dtpStartTime = new System.Windows.Forms.DateTimePicker(); - this.dtpEndTime = new System.Windows.Forms.DateTimePicker(); - this.txtMobile = new System.Windows.Forms.TextBox(); - this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colOrderSn = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -75,42 +57,51 @@ namespace TemuKJD.WXForms.TalkForms this.colMainImg = new System.Windows.Forms.DataGridViewImageColumn(); this.colProductInfo = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colRealPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.col_skc_id = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colMainCate = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.col_cat_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colCatBound = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.col_ext_code = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colStyleCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colGroup = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colPriceText = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colExtCodePrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn(); - this.colAddTimes = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colSelectTotalCount = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colBuyerMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colOrderStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.col_notes = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colHeadWords = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colEndWords = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colFissionWords = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colGetType = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colSpProdType = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colWxSafe = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colAddTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colMdyTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn(); - this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn(); - this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn(); + this.pbLoading = new System.Windows.Forms.PictureBox(); + this.dgvBuyer = new TemuKJD.UserComponent.DataGridViewEx(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colBuyerId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dgvBuyerName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colBuyerNick = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colVisit = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.chkOnlyShowCurrentShop = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.lblCurrentShop = new System.Windows.Forms.Label(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.btnFilter = new DevComponents.DotNetBar.PanelEx(); + this.label3 = new System.Windows.Forms.Label(); + this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); + this.label17 = new System.Windows.Forms.Label(); + this.txtMobile = new System.Windows.Forms.TextBox(); + this.txtOrderSn = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.dtpStartTime = new System.Windows.Forms.DateTimePicker(); + this.label14 = new System.Windows.Forms.Label(); + this.dtpEndTime = new System.Windows.Forms.DateTimePicker(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); - this.tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dgvDbProduct)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvBuyer)).BeginInit(); + this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // splitContainer1 @@ -124,10 +115,12 @@ namespace TemuKJD.WXForms.TalkForms // // splitContainer1.Panel1 // + this.splitContainer1.Panel1.Controls.Add(this.btnCheck); + this.splitContainer1.Panel1.Controls.Add(this.btnRefresh); this.splitContainer1.Panel1.Controls.Add(this.btnStopStop); - this.splitContainer1.Panel1.Controls.Add(this.lblCurrentShop); - this.splitContainer1.Panel1.Controls.Add(this.btnSelect); - this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel1); + this.splitContainer1.Panel1.Controls.Add(this.btnSearch); + this.splitContainer1.Panel1.Controls.Add(this.btnAddBuyler); + this.splitContainer1.Panel1.Controls.Add(this.btnDel); // // splitContainer1.Panel2 // @@ -136,15 +129,63 @@ namespace TemuKJD.WXForms.TalkForms this.splitContainer1.SplitterDistance = 74; this.splitContainer1.TabIndex = 1; // + // btnCheck + // + this.btnCheck.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnCheck.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnCheck.DisabledBackColor = System.Drawing.Color.Empty; + this.btnCheck.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCheck.Location = new System.Drawing.Point(269, 16); + this.btnCheck.Name = "btnCheck"; + this.btnCheck.Size = new System.Drawing.Size(98, 25); + this.btnCheck.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnCheck.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCheck.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCheck.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnCheck.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnCheck.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnCheck.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnCheck.Style.GradientAngle = 90; + this.btnCheck.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnCheck.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnCheck.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnCheck.TabIndex = 918; + this.btnCheck.Text = "检测选中买手"; + this.btnCheck.Click += new System.EventHandler(this.btnCheck_Click); + // + // btnRefresh + // + this.btnRefresh.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnRefresh.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnRefresh.DisabledBackColor = System.Drawing.Color.Empty; + this.btnRefresh.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnRefresh.Location = new System.Drawing.Point(165, 16); + this.btnRefresh.Name = "btnRefresh"; + this.btnRefresh.Size = new System.Drawing.Size(98, 25); + this.btnRefresh.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnRefresh.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRefresh.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRefresh.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnRefresh.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnRefresh.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnRefresh.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnRefresh.Style.GradientAngle = 90; + this.btnRefresh.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnRefresh.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRefresh.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRefresh.TabIndex = 899; + this.btnRefresh.Text = "刷新买手号"; + this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); + // // btnStopStop // this.btnStopStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnStopStop.CanvasColor = System.Drawing.SystemColors.Control; this.btnStopStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnStopStop.DisabledBackColor = System.Drawing.Color.Empty; - this.btnStopStop.Location = new System.Drawing.Point(982, 9); + this.btnStopStop.Location = new System.Drawing.Point(1350, 16); this.btnStopStop.Name = "btnStopStop"; - this.btnStopStop.Size = new System.Drawing.Size(76, 25); + this.btnStopStop.Size = new System.Drawing.Size(66, 25); this.btnStopStop.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnStopStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); this.btnStopStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); @@ -159,95 +200,18 @@ namespace TemuKJD.WXForms.TalkForms this.btnStopStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; this.btnStopStop.TabIndex = 878; this.btnStopStop.Text = "停止查询"; - this.btnStopStop.Visible = false; this.btnStopStop.Click += new System.EventHandler(this.btnStopStop_Click); // - // lblCurrentShop - // - this.lblCurrentShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.lblCurrentShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.lblCurrentShop.ForeColor = System.Drawing.Color.DarkOrange; - this.lblCurrentShop.Location = new System.Drawing.Point(1094, 45); - this.lblCurrentShop.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.lblCurrentShop.Name = "lblCurrentShop"; - this.lblCurrentShop.Size = new System.Drawing.Size(326, 17); - this.lblCurrentShop.TabIndex = 718; - this.lblCurrentShop.Text = "当前店铺:"; - this.lblCurrentShop.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // btnSelect - // - this.btnSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnSelect.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSelect.DisabledBackColor = System.Drawing.Color.Empty; - this.btnSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSelect.Location = new System.Drawing.Point(1336, 9); - this.btnSelect.Name = "btnSelect"; - this.btnSelect.Size = new System.Drawing.Size(84, 25); - this.btnSelect.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnSelect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSelect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSelect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnSelect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnSelect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnSelect.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnSelect.Style.GradientAngle = 90; - this.btnSelect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnSelect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSelect.TabIndex = 647; - this.btnSelect.Text = "添加选中商品"; - this.btnSelect.Visible = false; - this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click); - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tableLayoutPanel1.ColumnCount = 10; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25.00225F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25.00225F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 24.99475F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25.00074F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.Controls.Add(this.txtMobile, 3, 0); - this.tableLayoutPanel1.Controls.Add(this.btnSearch, 8, 0); - this.tableLayoutPanel1.Controls.Add(this.pnlEmpty, 9, 0); - this.tableLayoutPanel1.Controls.Add(this.txtOrderSn, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.label3, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.dtpEndTime, 7, 0); - this.tableLayoutPanel1.Controls.Add(this.dtpStartTime, 5, 0); - this.tableLayoutPanel1.Controls.Add(this.label14, 6, 0); - this.tableLayoutPanel1.Controls.Add(this.label2, 4, 0); - this.tableLayoutPanel1.Controls.Add(this.label17, 2, 0); - this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 4); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 3; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33444F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33445F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33112F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(972, 105); - this.tableLayoutPanel1.TabIndex = 679; - // // btnSearch // - this.btnSearch.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty; this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSearch.Location = new System.Drawing.Point(851, 5); + this.btnSearch.Location = new System.Drawing.Point(1226, 16); this.btnSearch.Name = "btnSearch"; - this.btnSearch.Size = new System.Drawing.Size(65, 25); + this.btnSearch.Size = new System.Drawing.Size(118, 25); this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -260,86 +224,56 @@ namespace TemuKJD.WXForms.TalkForms this.btnSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnSearch.TabIndex = 643; - this.btnSearch.Text = "搜索订单"; + this.btnSearch.Text = "刷新订单"; this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); // - // pnlEmpty + // btnAddBuyler // - this.pnlEmpty.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control; - this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty; - this.pnlEmpty.Location = new System.Drawing.Point(922, 5); - this.pnlEmpty.Name = "pnlEmpty"; - this.pnlEmpty.Size = new System.Drawing.Size(46, 25); - this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; - this.pnlEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.pnlEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.pnlEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.pnlEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.pnlEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.pnlEmpty.Style.GradientAngle = 90; - this.pnlEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.pnlEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.pnlEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.pnlEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.pnlEmpty.TabIndex = 431; - this.pnlEmpty.Text = "清空"; - this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click); + this.btnAddBuyler.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnAddBuyler.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnAddBuyler.DisabledBackColor = System.Drawing.Color.Empty; + this.btnAddBuyler.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnAddBuyler.Location = new System.Drawing.Point(10, 16); + this.btnAddBuyler.Name = "btnAddBuyler"; + this.btnAddBuyler.Size = new System.Drawing.Size(98, 25); + this.btnAddBuyler.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnAddBuyler.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnAddBuyler.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnAddBuyler.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnAddBuyler.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnAddBuyler.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnAddBuyler.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnAddBuyler.Style.GradientAngle = 90; + this.btnAddBuyler.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnAddBuyler.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnAddBuyler.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnAddBuyler.TabIndex = 889; + this.btnAddBuyler.Text = "扫码添加买手"; + this.btnAddBuyler.Click += new System.EventHandler(this.btnAddBuyler_Click); // - // label17 + // btnDel // - this.label17.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(209, 9); - this.label17.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(56, 17); - this.label17.TabIndex = 811; - this.label17.Text = "手机号:"; - // - // label14 - // - this.label14.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(633, 9); - this.label14.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(68, 17); - this.label14.TabIndex = 784; - this.label14.Text = "结束时间:"; - // - // label2 - // - this.label2.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(415, 9); - this.label2.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(68, 17); - this.label2.TabIndex = 426; - this.label2.Text = "开始时间:"; - // - // txtOrderSn - // - this.txtOrderSn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtOrderSn.Location = new System.Drawing.Point(59, 6); - this.txtOrderSn.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); - this.txtOrderSn.Name = "txtOrderSn"; - this.txtOrderSn.Size = new System.Drawing.Size(144, 23); - this.txtOrderSn.TabIndex = 427; - // - // label3 - // - this.label3.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(3, 9); - this.label3.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(56, 17); - this.label3.TabIndex = 428; - this.label3.Text = "订单号:"; + this.btnDel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnDel.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnDel.DisabledBackColor = System.Drawing.Color.Empty; + this.btnDel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnDel.Location = new System.Drawing.Point(373, 16); + this.btnDel.Name = "btnDel"; + this.btnDel.Size = new System.Drawing.Size(98, 25); + this.btnDel.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnDel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnDel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnDel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnDel.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnDel.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnDel.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnDel.Style.GradientAngle = 90; + this.btnDel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnDel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnDel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnDel.TabIndex = 891; + this.btnDel.Text = "删除选中买手"; + this.btnDel.Click += new System.EventHandler(this.btnDel_Click); // // splitContainer2 // @@ -351,8 +285,7 @@ namespace TemuKJD.WXForms.TalkForms // // splitContainer2.Panel1 // - this.splitContainer2.Panel1.Controls.Add(this.pbLoading); - this.splitContainer2.Panel1.Controls.Add(this.dgvDbProduct); + this.splitContainer2.Panel1.Controls.Add(this.splitContainer3); this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0); // // splitContainer2.Panel2 @@ -363,16 +296,27 @@ namespace TemuKJD.WXForms.TalkForms this.splitContainer2.SplitterDistance = 579; this.splitContainer2.TabIndex = 0; // - // pbLoading + // splitContainer3 // - this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; - this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbLoading.Location = new System.Drawing.Point(694, 264); - this.pbLoading.Name = "pbLoading"; - this.pbLoading.Size = new System.Drawing.Size(50, 50); - this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pbLoading.TabIndex = 7; - this.pbLoading.TabStop = false; + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer3.Location = new System.Drawing.Point(4, 0); + this.splitContainer3.Name = "splitContainer3"; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.dgvDbProduct); + this.splitContainer3.Panel1.Controls.Add(this.pbLoading); + this.splitContainer3.Panel1.Controls.Add(this.dgvBuyer); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.chkOnlyShowCurrentShop); + this.splitContainer3.Panel2.Controls.Add(this.lblCurrentShop); + this.splitContainer3.Panel2.Controls.Add(this.tableLayoutPanel1); + this.splitContainer3.Size = new System.Drawing.Size(1430, 579); + this.splitContainer3.SplitterDistance = 372; + this.splitContainer3.TabIndex = 8; // // dgvDbProduct // @@ -394,7 +338,7 @@ namespace TemuKJD.WXForms.TalkForms this.dgvDbProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.dgvDbProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvDbProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.colSelect, + this.colCheck, this.colShopId, this.colShopName, this.colOrderSn, @@ -402,100 +346,29 @@ namespace TemuKJD.WXForms.TalkForms this.colMainImg, this.colProductInfo, this.colRealPrice, - this.col_skc_id, - this.colMainCate, - this.col_cat_name, - this.colCatBound, - this.col_ext_code, - this.colStyleCode, - this.colGroup, - this.colPriceText, - this.colExtCodePrice, - this.colEdit, - this.colAddTimes, - this.colSelectTotalCount, - this.colSaleCount, + this.colBuyerMessage, + this.colOrderStatus, this.col_notes, - this.colHeadWords, - this.colEndWords, - this.colFissionWords, - this.colGetType, - this.colSpProdType, - this.colWxSafe, - this.colAddTime, - this.colMdyTime, - this.col_edit, - this.col_delete, - this.col_select_product}); - this.dgvDbProduct.Dock = System.Windows.Forms.DockStyle.Fill; - this.dgvDbProduct.Location = new System.Drawing.Point(4, 0); + this.colEdit}); + this.dgvDbProduct.Location = new System.Drawing.Point(6, 342); this.dgvDbProduct.MultiSelectCheckBox = true; this.dgvDbProduct.Name = "dgvDbProduct"; this.dgvDbProduct.ReadOnly = true; this.dgvDbProduct.RowTemplate.Height = 23; - this.dgvDbProduct.Size = new System.Drawing.Size(1430, 579); + this.dgvDbProduct.Size = new System.Drawing.Size(354, 212); this.dgvDbProduct.TabIndex = 6; + this.dgvDbProduct.Visible = false; this.dgvDbProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDbProduct_CellContentClick); this.dgvDbProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvDbProduct_Scroll); // - // ucSplitPage1 + // colCheck // - this.ucSplitPage1.CurrentPage = 1; - this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; - this.ucSplitPage1.IsShowPageSize = true; - this.ucSplitPage1.Location = new System.Drawing.Point(985, 0); - this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); - this.ucSplitPage1.Name = "ucSplitPage1"; - this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); - this.ucSplitPage1.PageSize = 100; - this.ucSplitPage1.Size = new System.Drawing.Size(453, 25); - this.ucSplitPage1.TabIndex = 6; - this.ucSplitPage1.TotalPage = 1; - // - // statusBar - // - this.statusBar.BackColor = System.Drawing.Color.White; - this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; - this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.statusBar.Location = new System.Drawing.Point(0, 0); - this.statusBar.Margin = new System.Windows.Forms.Padding(0); - this.statusBar.Name = "statusBar"; - this.statusBar.Size = new System.Drawing.Size(1438, 25); - this.statusBar.TabIndex = 5; - // - // dtpStartTime - // - this.dtpStartTime.Anchor = System.Windows.Forms.AnchorStyles.None; - this.dtpStartTime.Location = new System.Drawing.Point(486, 6); - this.dtpStartTime.Name = "dtpStartTime"; - this.dtpStartTime.Size = new System.Drawing.Size(141, 23); - this.dtpStartTime.TabIndex = 812; - // - // dtpEndTime - // - this.dtpEndTime.Anchor = System.Windows.Forms.AnchorStyles.None; - this.dtpEndTime.Location = new System.Drawing.Point(704, 6); - this.dtpEndTime.Name = "dtpEndTime"; - this.dtpEndTime.Size = new System.Drawing.Size(141, 23); - this.dtpEndTime.TabIndex = 813; - // - // txtMobile - // - this.txtMobile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtMobile.Location = new System.Drawing.Point(265, 6); - this.txtMobile.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); - this.txtMobile.Name = "txtMobile"; - this.txtMobile.Size = new System.Drawing.Size(144, 23); - this.txtMobile.TabIndex = 428; - // - // colSelect - // - this.colSelect.FillWeight = 26F; - 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.colCheck.FillWeight = 26F; + this.colCheck.HeaderText = "选"; + this.colCheck.Name = "colCheck"; + this.colCheck.ReadOnly = true; + this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; // // colShopId // @@ -549,227 +422,382 @@ namespace TemuKJD.WXForms.TalkForms this.colRealPrice.HeaderText = "实收款/优惠信息"; this.colRealPrice.Name = "colRealPrice"; this.colRealPrice.ReadOnly = true; - this.colRealPrice.Visible = false; // - // col_skc_id - // - this.col_skc_id.HeaderText = "SKC Id"; - this.col_skc_id.Name = "col_skc_id"; - this.col_skc_id.ReadOnly = true; - this.col_skc_id.Visible = false; - // - // colMainCate + // colBuyerMessage // dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colMainCate.DefaultCellStyle = dataGridViewCellStyle5; - this.colMainCate.FillWeight = 50F; - this.colMainCate.HeaderText = "主类目"; - this.colMainCate.Name = "colMainCate"; - this.colMainCate.ReadOnly = true; + this.colBuyerMessage.DefaultCellStyle = dataGridViewCellStyle5; + this.colBuyerMessage.HeaderText = "卖家/收货信息"; + this.colBuyerMessage.Name = "colBuyerMessage"; + this.colBuyerMessage.ReadOnly = true; // - // col_cat_name + // colOrderStatus // - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.col_cat_name.DefaultCellStyle = dataGridViewCellStyle6; - this.col_cat_name.FillWeight = 50F; - this.col_cat_name.HeaderText = "类目"; - this.col_cat_name.Name = "col_cat_name"; - this.col_cat_name.ReadOnly = true; - // - // colCatBound - // - this.colCatBound.FillWeight = 50F; - this.colCatBound.HeaderText = "类目保证金"; - this.colCatBound.Name = "colCatBound"; - this.colCatBound.ReadOnly = true; - // - // col_ext_code - // - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.col_ext_code.DefaultCellStyle = dataGridViewCellStyle7; - this.col_ext_code.HeaderText = "货号"; - this.col_ext_code.Name = "col_ext_code"; - this.col_ext_code.ReadOnly = true; - this.col_ext_code.Visible = false; - // - // colStyleCode - // - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colStyleCode.DefaultCellStyle = dataGridViewCellStyle8; - this.colStyleCode.HeaderText = "资料编码/真实上家"; - this.colStyleCode.Name = "colStyleCode"; - this.colStyleCode.ReadOnly = true; - this.colStyleCode.Visible = false; - // - // colGroup - // - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colGroup.DefaultCellStyle = dataGridViewCellStyle9; - this.colGroup.HeaderText = "分组"; - this.colGroup.Name = "colGroup"; - this.colGroup.ReadOnly = true; - this.colGroup.Visible = false; - // - // colPriceText - // - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colPriceText.DefaultCellStyle = dataGridViewCellStyle10; - this.colPriceText.FillWeight = 65F; - this.colPriceText.HeaderText = "母店价格"; - this.colPriceText.Name = "colPriceText"; - this.colPriceText.ReadOnly = true; - // - // colExtCodePrice - // - this.colExtCodePrice.FillWeight = 60F; - this.colExtCodePrice.HeaderText = "货号价格"; - this.colExtCodePrice.Name = "colExtCodePrice"; - this.colExtCodePrice.ReadOnly = true; - this.colExtCodePrice.Visible = false; - // - // colEdit - // - this.colEdit.FillWeight = 40F; - this.colEdit.HeaderText = "编辑"; - this.colEdit.Name = "colEdit"; - this.colEdit.ReadOnly = true; - this.colEdit.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colEdit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colEdit.Visible = false; - // - // colAddTimes - // - this.colAddTimes.FillWeight = 52F; - this.colAddTimes.HeaderText = "单店认领次数"; - this.colAddTimes.Name = "colAddTimes"; - this.colAddTimes.ReadOnly = true; - this.colAddTimes.Visible = false; - // - // colSelectTotalCount - // - this.colSelectTotalCount.FillWeight = 52F; - this.colSelectTotalCount.HeaderText = "认领总数"; - this.colSelectTotalCount.Name = "colSelectTotalCount"; - this.colSelectTotalCount.ReadOnly = true; - this.colSelectTotalCount.Visible = false; - // - // colSaleCount - // - this.colSaleCount.FillWeight = 60F; - this.colSaleCount.HeaderText = "销量"; - this.colSaleCount.Name = "colSaleCount"; - this.colSaleCount.ReadOnly = true; - this.colSaleCount.Visible = false; + this.colOrderStatus.FillWeight = 50F; + this.colOrderStatus.HeaderText = "订单状态"; + this.colOrderStatus.Name = "colOrderStatus"; + this.colOrderStatus.ReadOnly = true; // // col_notes // - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.col_notes.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.col_notes.DefaultCellStyle = dataGridViewCellStyle6; this.col_notes.FillWeight = 70F; this.col_notes.HeaderText = "备注"; this.col_notes.Name = "col_notes"; this.col_notes.ReadOnly = true; - this.col_notes.Visible = false; // - // colHeadWords + // colEdit // - dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colHeadWords.DefaultCellStyle = dataGridViewCellStyle12; - this.colHeadWords.HeaderText = "标题前缀"; - this.colHeadWords.Name = "colHeadWords"; - this.colHeadWords.ReadOnly = true; - this.colHeadWords.Visible = false; + this.colEdit.FillWeight = 40F; + this.colEdit.HeaderText = "编辑备注"; + this.colEdit.Name = "colEdit"; + this.colEdit.ReadOnly = true; + this.colEdit.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colEdit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; // - // colEndWords + // pbLoading // - dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colEndWords.DefaultCellStyle = dataGridViewCellStyle13; - this.colEndWords.HeaderText = "标题后缀"; - this.colEndWords.Name = "colEndWords"; - this.colEndWords.ReadOnly = true; - this.colEndWords.Visible = false; + this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbLoading.Location = new System.Drawing.Point(161, 248); + this.pbLoading.Name = "pbLoading"; + this.pbLoading.Size = new System.Drawing.Size(50, 50); + this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbLoading.TabIndex = 7; + this.pbLoading.TabStop = false; // - // colFissionWords + // dgvBuyer // - dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colFissionWords.DefaultCellStyle = dataGridViewCellStyle14; - this.colFissionWords.HeaderText = "裂变词"; - this.colFissionWords.Name = "colFissionWords"; - this.colFissionWords.ReadOnly = true; - this.colFissionWords.Visible = false; + this.dgvBuyer.AllowUserToAddRows = false; + this.dgvBuyer.AllowUserToDeleteRows = false; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvBuyer.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + this.dgvBuyer.AutoRowNumber = true; + this.dgvBuyer.BackgroundColor = System.Drawing.Color.White; + this.dgvBuyer.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvBuyer.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; + this.dgvBuyer.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvBuyer.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colSelect, + this.colBuyerId, + this.dgvBuyerName, + this.colBuyerNick, + this.colShopNotes, + this.colVisit, + this.colLoginStatus, + this.colMessage}); + this.dgvBuyer.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvBuyer.Location = new System.Drawing.Point(0, 0); + this.dgvBuyer.MultiSelectCheckBox = true; + this.dgvBuyer.Name = "dgvBuyer"; + this.dgvBuyer.ReadOnly = true; + this.dgvBuyer.RowHeadersWidth = 25; + this.dgvBuyer.RowTemplate.Height = 23; + this.dgvBuyer.Size = new System.Drawing.Size(372, 579); + this.dgvBuyer.TabIndex = 7; + this.dgvBuyer.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // - // colGetType + // colSelect // - dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colGetType.DefaultCellStyle = dataGridViewCellStyle15; - this.colGetType.FillWeight = 70F; - this.colGetType.HeaderText = "采集来源"; - this.colGetType.Name = "colGetType"; - this.colGetType.ReadOnly = true; - this.colGetType.Visible = false; + 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; // - // colSpProdType + // colBuyerId // - this.colSpProdType.FillWeight = 70F; - this.colSpProdType.HeaderText = "商品类型"; - this.colSpProdType.Name = "colSpProdType"; - this.colSpProdType.ReadOnly = true; - this.colSpProdType.Visible = false; + this.colBuyerId.HeaderText = "买手Id"; + this.colBuyerId.Name = "colBuyerId"; + this.colBuyerId.ReadOnly = true; + this.colBuyerId.Visible = false; + this.colBuyerId.Width = 55; // - // colWxSafe + // dgvBuyerName // - this.colWxSafe.FillWeight = 70F; - this.colWxSafe.HeaderText = "微信安检"; - this.colWxSafe.Name = "colWxSafe"; - this.colWxSafe.ReadOnly = true; + this.dgvBuyerName.FillWeight = 150F; + this.dgvBuyerName.HeaderText = "买手名称"; + this.dgvBuyerName.Name = "dgvBuyerName"; + this.dgvBuyerName.ReadOnly = true; + this.dgvBuyerName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.dgvBuyerName.Visible = false; + this.dgvBuyerName.Width = 80; // - // colAddTime + // colBuyerNick // - dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colAddTime.DefaultCellStyle = dataGridViewCellStyle16; - this.colAddTime.FillWeight = 70F; - this.colAddTime.HeaderText = "入库时间"; - this.colAddTime.Name = "colAddTime"; - this.colAddTime.ReadOnly = true; + this.colBuyerNick.HeaderText = "买手昵称"; + this.colBuyerNick.Name = "colBuyerNick"; + this.colBuyerNick.ReadOnly = true; + this.colBuyerNick.Width = 80; // - // colMdyTime + // colShopNotes // - dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colMdyTime.DefaultCellStyle = dataGridViewCellStyle17; - this.colMdyTime.FillWeight = 70F; - this.colMdyTime.HeaderText = "更新时间"; - this.colMdyTime.Name = "colMdyTime"; - this.colMdyTime.ReadOnly = true; + this.colShopNotes.HeaderText = "备注"; + this.colShopNotes.Name = "colShopNotes"; + this.colShopNotes.ReadOnly = true; + this.colShopNotes.Width = 80; // - // col_edit + // colVisit // - this.col_edit.FillWeight = 42F; - this.col_edit.HeaderText = "详情"; - this.col_edit.Name = "col_edit"; - this.col_edit.ReadOnly = true; - this.col_edit.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.col_edit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.col_edit.Visible = false; + this.colVisit.HeaderText = "访问"; + this.colVisit.Name = "colVisit"; + this.colVisit.ReadOnly = true; + this.colVisit.Visible = false; + this.colVisit.Width = 38; // - // col_delete + // colLoginStatus // - this.col_delete.FillWeight = 42F; - this.col_delete.HeaderText = "删除"; - this.col_delete.Name = "col_delete"; - this.col_delete.ReadOnly = true; - this.col_delete.Visible = false; + 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; // - // col_select_product + // colMessage // - this.col_select_product.FillWeight = 42F; - this.col_select_product.HeaderText = "认领"; - this.col_select_product.Name = "col_select_product"; - this.col_select_product.ReadOnly = true; - this.col_select_product.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.col_select_product.Visible = false; + this.colMessage.HeaderText = "消息"; + this.colMessage.Name = "colMessage"; + this.colMessage.ReadOnly = true; // - // WxOrderListForm + // chkOnlyShowCurrentShop + // + this.chkOnlyShowCurrentShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.chkOnlyShowCurrentShop.AutoSize = true; + this.chkOnlyShowCurrentShop.Location = new System.Drawing.Point(27, 422); + this.chkOnlyShowCurrentShop.Name = "chkOnlyShowCurrentShop"; + this.chkOnlyShowCurrentShop.Size = new System.Drawing.Size(135, 21); + this.chkOnlyShowCurrentShop.TabIndex = 885; + this.chkOnlyShowCurrentShop.Text = "仅显示当前店铺订单"; + this.chkOnlyShowCurrentShop.UseVisualStyleBackColor = true; + this.chkOnlyShowCurrentShop.Visible = false; + // + // lblCurrentShop + // + this.lblCurrentShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.lblCurrentShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblCurrentShop.ForeColor = System.Drawing.Color.DarkOrange; + this.lblCurrentShop.Location = new System.Drawing.Point(176, 422); + this.lblCurrentShop.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblCurrentShop.Name = "lblCurrentShop"; + this.lblCurrentShop.Size = new System.Drawing.Size(214, 17); + this.lblCurrentShop.TabIndex = 718; + this.lblCurrentShop.Text = "当前店铺:"; + this.lblCurrentShop.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.lblCurrentShop.Visible = false; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tableLayoutPanel1.ColumnCount = 10; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25.00225F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25.00225F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 24.99475F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25.00074F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.Controls.Add(this.btnFilter, 9, 1); + this.tableLayoutPanel1.Controls.Add(this.label3, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.pnlEmpty, 8, 1); + this.tableLayoutPanel1.Controls.Add(this.label17, 2, 1); + this.tableLayoutPanel1.Controls.Add(this.txtMobile, 3, 1); + this.tableLayoutPanel1.Controls.Add(this.txtOrderSn, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.label2, 4, 1); + this.tableLayoutPanel1.Controls.Add(this.dtpStartTime, 5, 1); + this.tableLayoutPanel1.Controls.Add(this.label14, 6, 1); + this.tableLayoutPanel1.Controls.Add(this.dtpEndTime, 7, 1); + this.tableLayoutPanel1.Location = new System.Drawing.Point(21, 449); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 3; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33444F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33445F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33112F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(888, 105); + this.tableLayoutPanel1.TabIndex = 679; + this.tableLayoutPanel1.Visible = false; + // + // btnFilter + // + this.btnFilter.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.btnFilter.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnFilter.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnFilter.DisabledBackColor = System.Drawing.Color.Empty; + this.btnFilter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnFilter.Location = new System.Drawing.Point(815, 40); + this.btnFilter.Name = "btnFilter"; + this.btnFilter.Size = new System.Drawing.Size(69, 25); + this.btnFilter.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnFilter.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnFilter.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnFilter.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnFilter.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnFilter.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnFilter.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnFilter.Style.GradientAngle = 90; + this.btnFilter.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnFilter.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnFilter.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnFilter.TabIndex = 647; + this.btnFilter.Text = "过滤订单"; + this.btnFilter.Visible = false; + // + // label3 + // + this.label3.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(3, 44); + this.label3.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(56, 17); + this.label3.TabIndex = 428; + this.label3.Text = "订单号:"; + this.label3.Visible = false; + // + // pnlEmpty + // + this.pnlEmpty.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control; + this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty; + this.pnlEmpty.Location = new System.Drawing.Point(763, 40); + this.pnlEmpty.Name = "pnlEmpty"; + this.pnlEmpty.Size = new System.Drawing.Size(46, 25); + this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.pnlEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.pnlEmpty.Style.GradientAngle = 90; + this.pnlEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.pnlEmpty.TabIndex = 431; + this.pnlEmpty.Text = "清空"; + this.pnlEmpty.Visible = false; + this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click); + // + // label17 + // + this.label17.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(187, 44); + this.label17.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(56, 17); + this.label17.TabIndex = 811; + this.label17.Text = "手机号:"; + this.label17.Visible = false; + // + // txtMobile + // + this.txtMobile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtMobile.Location = new System.Drawing.Point(243, 41); + this.txtMobile.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.txtMobile.Name = "txtMobile"; + this.txtMobile.Size = new System.Drawing.Size(122, 23); + this.txtMobile.TabIndex = 428; + this.txtMobile.Visible = false; + // + // txtOrderSn + // + this.txtOrderSn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtOrderSn.Location = new System.Drawing.Point(59, 41); + this.txtOrderSn.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.txtOrderSn.Name = "txtOrderSn"; + this.txtOrderSn.Size = new System.Drawing.Size(122, 23); + this.txtOrderSn.TabIndex = 427; + this.txtOrderSn.Visible = false; + // + // label2 + // + this.label2.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(371, 44); + this.label2.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(68, 17); + this.label2.TabIndex = 426; + this.label2.Text = "开始时间:"; + this.label2.Visible = false; + // + // dtpStartTime + // + this.dtpStartTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.dtpStartTime.Location = new System.Drawing.Point(442, 41); + this.dtpStartTime.Name = "dtpStartTime"; + this.dtpStartTime.Size = new System.Drawing.Size(119, 23); + this.dtpStartTime.TabIndex = 812; + this.dtpStartTime.Visible = false; + // + // label14 + // + this.label14.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(567, 44); + this.label14.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(68, 17); + this.label14.TabIndex = 784; + this.label14.Text = "结束时间:"; + this.label14.Visible = false; + // + // dtpEndTime + // + this.dtpEndTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.dtpEndTime.Location = new System.Drawing.Point(638, 41); + this.dtpEndTime.Name = "dtpEndTime"; + this.dtpEndTime.Size = new System.Drawing.Size(119, 23); + this.dtpEndTime.TabIndex = 813; + this.dtpEndTime.Visible = false; + // + // ucSplitPage1 + // + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; + this.ucSplitPage1.IsShowPageSize = true; + this.ucSplitPage1.Location = new System.Drawing.Point(985, 0); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.ucSplitPage1.PageSize = 100; + this.ucSplitPage1.Size = new System.Drawing.Size(453, 25); + this.ucSplitPage1.TabIndex = 6; + this.ucSplitPage1.TotalPage = 1; + this.ucSplitPage1.Visible = false; + // + // 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(1438, 25); + this.statusBar.TabIndex = 5; + // + // BuyerOrderListForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(1440, 720); @@ -777,7 +805,7 @@ namespace TemuKJD.WXForms.TalkForms this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.KeyPreview = true; - this.Name = "WxOrderListForm"; + this.Name = "BuyerOrderListForm"; this.Text = "产品数据库"; this.TitleText = "产品数据库"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.WXUserProdListForm_FormClosing); @@ -790,14 +818,20 @@ namespace TemuKJD.WXForms.TalkForms this.splitContainer1.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); this.splitContainer2.Panel1.ResumeLayout(false); this.splitContainer2.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); this.splitContainer2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel2.ResumeLayout(false); + this.splitContainer3.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); + this.splitContainer3.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dgvDbProduct)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvBuyer)).EndInit(); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); this.ResumeLayout(false); } @@ -815,16 +849,21 @@ namespace TemuKJD.WXForms.TalkForms private UserComponent.DataGridViewEx dgvDbProduct; private System.Windows.Forms.PictureBox pbLoading; private DevComponents.DotNetBar.PanelEx btnSearch; - private DevComponents.DotNetBar.PanelEx btnSelect; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.Label label14; private DevComponents.DotNetBar.PanelEx btnStopStop; private System.Windows.Forms.Label label17; - private System.Windows.Forms.Label lblCurrentShop; private System.Windows.Forms.DateTimePicker dtpStartTime; private System.Windows.Forms.DateTimePicker dtpEndTime; private System.Windows.Forms.TextBox txtMobile; - private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private UserComponent.UcCheckBox chkOnlyShowCurrentShop; + public System.Windows.Forms.Label lblCurrentShop; + private DevComponents.DotNetBar.PanelEx btnFilter; + private DevComponents.DotNetBar.PanelEx btnAddBuyler; + private DevComponents.DotNetBar.PanelEx btnDel; + private System.Windows.Forms.SplitContainer splitContainer3; + private UserComponent.DataGridViewEx dgvBuyer; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; private System.Windows.Forms.DataGridViewTextBoxColumn colOrderSn; @@ -832,30 +871,19 @@ namespace TemuKJD.WXForms.TalkForms private System.Windows.Forms.DataGridViewImageColumn colMainImg; private System.Windows.Forms.DataGridViewTextBoxColumn colProductInfo; private System.Windows.Forms.DataGridViewTextBoxColumn colRealPrice; - private System.Windows.Forms.DataGridViewTextBoxColumn col_skc_id; - private System.Windows.Forms.DataGridViewTextBoxColumn colMainCate; - private System.Windows.Forms.DataGridViewTextBoxColumn col_cat_name; - private System.Windows.Forms.DataGridViewTextBoxColumn colCatBound; - private System.Windows.Forms.DataGridViewTextBoxColumn col_ext_code; - private System.Windows.Forms.DataGridViewTextBoxColumn colStyleCode; - private System.Windows.Forms.DataGridViewTextBoxColumn colGroup; - private System.Windows.Forms.DataGridViewTextBoxColumn colPriceText; - private System.Windows.Forms.DataGridViewTextBoxColumn colExtCodePrice; - private System.Windows.Forms.DataGridViewLinkColumn colEdit; - private System.Windows.Forms.DataGridViewTextBoxColumn colAddTimes; - private System.Windows.Forms.DataGridViewTextBoxColumn colSelectTotalCount; - private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount; + private System.Windows.Forms.DataGridViewTextBoxColumn colBuyerMessage; + private System.Windows.Forms.DataGridViewTextBoxColumn colOrderStatus; private System.Windows.Forms.DataGridViewTextBoxColumn col_notes; - private System.Windows.Forms.DataGridViewTextBoxColumn colHeadWords; - private System.Windows.Forms.DataGridViewTextBoxColumn colEndWords; - private System.Windows.Forms.DataGridViewTextBoxColumn colFissionWords; - private System.Windows.Forms.DataGridViewTextBoxColumn colGetType; - private System.Windows.Forms.DataGridViewTextBoxColumn colSpProdType; - private System.Windows.Forms.DataGridViewTextBoxColumn colWxSafe; - private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime; - private System.Windows.Forms.DataGridViewTextBoxColumn colMdyTime; - private System.Windows.Forms.DataGridViewLinkColumn col_edit; - private System.Windows.Forms.DataGridViewLinkColumn col_delete; - private System.Windows.Forms.DataGridViewLinkColumn col_select_product; + private System.Windows.Forms.DataGridViewLinkColumn colEdit; + private DevComponents.DotNetBar.PanelEx btnRefresh; + private DevComponents.DotNetBar.PanelEx btnCheck; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colBuyerId; + private System.Windows.Forms.DataGridViewTextBoxColumn dgvBuyerName; + private System.Windows.Forms.DataGridViewTextBoxColumn colBuyerNick; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; + private System.Windows.Forms.DataGridViewLinkColumn colVisit; + private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus; + private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.cs b/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.cs new file mode 100644 index 0000000..f0d25fe --- /dev/null +++ b/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.cs @@ -0,0 +1,478 @@ +using AllBase; +using AllBase.Helper; +using AllBase.Model.Param; +using AllBase.Model.Result; +using AllBase.Model.Result.PDDResult; +using AllBase.Model.Result.WXResult; +using NaiBa.Util; +using NaiBa.Util.Extension; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.BaseForms; +using TemuKJD.BLL; +using TemuKJD.Extension; +using TemuKJD.PDDForms.ProductSelectForms; +using TemuKJD.PDDForms.ShopForms; +using TemuKJD.ToolForms; +using Work; + +namespace TemuKJD.WXForms.TalkForms +{ + public partial class BuyerOrderListForm : BaseGeneralForm + { + private static BuyerOrderListForm instance = null; + public static BuyerOrderListForm Instance { get { if (instance == null || instance.IsDisposed || instance.Disposing) instance = new BuyerOrderListForm(); return instance; } } + ShopLoginInfo currentShop { get { return this.lblCurrentShop.Tag as ShopLoginInfo; } } + ConcurrentList lstWxOrderInfoLite { get; set; } = new ConcurrentList(); + public CancellationTokenSource cancellationTokenSource { get; set; } = new CancellationTokenSource(); + public bool loadComplate = false; + public bool firstVisible = false; + public DateTime nextGetOrderTime = DateTime.Now; + + public BuyerOrderListForm() + { + InitializeComponent(); + instance = this; + } + + private void ProductListForm_Load(object sender, EventArgs e) + { + dtpStartTime.Value = DateTime.Now.Date.AddMonths(-1); + dtpEndTime.Value = DateTime.Now.Date.AddDays(1).AddSeconds(-1); + dgvBuyer.AddSelectorColumn("colSelect"); + + GetBuyer(); + AutoGetOrder(); + loadComplate = true; + } + + private void ProductListForm_VisibleChanged(object sender, EventArgs e) + { + } + + void GetBuyer() + { + var ids = dgvBuyer.Rows.Cast().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true).Select(s => s.Cells["colBuyerId"].Value.ParseToString()).ToList(); + Invoke(new Action(() => { pbLoading.Visible = true; })); + + Task.Run(() => + { + var url = BaseClass.BuildPDDObjString("user/get_buyer"); + var data = UserLogin.GetSignaturex(); + data += "&page_size=200"; + + var result = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(result) || !result.Contains("\"code\":200")) + result = GetHtml.PostUtf8(url, data); + + if (result.Contains("\"code\":200")) + { + List loginInfoLst = JsonHelper.DeserializeJsonToList(JsonHelper.JObjectParse(result)["data"].ParseToString()); + GlobalConfig.BuyerLoginList.Clear(); + GlobalConfig.BuyerLoginList.AddRange(loginInfoLst); + + Invoke(new Action(() => + { + dgvBuyer.Rows.Clear(); + })); + + foreach (var buyer in GlobalConfig.BuyerLoginList) + { + Invoke(new Action(() => + { + var rowIndex = this.dgvBuyer.Rows.Add( + ids.Contains(buyer.buyer_id), + buyer.buyer_id, + buyer.buyer_name, + buyer.buyer_nick, + buyer.notes, + "访问", + buyer.status + ); + })); + } + } + + Invoke(new Action(() => + { + pbLoading.Visible = false; + })); + }); + } + + void AutoGetOrder() + { + Task.Run(() => + { + while (true) + { + if (DateTime.Now > nextGetOrderTime) + { + nextGetOrderTime = DateTime.Now.AddMinutes(30); + GetOrder(); + } + Thread.Sleep(1000); + Invoke(new Action(() => + { + var ticks = nextGetOrderTime - DateTime.Now; + btnSearch.Text = "刷新订单 " + ticks.Minutes + ":" + ticks.Seconds; + })); + } + }); + } + + void GetOrder() + { + cancellationTokenSource = new CancellationTokenSource(); + Task.Run(() => + { + foreach (var shop in GlobalConfig.ShopLoginList) + { + + } + }, cancellationTokenSource.Token); + } + + private void btnSearch_Click(object sender, EventArgs e) + { + nextGetOrderTime = DateTime.Now.AddMinutes(30); + GetOrder(); + } + + private void pnlEmpty_Click(object sender, EventArgs e) + { + this.txtOrderSn.Text = ""; + } + + private void dgvDbProduct_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvDbProduct.Columns[e.ColumnIndex].HeaderText; + //var dbId = dgvDbProduct.Rows[e.RowIndex].Cells["col_db_id"].Value.ParseToString(); + //var dbProduct = lstTemuDbProduct.FirstOrDefault(p => p.id.ToString() == dbId); + + switch (headerText) + { + case "详情": + case "编辑/详情": + //PDDDBProdEditForm editForm = new PDDDBProdEditForm(dbProduct); + //if (BaseClass.MainPath != "binxixi") + //{ + // editForm.pnlSkuOption.Visible = false; + // editForm.txtProductName.ReadOnly = true; + // editForm.txtExtCode.ReadOnly = true; + // editForm.lblSkcId.Text = "仓库编码"; + //} + //editForm.ShowDialog(); + //dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes; + //dgvDbProduct.Rows[e.RowIndex].Cells["col_ext_code"].Value = dbProduct.ext_code; + //dgvDbProduct.Rows[e.RowIndex].Cells["colHeadWords"].Value = dbProduct.head_words; + //dgvDbProduct.Rows[e.RowIndex].Cells["colEndWords"].Value = dbProduct.end_words; + //dgvDbProduct.Rows[e.RowIndex].Cells["colFissionWords"].Value = dbProduct.fission_words; + //dgvDbProduct.Rows[e.RowIndex].Cells["col_product_name"].Value = dbProduct.product_name; + //dgvDbProduct.Rows[e.RowIndex].Cells["colSkuReplaceImgUrl"].Value = dbProduct.sku_img_replace_url; + break; + case "主图": + ShowImgForm imgFrom = new ShowImgForm(dgvDbProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString().Replace("?imageView2/2/w/90/h/90", "")); + imgFrom.ShowDialog(); + break; + case "": + dgvDbProduct.Rows[e.RowIndex].Cells["colCheck"].Value = !(bool)dgvDbProduct.Rows[e.RowIndex].Cells["colCheck"].Value; + break; + default: + break; + } + } + + private void dgvDbProduct_Scroll(object sender, ScrollEventArgs e) + { + } + + private void btnStopStop_Click(object sender, EventArgs e) + { + if (cancellationTokenSource != null) + cancellationTokenSource.Cancel(); + Task.Run(() => + { + Thread.Sleep(3000); + Invoke(new Action(() => + { + if (cancellationTokenSource == null || cancellationTokenSource.IsCancellationRequested) + pbLoading.Visible = false; + })); + }); + } + + private void PDDDBProdListForm_KeyDown(object sender, KeyEventArgs e) + { + } + + private void PDDDBProdListForm_KeyUp(object sender, KeyEventArgs e) + { + } + + private void WXUserProdListForm_FormClosing(object sender, FormClosingEventArgs e) + { + this.Hide(); + e.Cancel = true; + } + + private void btnAddBuyler_Click(object sender, EventArgs e) + { + PddMobileLoginForm buyerLoginForm = new PddMobileLoginForm(null); + buyerLoginForm.openType = EnumOpenType.login; + buyerLoginForm.InitUrl = "https://mobile.yangkeduo.com/login.html?from=https%3A%2F%2Fmobile.yangkeduo.com%2Fpersonal.html"; + buyerLoginForm.ShowDialog(); + GetBuyer(); + } + + private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + + string headerText = dgvBuyer.Columns[e.ColumnIndex].HeaderText; + var buyerId = dgvBuyer.Rows[e.RowIndex].Cells["colBuyerId"].Value.ParseToString(); + var buyer = GlobalConfig.BuyerLoginList.FirstOrDefault(p => p.buyer_id.ToString() == buyerId); + + switch (headerText) + { + case "状态": + case "登录": + CheckBuyerLogin(new List { buyer }, false); + if (buyer.status == "在线") + { + PddMobileLoginForm shopLoginForm = new PddMobileLoginForm(buyer); + shopLoginForm.openType = EnumOpenType.manage; + shopLoginForm.WindowState = FormWindowState.Maximized; + shopLoginForm.InitUrl = "https://mobile.yangkeduo.com"; + shopLoginForm.Show(); + } + else + { + PddMobileLoginForm shopLoginForm = new PddMobileLoginForm(buyer); + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.InitUrl = "https://mobile.yangkeduo.com/login.html?from=https%3A%2F%2Fmobile.yangkeduo.com%2Fpersonal.html"; + shopLoginForm.ShowDialog(); + GetBuyer(); + } + break; + case "访问": + { + PddMobileLoginForm shopLoginForm = new PddMobileLoginForm(buyer); + shopLoginForm.openType = EnumOpenType.manage; + shopLoginForm.WindowState = FormWindowState.Maximized; + shopLoginForm.InitUrl = "https://mobile.yangkeduo.com"; + shopLoginForm.Show(); + } + break; + case "详情": + case "编辑/详情": + //PDDDBProdEditForm editForm = new PDDDBProdEditForm(dbProduct); + //if (BaseClass.MainPath != "binxixi") + //{ + // editForm.pnlSkuOption.Visible = false; + // editForm.txtProductName.ReadOnly = true; + // editForm.txtExtCode.ReadOnly = true; + // editForm.lblSkcId.Text = "仓库编码"; + //} + //editForm.ShowDialog(); + //dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes; + //dgvDbProduct.Rows[e.RowIndex].Cells["col_ext_code"].Value = dbProduct.ext_code; + //dgvDbProduct.Rows[e.RowIndex].Cells["colHeadWords"].Value = dbProduct.head_words; + //dgvDbProduct.Rows[e.RowIndex].Cells["colEndWords"].Value = dbProduct.end_words; + //dgvDbProduct.Rows[e.RowIndex].Cells["colFissionWords"].Value = dbProduct.fission_words; + //dgvDbProduct.Rows[e.RowIndex].Cells["col_product_name"].Value = dbProduct.product_name; + //dgvDbProduct.Rows[e.RowIndex].Cells["colSkuReplaceImgUrl"].Value = dbProduct.sku_img_replace_url; + break; + case "": + case "全选": + dgvBuyer.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvBuyer.Rows[e.RowIndex].Cells["colSelect"].Value; + break; + default: + break; + } + } + + public void CheckBuyerLogin(List checkBuyers, bool isShowProgress = true) + { + for (int i = 0; i < checkBuyers.Count; i++) + { + var buyer = GlobalConfig.BuyerLoginList.FirstOrDefault(v => v.buyer_id == checkBuyers[i].buyer_id); + var buys = GlobalConfig.BuyerLoginList.Where(v => v.buyer_id == checkBuyers[i].buyer_id).ToList(); + if (buyer == null) + continue; + + // 先从服务端取最新cookie + var url = BaseClass.BuildPDDObjString("user/get_buyer"); + var data = UserLogin.GetSignaturex(); + data += "&buyer_id=" + buyer.buyer_id; + data += "&page_size=1"; + var result = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(result) || !result.Contains("\"code\":200")) + result = GetHtml.PostUtf8(url, data); + if (!result.Contains("\"code\":200")) + continue; + List loginInfoLst = JsonHelper.DeserializeJsonToList(JsonHelper.JObjectParse(result)["data"].ParseToString()); + + var serverBuyer = loginInfoLst.FirstOrDefault(); + if (buyer != null && serverBuyer != null) + { + buyer.cookie = serverBuyer.cookie; + foreach (var buy in buys) + { + buy.cookie = serverBuyer.cookie; + } + } + + if (buyer != null) + { + var loginResult = CheckBuyerLogin(buyer); + if (loginResult.Contains("\"success\":true") && !loginResult.Contains("\"login\":true")) + { + buyer.cookie = "[]"; + foreach (var buy in buys) + { + buy.status = "掉线"; + buy.cookie = "[]"; + } + } + else + { + foreach (var buy in buys) + { + buy.status = "在线"; + } + } + UpdateServerBuyerCookies(buyer); // 店铺cookie和状态写入服务端 + } + if (this.Created && isShowProgress) + { + this.Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在检测..."; + this.statusBar.pgbTaskProgress.Value = (i + 1); + this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + checkBuyers.Count; + })); + } + } + } + + public static string CheckBuyerLogin(BuyerLoginInfo buyer, string refere = "https://mobile.yangkeduo.com/goods.html") + { + string url = "https://mobile.yangkeduo.com/proxy/api/api/apollo/v3/user/me?pdduid=" + buyer.buyer_id; + return YkdHttpResponseBLL.YangkeduoGetResponse(buyer, url, refere); + } + + public static string UpdateServerBuyerCookies(BuyerLoginInfo buyer, string fromTool = null) + { + var url = BaseClass.BuildPDDObjString("user/mdy_buyer_cookie"); + var data = UserLogin.GetSignaturex() + + "&status=" + buyer.status + + "&cookie=" + GetHtml.UrlEncodeUtf8(buyer.cookie) + + "&buyer_id=" + buyer.buyer_id; + var result = GetHtml.PostUtf8(url, data); + if (!result.Contains("\"code\":200")) + result = GetHtml.PostUtf8(url, data); + return result; + } + + private void btnRefresh_Click(object sender, EventArgs e) + { + GetBuyer(); + } + + private void btnCheck_Click(object sender, EventArgs e) + { + var ids = dgvBuyer.Rows.Cast().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true).Select(s => s.Cells["colBuyerId"].Value.ParseToString()).ToList(); + var buyers = GlobalConfig.BuyerLoginList.Where(b => ids.Contains(b.buyer_id)).ToList(); + Task.Run(() => { + CheckBuyerLogin(buyers); + GetBuyer(); + }); + } + + private void btnDel_Click(object sender, EventArgs e) + { + if (BaseMsgForm.ShowConfirm("确定删除吗?删除后不可恢复!").DialogResult == DialogResult.Cancel) + return; + + var ids = dgvBuyer.Rows.Cast().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true).Select(s => s.Cells["colBuyerId"].Value.ParseToString()).ToList(); + var buyers = GlobalConfig.BuyerLoginList.Where(b => ids.Contains(b.buyer_id)).ToList(); + this.statusBar.pgbTaskProgress.Maximum = buyers.Count; + pbLoading.Visible = true; + + Task.Run(() => + { + int i = 0; + foreach (var buyer in buyers) + { + i++; + this.Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在删除..."; + this.statusBar.pgbTaskProgress.Value = i; + this.statusBar.pgbTaskProgress.Text = i + "/" + buyers.Count; + })); + + var url = BaseClass.BuildPDDObjString("user/del_buyer"); + var data = UserLogin.GetSignaturex() + + "&buyer_id=" + buyer.buyer_id; + var result = GetHtml.PostUtf8(url, data); + + Thread.Sleep(100); + } + this.Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "删除完成"; + this.statusBar.pgbTaskProgress.Value = buyers.Count; + this.statusBar.pgbTaskProgress.Text = buyers.Count + "/" + buyers.Count; + })); + GetBuyer(); + }); + } + } + + public class YkdBuyerOrder + { + + } + + public class WxOrder + { + // orderStatus:20待发货 0售后中 30已发货 + public static string OrderSeach(ShopLoginInfo shop, string orderId, string telNumber, int orderStatus = 20, int page = 1, string startTime="", string endTime="") + { + if (string.IsNullOrWhiteSpace(startTime)) + startTime = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date.AddMonths(-1)).ToString(); + if (string.IsNullOrWhiteSpace(endTime)) + endTime = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date).ToString(); + + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeorder/list/cgi/orderSearch?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/order/list"; + string body = @"{""isSearch"":true,""pageSize"":100,""overTime"":0,""pengingShipOneDay"":0,""pengingShipSixHour"":0,""expediteDelivery"":0," + + @"""stockoutPunishAlert"":0,""waybillStatus"":0,""pageNum"":1,""onAftersaleOrderExist"":0,""orderStatus"":" + orderStatus + + @",""page"":" + page + @",""orderId"":""" + orderId + @""",""orderTime"":{""type"":0,""time"":[" + startTime + @"," + endTime + @"]}," + + @"""telNumber"":""" + telNumber + @""",""title"":"""",""receiverName"":"""",""finderNickName"":"""",""merchantNotes"":""""," + + @"""merchantNotesTagColor"":0,""waybillId"":"""",""productCode"":"""",""inspectStatus"":"""",""finderWay"":0,""searchOrderType"":0," + + @"""payMethod"":0,""orderChannel"":0,""bulkbuyActivityId"":"""",""deliveryNegotiationFlag"":0,""transactionId"":""""," + + @"""startCreateTime"":" + startTime + @",""endCreateTime"":" + endTime + @"}"; + var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); + return result; + } + } +} diff --git a/TEMUKJD/WXForms/TalkForms/WxOrderListForm.resx b/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.resx similarity index 87% rename from TEMUKJD/WXForms/TalkForms/WxOrderListForm.resx rename to TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.resx index f3a5e74..53e7e5c 100644 --- a/TEMUKJD/WXForms/TalkForms/WxOrderListForm.resx +++ b/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.resx @@ -117,7 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + True @@ -141,79 +141,37 @@ True - + True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - + True True - + True - + True - + True - + True - + True - + True - + True - - True - - - True - - - True - - + True diff --git a/TEMUKJD/WXForms/TalkForms/WxOrderListForm.cs b/TEMUKJD/WXForms/TalkForms/WxOrderListForm.cs deleted file mode 100644 index bef1367..0000000 --- a/TEMUKJD/WXForms/TalkForms/WxOrderListForm.cs +++ /dev/null @@ -1,305 +0,0 @@ -using AllBase; -using AllBase.Helper; -using AllBase.Model.Param; -using AllBase.Model.Result; -using AllBase.Model.Result.PDDResult; -using AllBase.Model.Result.WXResult; -using NaiBa.Util; -using NaiBa.Util.Extension; -using Newtonsoft.Json.Linq; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Diagnostics; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Net; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Forms; -using TemuKJD.BaseForms; -using TemuKJD.BLL; -using TemuKJD.Extension; -using TemuKJD.PDDForms.ProductSelectForms; -using TemuKJD.ToolForms; -using Work; - -namespace TemuKJD.WXForms.TalkForms -{ - public partial class WxOrderListForm : BaseGeneralForm - { - private static WxOrderListForm instance = null; - public static WxOrderListForm Instance { get { if (instance == null || instance.IsDisposed || instance.Disposing) instance = new WxOrderListForm(); return instance; } } - ShopLoginInfo currentShop { get; set; } = null; - ConcurrentList lstTemuDbProduct { get; set; } = new ConcurrentList(); - public CancellationTokenSource cancellationTokenSource { get; set; } = new CancellationTokenSource(); - - public WxOrderListForm() - { - InitializeComponent(); - instance = this; - } - - private void ProductListForm_Load(object sender, EventArgs e) - { - btnSelect.Visible = true; - } - - private void btnSearch_Click(object sender, EventArgs e) - { - } - - Bitmap defaultBitmap = null; - void ShowDgvImg() - { - Task.Run(() => - { - foreach (DataGridViewRow row in this.dgvDbProduct.Rows) - { - if (row.Index > 0 && row.Cells["colMainImg"].Displayed == false) - { - Invoke(new Action(() => - { - try - { - row.Cells["colMainImg"].Value = defaultBitmap; - } - catch - { - } - })); - continue; - } - - if (row.Cells["colMainImg"].Value != null && row.Cells["colMainImg"].Value != defaultBitmap) - continue; - - Image image = null; - string imgUrl = row.Cells["colImgUrl"]?.Value.ParseToString(); - string getImgError = ""; - if (!string.IsNullOrWhiteSpace(imgUrl)) - image = GetHtml.GetUrlImg(imgUrl, out getImgError); - if (!string.IsNullOrEmpty(getImgError)) - //BaseMsgForm.ShowError("图片加载失败 " + getImgError); - image = TemuKJD.Properties.Resources.errpic; - - Invoke(new Action(() => - { - try - { - row.Cells["colMainImg"].Value = image; - } - catch - { - } - })); - } - }); - } - - private void ProductListForm_VisibleChanged(object sender, EventArgs e) - { - } - - private void pnlEmpty_Click(object sender, EventArgs e) - { - this.txtOrderSn.Text = ""; - } - - private void cmbCat1_SelectedIndexChanged(object sender, EventArgs e) - { - - } - - private void cmbCat2_SelectedIndexChanged(object sender, EventArgs e) - { - - } - - private void cmbCat3_SelectedIndexChanged(object sender, EventArgs e) - { - - } - - private void cmbCat1_MultiSelectChanged(object sender, EventArgs e) - { - } - - private void cmbCat2_MultiSelectChanged(object sender, EventArgs e) - { - } - - private void cmbCat3_MultiSelectChanged(object sender, EventArgs e) - { - //var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCat1.Text.Trim()); - //var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); - //var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCat1.Text.Trim()); - //var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList(); - //var cate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCat1.Text.Trim()); - } - - private void dgvDbProduct_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.ColumnIndex < 0 || e.RowIndex < 0) - return; - string headerText = dgvDbProduct.Columns[e.ColumnIndex].HeaderText; - var dbId = dgvDbProduct.Rows[e.RowIndex].Cells["col_db_id"].Value.ParseToString(); - var dbProduct = lstTemuDbProduct.FirstOrDefault(p => p.id.ToString() == dbId); - - switch (headerText) - { - case "详情": - case "编辑/详情": - //PDDDBProdEditForm editForm = new PDDDBProdEditForm(dbProduct); - //if (BaseClass.MainPath != "binxixi") - //{ - // editForm.pnlSkuOption.Visible = false; - // editForm.txtProductName.ReadOnly = true; - // editForm.txtExtCode.ReadOnly = true; - // editForm.lblSkcId.Text = "仓库编码"; - //} - //editForm.ShowDialog(); - //dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes; - //dgvDbProduct.Rows[e.RowIndex].Cells["col_ext_code"].Value = dbProduct.ext_code; - //dgvDbProduct.Rows[e.RowIndex].Cells["colHeadWords"].Value = dbProduct.head_words; - //dgvDbProduct.Rows[e.RowIndex].Cells["colEndWords"].Value = dbProduct.end_words; - //dgvDbProduct.Rows[e.RowIndex].Cells["colFissionWords"].Value = dbProduct.fission_words; - //dgvDbProduct.Rows[e.RowIndex].Cells["col_product_name"].Value = dbProduct.product_name; - //dgvDbProduct.Rows[e.RowIndex].Cells["colSkuReplaceImgUrl"].Value = dbProduct.sku_img_replace_url; - break; - case "主图": - ShowImgForm imgFrom = new ShowImgForm(dgvDbProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString().Replace("?imageView2/2/w/90/h/90", "")); - imgFrom.ShowDialog(); - break; - case "认领": - //Task.Run(() => { SelectProduct(new KJDDBProduct[] { dbProduct }); }); - break; - case "资料编码/真实上家": - try - { - string url = ""; - if (string.IsNullOrEmpty(dbProduct.real_spu_id) || string.IsNullOrEmpty(dbProduct.real_coid)) - url = "https://sc.scm121.com/manage/goods/qualitySupplier/goodsDetail/" + dbProduct.spu_id + "?itemCoId=" + dbProduct.skc_id + "&noBack=true"; - else - url = "https://sc.scm121.com/manage/goods/qualitySupplier/goodsDetail/" + dbProduct.real_spu_id + "?itemCoId=" + dbProduct.real_coid + "&noBack=true"; - Process.Start(new ProcessStartInfo(url) - { - UseShellExecute = true - }); - } - catch - { - // 可能需要手动指定浏览器路径 - Process.Start(new ProcessStartInfo("https://www.baidu.com") { UseShellExecute = true }); - } - break; - case "": - dgvDbProduct.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvDbProduct.Rows[e.RowIndex].Cells["colSelect"].Value; - //rowIndex1 = rowIndex2; - //rowIndex2 = e.RowIndex; - //if (IsShiftDown) - //{ - // if (rowIndex1 > -1 && rowIndex2 > -1) - // { - // try - // { - // if (rowIndex1 > rowIndex2) - // { - // for (int i = rowIndex2; i <= rowIndex1; i++) - // { - // dgvDbProduct.Rows[i].Cells["colSelect"].Value = dgvDbProduct.Rows[rowIndex1].Cells["colSelect"].Value; - // } - // } - // else - // { - // for (int i = rowIndex1; i <= rowIndex2; i++) - // { - // dgvDbProduct.Rows[i].Cells["colSelect"].Value = dgvDbProduct.Rows[rowIndex1].Cells["colSelect"].Value; - // } - // } - // } - // catch - // { - // } - // //rowIndex1 = -1; - // //rowIndex2 = -1; - // } - //} - break; - default: - break; - } - } - - private void DeleteProduct(string dbId, bool isUpdate = true) - { - var url = BaseClass.BuildPDDObjString("product/del_db_product"); - var data = UserLogin.GetSignaturex() + - "&db_id=" + dbId; - var html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - { - BaseMsgForm.ShowError("删除商品失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg")); - return; - } - else - { - } - } - - private void btnSelect_Click(object sender, EventArgs e) - { - } - - private void dgvDbProduct_Scroll(object sender, ScrollEventArgs e) - { - ShowDgvImg(); - } - - private void btnStopStop_Click(object sender, EventArgs e) - { - if (cancellationTokenSource != null) - cancellationTokenSource.Cancel(); - Task.Run(() => - { - Thread.Sleep(3000); - Invoke(new Action(() => - { - if (cancellationTokenSource == null || cancellationTokenSource.IsCancellationRequested) - pbLoading.Visible = false; - })); - }); - } - - private void PDDDBProdListForm_KeyDown(object sender, KeyEventArgs e) - { - //switch (e.KeyCode) - //{ - // case Keys.Shift: - // case Keys.ShiftKey: - // case Keys.LShiftKey: - // case Keys.RShiftKey: - // IsShiftDown = true; - // break; - //} - } - - private void PDDDBProdListForm_KeyUp(object sender, KeyEventArgs e) - { - } - - private void WXUserProdListForm_FormClosing(object sender, FormClosingEventArgs e) - { - this.Hide(); - e.Cancel = true; - } - } -} diff --git a/TEMUKJD/WXForms/TalkForms/WxTalkForm.cs b/TEMUKJD/WXForms/TalkForms/WxTalkForm.cs index 7875a1b..1c15871 100644 --- a/TEMUKJD/WXForms/TalkForms/WxTalkForm.cs +++ b/TEMUKJD/WXForms/TalkForms/WxTalkForm.cs @@ -79,7 +79,7 @@ namespace TemuKJD.WXForms.TalkForms public static Dictionary dicRowColor = new Dictionary(); public List LstTagShop = new List(); - public WxOrderListForm WxOrderListForm = null; + public BuyerOrderListForm orderListForm = null; public int LocationXY = 0; public int LocationSize = 200; @@ -169,6 +169,7 @@ namespace TemuKJD.WXForms.TalkForms SetMainBrowserUrl(GlobalConfig.ShopLoginList.FirstOrDefault()); LoadShop(); + InitOrderForm(); // 加载店铺确认默认店铺后再初始化订单列表读取 InitAutoExecute(); Invoke(new Action(() => { @@ -335,13 +336,6 @@ namespace TemuKJD.WXForms.TalkForms } }); - WxOrderListForm = new WxOrderListForm(); - WxOrderListForm.TopLevel = false; - WxOrderListForm.FormBorderStyle = FormBorderStyle.None; - WxOrderListForm.Dock = DockStyle.Fill; - tabPage3.Controls.Add(WxOrderListForm); - WxOrderListForm.Show(); - //var _1688AddressForm = new GetAddressForm() { AddressType = "1688" }; //_1688AddressForm.cmbType.Enabled = false; //_1688AddressForm.cmbTypeFilter.Enabled = false; @@ -352,6 +346,24 @@ namespace TemuKJD.WXForms.TalkForms //_1688AddressForm.Show(); } + + void InitOrderForm() + { + Invoke(new Action(() => + { + + orderListForm = new BuyerOrderListForm(); + orderListForm.TopLevel = false; + orderListForm.FormBorderStyle = FormBorderStyle.None; + orderListForm.Dock = DockStyle.Fill; + orderListForm.lblCurrentShop.Text = currentShop?.ShopAccount; + orderListForm.lblCurrentShop.Tag = currentShop; + tabPage3.Controls.Add(orderListForm); + orderListForm.Show(); + + })); + } + void ClosePopWindow() { Task.Run(() => @@ -1339,6 +1351,10 @@ namespace TemuKJD.WXForms.TalkForms } currentShop = shop; + orderListForm.lblCurrentShop.Text = currentShop.ShopAccount; + orderListForm.lblCurrentShop.Tag = currentShop; + + shop.Chat.Dock = DockStyle.Fill; shop.Chat.BringToFront(); btnPrev.BringToFront();