diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index ed75c5f..c738e9a 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 851; + public static int VersionCount = 855; //public static int VersionCount = 613; /// diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs index a91ec0d..e747452 100644 --- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs +++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs @@ -11,6 +11,7 @@ using System.Data; using System.Drawing; using System.IO; using System.Linq; +using System.Threading; using System.Web; using System.Web.Security; @@ -249,7 +250,7 @@ namespace KJD_Web.BLL.BXX return "{\"code\":50000,\"msg\":\"校验失败\"}"; var version = RegexUtils.GetStringQuery(ref inputData, "version").ParseToInt(); - if (version < 823) + if (version < (System.Configuration.ConfigurationManager.ConnectionStrings["LimitVersion"]?.ConnectionString).ParseToInt()) return "{\"code\":1,\"msg\":\"当前版本过于陈旧,请立即升级新版\"}"; var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'","\\'"); @@ -295,6 +296,20 @@ namespace KJD_Web.BLL.BXX where += " and p.product_get_type ='" + product_get_type + "'"; if (!string.IsNullOrEmpty(wx_safe_status)) where += " and p.wx_safe_status in ('" + wx_safe_status.Replace(",", "','") + "')"; + //if (!string.IsNullOrEmpty(wx_safe_status)) + //{ + // where += " and ("; + // var index = 0; + // foreach (var status in wx_safe_status.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + // { + // index++; + // if (index == 1) + // where += " p.wx_safe_status='" + status + "'"; + // else + // where += " or p.wx_safe_status='" + status + "'"; + // } + // where += ") "; + //} if (!string.IsNullOrEmpty(special_prod_type)) where += " and p.special_prod_type ='" + special_prod_type + "'"; @@ -344,7 +359,11 @@ namespace KJD_Web.BLL.BXX } sql += where; - var count = mySql.ExecuteRowCount(sql); + var count = 0; + if (isDetail) + count = 1; + else + count = mySql.ExecuteRowCount(sql); DataTable dt; if (count == 0) @@ -769,7 +788,10 @@ namespace KJD_Web.BLL.BXX int count = prod_count; if (!is_not_count) + { count = mySql.ExecuteRowCount(sql); + Thread.Sleep(1500); + } DataTable dt; if (count == 0 && !is_not_count) @@ -783,16 +805,17 @@ namespace KJD_Web.BLL.BXX //where子句 sql += where; - sql += " ORDER BY RAND()"; - sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; + //sql += " ORDER BY RAND()"; + //sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; - //var limit = RandomUtils.GetId(count - page_size); - //sql += " limit " + limit + "," + page_size; + var limit = RandomUtils.GetId(count - page_size); + sql += " limit " + limit + "," + page_size; dt = mySql.ExecuteDataTable(sql); if (!string.IsNullOrEmpty(mySql.Message) || dt == null) { - mySql.Close(); + mySql.Close(); + Thread.Sleep(1000); return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"data\":[],\"count\":" + 0 + "}"; } @@ -812,6 +835,7 @@ namespace KJD_Web.BLL.BXX } mySql.Close(); + Thread.Sleep(500); if (dt != null) { try diff --git a/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs b/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs index 8c975a8..c686930 100644 --- a/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs +++ b/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs @@ -20,9 +20,11 @@ namespace KJD_Web.BLL.DYXD { var mobile = RegexUtils.GetStringQuery(ref inputData, "mobile")?.Replace("'", "\\'"); var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + var version = RegexUtils.GetStringQuery(ref inputData, "version").ParseToInt(); - if (version < 823) + if (version < (System.Configuration.ConfigurationManager.ConnectionStrings["LimitVersion"]?.ConnectionString).ParseToInt()) return "{\"code\":1,\"msg\":\"当前版本过于陈旧,请立即升级新版\"}"; + int r2 = 0; int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs index 4818011..cfce73c 100644 --- a/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs +++ b/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs @@ -20,9 +20,11 @@ namespace KJD_Web.BLL.WXXD { var mobile = RegexUtils.GetStringQuery(ref inputData, "mobile")?.Replace("'", "\\'"); var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + var version = RegexUtils.GetStringQuery(ref inputData, "version").ParseToInt(); - if (version < 823) + if (version < (System.Configuration.ConfigurationManager.ConnectionStrings["LimitVersion"]?.ConnectionString).ParseToInt()) return "{\"code\":1,\"msg\":\"当前版本过于陈旧,请立即升级新版\"}"; + int r2 = 0; int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); diff --git a/KJDService/KJD_WebService/Web.config b/KJDService/KJD_WebService/Web.config index cc474b3..89163a9 100644 --- a/KJDService/KJD_WebService/Web.config +++ b/KJDService/KJD_WebService/Web.config @@ -9,6 +9,7 @@ + diff --git a/TEMUKJD/Extension/DataGridViewExtension.cs b/TEMUKJD/Extension/DataGridViewExtension.cs index c41d014..b3da420 100644 --- a/TEMUKJD/Extension/DataGridViewExtension.cs +++ b/TEMUKJD/Extension/DataGridViewExtension.cs @@ -781,7 +781,15 @@ namespace TemuKJD.Extension while (isScroll && 1 == 1) Thread.Sleep(1); isScroll = true; - ShowDgvImg(dgv, new List { dgv.Rows[e.RowIndex] }, imgColumn, imgPathColumn, isSetHttpsHttp); + try + { + if (dgv.Rows.Count > e.RowIndex) + ShowDgvImg(dgv, new List { dgv.Rows[e.RowIndex] }, imgColumn, imgPathColumn, isSetHttpsHttp); + } + catch + { + + } isScroll = false; }); } diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs index 56e6601..176fb07 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -2327,7 +2327,7 @@ namespace TemuKJD.WXForms.ProductForms } catch (Exception ex) { - return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"修改主图失败 " + ex.Message + "\"}"; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"修改详情图失败 " + ex.Message + "\"}"; } } @@ -2719,7 +2719,7 @@ namespace TemuKJD.WXForms.ProductForms } catch (Exception ex) { - return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"修改主图失败 " + ex.Message + "\"}"; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"修改详情图失败 " + ex.Message + "\"}"; } } @@ -3223,7 +3223,7 @@ namespace TemuKJD.WXForms.ProductForms var imageBg = new Bitmap(imgWidth, imgHeight); if (image == null || !string.IsNullOrEmpty(getImgError)) { - errorMsg = "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"初始化主图上传失败 " + getImgError + "\"}"; + errorMsg = "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"初始化图片上传失败 " + getImgError + "\"}"; return ""; } try @@ -3247,7 +3247,7 @@ namespace TemuKJD.WXForms.ProductForms } catch (Exception ex) { - errorMsg = "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"修改主图失败 " + ex.Message + "\"}"; + errorMsg = "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"修改图片失败 " + ex.Message + "\"}"; return ""; } } @@ -3377,7 +3377,8 @@ namespace TemuKJD.WXForms.ProductForms { prodLst = GetRandomProductList(out prodCount, 1, Math.Min(50, addCount)); } - Thread.Sleep(Randomx.GetId(50, 100)); + //Thread.Sleep(Randomx.GetId(50, 100)); + Thread.Sleep(Randomx.GetId(250, 500)); } else { diff --git a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.Designer.cs index 5fc76a5..020818e 100644 --- a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.Designer.cs @@ -32,13 +32,13 @@ namespace TemuKJD.WXForms.ProductForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - 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 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(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); @@ -121,6 +121,7 @@ namespace TemuKJD.WXForms.ProductForms this.colProductCat = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSoldNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colUserNotes = new System.Windows.Forms.DataGridViewLinkColumn(); @@ -131,6 +132,9 @@ namespace TemuKJD.WXForms.ProductForms this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.txtFiltSaleNum = new System.Windows.Forms.TextBox(); + this.btnFiltSelect = new DevComponents.DotNetBar.PanelEx(); + this.label4 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -186,6 +190,9 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.ucGroupBoxEx3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx3.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx3.Controls.Add(this.label4); + this.ucGroupBoxEx3.Controls.Add(this.txtFiltSaleNum); + this.ucGroupBoxEx3.Controls.Add(this.btnFiltSelect); this.ucGroupBoxEx3.Controls.Add(this.panelEx3); this.ucGroupBoxEx3.Controls.Add(this.panelEx4); this.ucGroupBoxEx3.Controls.Add(this.btnDown); @@ -1008,19 +1015,19 @@ namespace TemuKJD.WXForms.ProductForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle8.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8; + 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))))); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9; + 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, @@ -1191,19 +1198,19 @@ namespace TemuKJD.WXForms.ProductForms // this.dgvSelectProduct.AllowUserToAddRows = false; this.dgvSelectProduct.AllowUserToDeleteRows = false; - dataGridViewCellStyle10.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; + 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))))); - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; + 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, @@ -1223,6 +1230,7 @@ namespace TemuKJD.WXForms.ProductForms this.colProductCat, this.colExtCode, this.colPrice, + this.colSoldNum, this.colMsg, this.colNotes, this.colUserNotes, @@ -1264,8 +1272,8 @@ namespace TemuKJD.WXForms.ProductForms // // colSupplierName // - dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5; this.colSupplierName.Frozen = true; this.colSupplierName.HeaderText = "店铺名称"; this.colSupplierName.Name = "colSupplierName"; @@ -1353,8 +1361,8 @@ namespace TemuKJD.WXForms.ProductForms // // colProductName // - dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductName.DefaultCellStyle = dataGridViewCellStyle13; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle6; this.colProductName.HeaderText = "商品标题"; this.colProductName.Name = "colProductName"; this.colProductName.ReadOnly = true; @@ -1362,8 +1370,8 @@ namespace TemuKJD.WXForms.ProductForms // // colProductCat // - dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductCat.DefaultCellStyle = dataGridViewCellStyle14; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductCat.DefaultCellStyle = dataGridViewCellStyle7; this.colProductCat.HeaderText = "商品类目"; this.colProductCat.Name = "colProductCat"; this.colProductCat.ReadOnly = true; @@ -1383,6 +1391,13 @@ namespace TemuKJD.WXForms.ProductForms this.colPrice.ReadOnly = true; this.colPrice.Width = 60; // + // colSoldNum + // + this.colSoldNum.HeaderText = "销量"; + this.colSoldNum.Name = "colSoldNum"; + this.colSoldNum.ReadOnly = true; + this.colSoldNum.Width = 60; + // // colMsg // this.colMsg.HeaderText = "状态"; @@ -1506,6 +1521,50 @@ namespace TemuKJD.WXForms.ProductForms this.panelEx1.Text = "停止当前操作"; this.panelEx1.Visible = false; // + // txtFiltSaleNum + // + this.txtFiltSaleNum.Location = new System.Drawing.Point(152, 31); + this.txtFiltSaleNum.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.txtFiltSaleNum.Name = "txtFiltSaleNum"; + this.txtFiltSaleNum.Size = new System.Drawing.Size(33, 23); + this.txtFiltSaleNum.TabIndex = 795; + this.txtFiltSaleNum.Text = "1"; + // + // btnFiltSelect + // + this.btnFiltSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnFiltSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnFiltSelect.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnFiltSelect.DisabledBackColor = System.Drawing.Color.Empty; + this.btnFiltSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnFiltSelect.Location = new System.Drawing.Point(32, 31); + this.btnFiltSelect.Name = "btnFiltSelect"; + this.btnFiltSelect.Size = new System.Drawing.Size(62, 23); + this.btnFiltSelect.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnFiltSelect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnFiltSelect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnFiltSelect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnFiltSelect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnFiltSelect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnFiltSelect.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnFiltSelect.Style.GradientAngle = 90; + this.btnFiltSelect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnFiltSelect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnFiltSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnFiltSelect.TabIndex = 794; + this.btnFiltSelect.Text = "批量选择"; + this.btnFiltSelect.Click += new System.EventHandler(this.btnFiltSelect_Click); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(96, 34); + this.label4.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(56, 17); + this.label4.TabIndex = 801; + this.label4.Text = "销量低于"; + // // WXProdPreSaleForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1522,6 +1581,7 @@ namespace TemuKJD.WXForms.ProductForms ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); this.ucGroupBoxEx3.ResumeLayout(false); + this.ucGroupBoxEx3.PerformLayout(); this.ucGroupBoxEx2.ResumeLayout(false); this.ucGroupBoxEx2.PerformLayout(); this.ucGroupBoxEx4.ResumeLayout(false); @@ -1616,6 +1676,11 @@ namespace TemuKJD.WXForms.ProductForms private DevComponents.DotNetBar.PanelEx panelEx2; private System.Windows.Forms.Label label3; private System.Windows.Forms.ComboBox cmbPreType; + private UserComponent.UcCheckBox chkFailDownProd; + private UserComponent.UcGroupBoxEx ucGroupBoxEx3; + private DevComponents.DotNetBar.PanelEx panelEx3; + private DevComponents.DotNetBar.PanelEx panelEx4; + private DevComponents.DotNetBar.PanelEx btnDown; private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId; private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; @@ -1633,16 +1698,15 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat; private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode; private System.Windows.Forms.DataGridViewTextBoxColumn colPrice; + private System.Windows.Forms.DataGridViewTextBoxColumn colSoldNum; private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; 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 UserComponent.UcCheckBox chkFailDownProd; - private UserComponent.UcGroupBoxEx ucGroupBoxEx3; - private DevComponents.DotNetBar.PanelEx panelEx3; - private DevComponents.DotNetBar.PanelEx panelEx4; - private DevComponents.DotNetBar.PanelEx btnDown; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtFiltSaleNum; + private DevComponents.DotNetBar.PanelEx btnFiltSelect; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs index 2840f99..83834c6 100644 --- a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs @@ -853,10 +853,16 @@ namespace TemuKJD.WXForms.ProductForms })); foreach (JObject prod in prodObjs["productList"]) { + var pStr = JsonHelper.SerializeObject(prod); Invoke(new Action(() => { decimal? price = null; try { price = prod["skuList"][0]["price"].ParseToDecimal() / 100; } catch { } + var prodId = prod["productId"].ParseToString(); + if (dgvSelectProduct.Rows.Cast().Any(r => r.Cells["colDraftId"].ParseToString() == prodId)) + { + + } var rowIndex = this.dgvSelectProduct.Rows.Add( false, @@ -876,7 +882,9 @@ namespace TemuKJD.WXForms.ProductForms (prod["recommendCategory"].IsJTokenNullOrEmpty() || prod["recommendCategory"]["categoryNames"].IsJTokenNullOrEmpty()) ? "" : string.Join(" >> ", prod["recommendCategory"]["categoryNames"].Select(s => s.ParseToString())), // 类目名称 prod["spuCode"].ParseToString(), - price, + //price, + prod["price"].ParseToDecimal() * 0.01m, + prod["soldNum"].ParseToInt(), "在售" + (prod["presaleTag"].ParseToInt() == 1 ? "[预售]" : ""), "", // 备注 "", @@ -1149,7 +1157,7 @@ namespace TemuKJD.WXForms.ProductForms } var downProdRst = WXPreSale.DownProd(shop, prodId.ParseToLong()); - System.Threading.Thread.Sleep(Randomx.GetId(100, 200)); + System.Threading.Thread.Sleep(Randomx.GetId(200, 500)); if (!downProdRst.Contains("\"code\":0")) { if (downProdRst.Contains("biz magic invalid")) @@ -1184,6 +1192,17 @@ namespace TemuKJD.WXForms.ProductForms } } } + + private void btnFiltSelect_Click(object sender, EventArgs e) + { + foreach(DataGridViewRow row in dgvSelectProduct.Rows) + { + if (row.Cells["colSoldNum"].Value.ParseToInt() >= txtFiltSaleNum.Text.Trim().ParseToInt()) + row.Cells["colCheck"].Value = false; + else + row.Cells["colCheck"].Value = true; + } + } } public class WXPreSale diff --git a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.resx b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.resx index 519f029..ac91840 100644 --- a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.resx +++ b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.resx @@ -201,6 +201,9 @@ True + + True + True