删除草稿箱,回收站等的商品

This commit is contained in:
wule_5900x committed 2026-03-28 19:37:31 +08:00
1 parent b2c152889a
commit a131da66c1
3 files changed
+397 -59

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 935;
public static int VersionCount = 936;
//public static int VersionCount = 613;
/// <summary>
+138 -50
View File
@@ -32,16 +32,19 @@ namespace TemuKJD.WXForms.ProductForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnSelectLimit2 = new DevComponents.DotNetBar.PanelEx();
this.btnSelectLimit1 = new DevComponents.DotNetBar.PanelEx();
this.btnBatchDel = new DevComponents.DotNetBar.PanelEx();
this.label4 = new System.Windows.Forms.Label();
this.txtFiltSaleNum = new System.Windows.Forms.TextBox();
@@ -140,6 +143,7 @@ namespace TemuKJD.WXForms.ProductForms
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.btnBatchRealDel = new DevComponents.DotNetBar.PanelEx();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -195,6 +199,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.btnBatchRealDel);
this.ucGroupBoxEx3.Controls.Add(this.btnSelectLimit2);
this.ucGroupBoxEx3.Controls.Add(this.btnSelectLimit1);
this.ucGroupBoxEx3.Controls.Add(this.btnBatchDel);
this.ucGroupBoxEx3.Controls.Add(this.label4);
this.ucGroupBoxEx3.Controls.Add(this.txtFiltSaleNum);
@@ -202,13 +209,61 @@ namespace TemuKJD.WXForms.ProductForms
this.ucGroupBoxEx3.Controls.Add(this.panelEx3);
this.ucGroupBoxEx3.Controls.Add(this.panelEx4);
this.ucGroupBoxEx3.Controls.Add(this.btnDown);
this.ucGroupBoxEx3.Location = new System.Drawing.Point(1030, 2);
this.ucGroupBoxEx3.Location = new System.Drawing.Point(995, 2);
this.ucGroupBoxEx3.Name = "ucGroupBoxEx3";
this.ucGroupBoxEx3.Size = new System.Drawing.Size(314, 165);
this.ucGroupBoxEx3.Size = new System.Drawing.Size(349, 165);
this.ucGroupBoxEx3.TabIndex = 668;
this.ucGroupBoxEx3.TabStop = false;
this.ucGroupBoxEx3.Text = "商品下架";
//
// btnSelectLimit2
//
this.btnSelectLimit2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSelectLimit2.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSelectLimit2.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSelectLimit2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSelectLimit2.Location = new System.Drawing.Point(32, 91);
this.btnSelectLimit2.Name = "btnSelectLimit2";
this.btnSelectLimit2.Size = new System.Drawing.Size(153, 23);
this.btnSelectLimit2.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSelectLimit2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSelectLimit2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSelectLimit2.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSelectLimit2.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSelectLimit2.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSelectLimit2.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSelectLimit2.Style.GradientAngle = 90;
this.btnSelectLimit2.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSelectLimit2.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSelectLimit2.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSelectLimit2.TabIndex = 840;
this.btnSelectLimit2.Text = "批量选择低风险规则上架";
this.btnSelectLimit2.Click += new System.EventHandler(this.btnSelectLimit2_Click);
//
// btnSelectLimit1
//
this.btnSelectLimit1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSelectLimit1.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSelectLimit1.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSelectLimit1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSelectLimit1.Location = new System.Drawing.Point(32, 61);
this.btnSelectLimit1.Name = "btnSelectLimit1";
this.btnSelectLimit1.Size = new System.Drawing.Size(153, 23);
this.btnSelectLimit1.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSelectLimit1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSelectLimit1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSelectLimit1.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSelectLimit1.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSelectLimit1.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSelectLimit1.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSelectLimit1.Style.GradientAngle = 90;
this.btnSelectLimit1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSelectLimit1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSelectLimit1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSelectLimit1.TabIndex = 836;
this.btnSelectLimit1.Text = "批量选择相似品";
this.btnSelectLimit1.Click += new System.EventHandler(this.btnSelectLimit1_Click);
//
// btnBatchDel
//
this.btnBatchDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -216,7 +271,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnBatchDel.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnBatchDel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnBatchDel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBatchDel.Location = new System.Drawing.Point(208, 61);
this.btnBatchDel.Location = new System.Drawing.Point(243, 61);
this.btnBatchDel.Name = "btnBatchDel";
this.btnBatchDel.Size = new System.Drawing.Size(84, 23);
this.btnBatchDel.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -255,7 +310,6 @@ namespace TemuKJD.WXForms.ProductForms
//
// 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;
@@ -284,7 +338,7 @@ namespace TemuKJD.WXForms.ProductForms
this.panelEx3.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx3.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx3.Location = new System.Drawing.Point(208, 91);
this.panelEx3.Location = new System.Drawing.Point(243, 121);
this.panelEx3.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.panelEx3.Name = "panelEx3";
this.panelEx3.Size = new System.Drawing.Size(84, 23);
@@ -310,7 +364,7 @@ namespace TemuKJD.WXForms.ProductForms
this.panelEx4.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx4.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx4.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx4.Location = new System.Drawing.Point(208, 121);
this.panelEx4.Location = new System.Drawing.Point(32, 121);
this.panelEx4.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.panelEx4.Name = "panelEx4";
this.panelEx4.Size = new System.Drawing.Size(84, 23);
@@ -337,7 +391,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnDown.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnDown.DisabledBackColor = System.Drawing.Color.Empty;
this.btnDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDown.Location = new System.Drawing.Point(208, 31);
this.btnDown.Location = new System.Drawing.Point(243, 31);
this.btnDown.Name = "btnDown";
this.btnDown.Size = new System.Drawing.Size(84, 23);
this.btnDown.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -373,7 +427,7 @@ namespace TemuKJD.WXForms.ProductForms
this.ucGroupBoxEx2.Controls.Add(this.btnSetPreSale);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(571, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(460, 165);
this.ucGroupBoxEx2.Size = new System.Drawing.Size(425, 165);
this.ucGroupBoxEx2.TabIndex = 667;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "设置预售";
@@ -438,7 +492,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnStop.CanvasColor = System.Drawing.SystemColors.Control;
this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStop.Location = new System.Drawing.Point(354, 62);
this.btnStop.Location = new System.Drawing.Point(319, 62);
this.btnStop.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(84, 23);
@@ -464,7 +518,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnClearDgv.CanvasColor = System.Drawing.SystemColors.Control;
this.btnClearDgv.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClearDgv.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClearDgv.Location = new System.Drawing.Point(354, 93);
this.btnClearDgv.Location = new System.Drawing.Point(319, 93);
this.btnClearDgv.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnClearDgv.Name = "btnClearDgv";
this.btnClearDgv.Size = new System.Drawing.Size(84, 23);
@@ -491,7 +545,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnSetPreSale.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSetPreSale.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSetPreSale.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSetPreSale.Location = new System.Drawing.Point(354, 31);
this.btnSetPreSale.Location = new System.Drawing.Point(319, 31);
this.btnSetPreSale.Name = "btnSetPreSale";
this.btnSetPreSale.Size = new System.Drawing.Size(84, 23);
this.btnSetPreSale.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -541,9 +595,12 @@ namespace TemuKJD.WXForms.ProductForms
//
this.cmbOnSaleStatus.FormattingEnabled = true;
this.cmbOnSaleStatus.Items.AddRange(new object[] {
"全部",
"全部(在售和下架)",
"在售",
"下架"});
"下架",
"审核待处理",
"草稿箱",
"回收站"});
this.cmbOnSaleStatus.Location = new System.Drawing.Point(68, 59);
this.cmbOnSaleStatus.Name = "cmbOnSaleStatus";
this.cmbOnSaleStatus.Size = new System.Drawing.Size(134, 25);
@@ -1118,19 +1175,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle19.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle19;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle20.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle20;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -1148,6 +1205,7 @@ namespace TemuKJD.WXForms.ProductForms
this.colMessage});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(4, 0);
this.dgvShop.MultiSelectCheckBox = true;
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 25;
@@ -1301,19 +1359,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle21.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle21;
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)))));
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;
dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle22.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle22;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -1343,6 +1401,7 @@ namespace TemuKJD.WXForms.ProductForms
this.colOpResult});
this.dgvSelectProduct.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvSelectProduct.Location = new System.Drawing.Point(0, 0);
this.dgvSelectProduct.MultiSelectCheckBox = true;
this.dgvSelectProduct.Name = "dgvSelectProduct";
this.dgvSelectProduct.ReadOnly = true;
this.dgvSelectProduct.RowTemplate.Height = 23;
@@ -1376,8 +1435,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colSupplierName
//
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle23;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
@@ -1465,8 +1524,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductName
//
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle24;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -1474,8 +1533,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductCat
//
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductCat.DefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductCat.DefaultCellStyle = dataGridViewCellStyle25;
this.colProductCat.HeaderText = "商品类目";
this.colProductCat.Name = "colProductCat";
this.colProductCat.ReadOnly = true;
@@ -1504,10 +1563,11 @@ namespace TemuKJD.WXForms.ProductForms
//
// colMsg
//
dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colMsg.DefaultCellStyle = dataGridViewCellStyle26;
this.colMsg.HeaderText = "状态";
this.colMsg.Name = "colMsg";
this.colMsg.ReadOnly = true;
this.colMsg.Width = 50;
//
// colPreSale
//
@@ -1542,8 +1602,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colAddTime
//
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle27;
this.colAddTime.HeaderText = "上架时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
@@ -1636,6 +1696,31 @@ namespace TemuKJD.WXForms.ProductForms
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Visible = false;
//
// btnBatchRealDel
//
this.btnBatchRealDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBatchRealDel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnBatchRealDel.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnBatchRealDel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnBatchRealDel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBatchRealDel.Location = new System.Drawing.Point(243, 91);
this.btnBatchRealDel.Name = "btnBatchRealDel";
this.btnBatchRealDel.Size = new System.Drawing.Size(84, 23);
this.btnBatchRealDel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnBatchRealDel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnBatchRealDel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnBatchRealDel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnBatchRealDel.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnBatchRealDel.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnBatchRealDel.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnBatchRealDel.Style.GradientAngle = 90;
this.btnBatchRealDel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnBatchRealDel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnBatchRealDel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnBatchRealDel.TabIndex = 865;
this.btnBatchRealDel.Text = "彻底刪除";
this.btnBatchRealDel.Click += new System.EventHandler(this.btnBatchRealDel_Click);
//
// WXProdPreSaleForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1784,5 +1869,8 @@ namespace TemuKJD.WXForms.ProductForms
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private DevComponents.DotNetBar.PanelEx btnSelectLimit2;
private DevComponents.DotNetBar.PanelEx btnSelectLimit1;
private DevComponents.DotNetBar.PanelEx btnBatchRealDel;
}
}
@@ -793,6 +793,12 @@ namespace TemuKJD.WXForms.ProductForms
onSaleStatusCode = 5;
else if (OnSaleStatus == "下架")
onSaleStatusCode = 11;
else if (OnSaleStatus == "审核待处理")
onSaleStatusCode = 3;
else if (OnSaleStatus == "草稿箱")
onSaleStatusCode = 1;
else if (OnSaleStatus == "回收站")
onSaleStatusCode = 6;
if (string.IsNullOrEmpty(PreType))
getProdOnSaleRst = WXPreSale.scanProductPreview(shop, page, nextKey, pageSize, onSaleStatusCode);
@@ -844,7 +850,7 @@ namespace TemuKJD.WXForms.ProductForms
Invoke(new Action(() =>
{
decimal? price = null;
try { price = prod["skuList"][0]["price"].ParseToDecimal() / 100; } catch { }
try { price = prod["skuList"]?[0]["price"].ParseToDecimal() / 100; } catch { }
var prodId = prod["productId"].ParseToString();
if (dgvSelectProduct.Rows.Cast<DataGridViewRow>().Any(r => r.Cells["colDraftId"].ParseToString() == prodId))
{
@@ -855,6 +861,18 @@ namespace TemuKJD.WXForms.ProductForms
StatusStr = "在售";
if (prod["status"].ParseToInt() == 11)
StatusStr = "下架";
if (prod["status"].ParseToInt() == 0)
{
StatusStr = "草稿箱";
if (prod["editStatus"].ParseToInt() == 3)
StatusStr = "审核待处理";
}
if (prod["status"].ParseToInt() == 6)
StatusStr = "回收站";
var Limit1 = pStr.Contains("同款/高度相似商品") ? "\r\n上架相似品" : "";
//var Limit2 = BaseRegex.GetStringJson(ref pStr, "secondLevelLabelName").ParseToString().Length > 0 ? "\r\n命中低风险规则上架" : "";
var Limit2 = BaseRegex.GetStringJson(ref pStr, "secondLevelLabelName").ParseToString().Length > 0 ? "\r\n低风险规则上架" : "";
StatusStr += Limit1 + Limit2;
var rowIndex = this.dgvSelectProduct.Rows.Add(
false,
@@ -886,7 +904,16 @@ namespace TemuKJD.WXForms.ProductForms
"");
dgvSelectProduct.Rows[rowIndex].Height = 60;
dgvSelectProduct.Rows[rowIndex].Cells["colMsg"].Style.ForeColor = dgvSelectProduct.Rows[rowIndex].Cells["colMsg"].Value.ParseToString().Contains("在售") ? Color.Blue : Color.Red;
Color color = Color.Red;
if (dgvSelectProduct.Rows[rowIndex].Cells["colMsg"].Value.ParseToString() == "在售")
color = Color.Blue;
if (dgvSelectProduct.Rows[rowIndex].Cells["colMsg"].Value.ParseToString() == "下架")
color = Color.Purple;
if (dgvSelectProduct.Rows[rowIndex].Cells["colMsg"].Value.ParseToString() == "草稿箱")
color = Color.DarkOrange;
if (dgvSelectProduct.Rows[rowIndex].Cells["colMsg"].Value.ParseToString() == "回收站")
color = Color.Gray;
dgvSelectProduct.Rows[rowIndex].Cells["colMsg"].Style.ForeColor = color;
dgvSelectProduct.Rows[rowIndex].Cells["colPreSale"].Style.ForeColor = dgvSelectProduct.Rows[rowIndex].Cells["colPreSale"].Value.ParseToString().Contains("预售") ? Color.Green : Color.Blue;
}));
}
@@ -1094,6 +1121,14 @@ namespace TemuKJD.WXForms.ProductForms
BaseMsgForm.ShowError("请勾选需要操作的商品!");
return;
}
if (rowLst.Any(r => r.Cells["colMsg"].Value.ParseToString().Contains("在售") == false))
{
BaseMsgForm.ShowError("只能勾选在售商品!");
return;
}
if (BaseMsgForm.ShowConfirm("确认要下架商品吗?下架后如需上架需要消耗审核次数!").DialogResult != DialogResult.OK)
return;
this.pbLoading.Visible = true;
this.btnSetPreSale.Enabled = false;
@@ -1250,6 +1285,28 @@ namespace TemuKJD.WXForms.ProductForms
}
}
private void btnSelectLimit1_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow row in dgvSelectProduct.Rows)
{
if (row.Cells["colMsg"].Value.ParseToString().Contains("上架相似品"))
row.Cells["colCheck"].Value = true;
else
row.Cells["colCheck"].Value = false;
}
}
private void btnSelectLimit2_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow row in dgvSelectProduct.Rows)
{
if (row.Cells["colMsg"].Value.ParseToString().Contains("低风险规则上架"))
row.Cells["colCheck"].Value = true;
else
row.Cells["colCheck"].Value = false;
}
}
private void cmbOnSaleStatus_SelectedIndexChanged(object sender, EventArgs e)
{
@@ -1269,6 +1326,9 @@ namespace TemuKJD.WXForms.ProductForms
return;
}
if (BaseMsgForm.ShowConfirm("确认要删除商品吗?删除后如需上架需要消耗审核次数!").DialogResult != DialogResult.OK)
return;
this.pbLoading.Visible = true;
this.btnSetPreSale.Enabled = false;
if (cancellationTokenSource != null && !cancellationTokenSource.IsCancellationRequested)
@@ -1412,6 +1472,167 @@ namespace TemuKJD.WXForms.ProductForms
}
}
}
private void btnBatchRealDel_Click(object sender, EventArgs e)
{
var rowLst = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colCheck"].Value.ParseToBool() == true).ToList();
if (rowLst.Count <= 0)
{
BaseMsgForm.ShowError("请勾选需要操作的商品!");
return;
}
if (rowLst.Any(r => r.Cells["colMsg"].Value.ParseToString().Contains("回收站") == false))
{
BaseMsgForm.ShowError("只能勾选回收站商品!");
return;
}
if (BaseMsgForm.ShowConfirm("确认要彻底删除商品吗?彻底删除后将无法再找回该商品!").DialogResult != DialogResult.OK)
return;
this.pbLoading.Visible = true;
this.btnSetPreSale.Enabled = false;
if (cancellationTokenSource != null && !cancellationTokenSource.IsCancellationRequested)
cancellationTokenSource.Cancel();
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
SetProdRealDel(rowLst);
Invoke(new Action(() =>
{
if (cancellationTokenSource.IsCancellationRequested)
{
this.statusBar.lblTaskStatus.Text = "商品删除中断";
BaseMsgForm.ShowInfo("商品删除中断");
}
else
{
this.statusBar.lblTaskStatus.Text = "商品删除完毕";
BaseMsgForm.ShowInfo("商品删除完毕");
}
this.pbLoading.Visible = false;
this.btnSetPreSale.Enabled = true;
}));
}, cancellationTokenSource.Token);
}
void SetProdRealDel(List<DataGridViewRow> rowLst)
{
Invoke(new Action(() =>
{
this.pbLoading.Visible = true;
this.statusBar.lblTaskStatus.Text = "正在彻底删除" + "...".Substring(0, DateTime.Now.Second % 4);
this.statusBar.pgbTaskProgress.Maximum = dgvSelectProduct.Rows.Count;
this.statusBar.UpdateProgressBar(0);
}));
while (rowLst.Count > 0)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var r0 = rowLst.FirstOrDefault();
var shopId = r0.Cells["colSupplierId"].Value.ParseToString();
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
var rowLstTmp = rowLst.Where(r => r.Cells["colSupplierId"].Value.ParseToString() == shopId).Take(50).ToList();
foreach (var r in rowLstTmp)
{
rowLst.Remove(r);
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在彻底删除" + "...".Substring(0, DateTime.Now.Second % 4);
this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1);
r.Cells["colOpResult"].Value = "";
}));
}
if (shop == null)
{
Invoke(new Action(() =>
{
foreach (var r in rowLstTmp)
{
r.Cells["colOpResult"].Value = "店铺不存在";
}
}));
continue;
}
if (shop.LoginStatus != "登录成功")
{
Invoke(new Action(() =>
{
foreach (var r in rowLstTmp)
{
r.Cells["colOpResult"].Value = "店铺掉线";
}
}));
continue;
}
List<string> prodIdLst = new List<string>();
foreach (var row in rowLstTmp)
{
var prodId = row.Cells["colDraftId"].Value.ParseToString();
prodIdLst.Add(prodId);
}
var downProdRst = WXPreSale.RealDelProd(shop, string.Join(",", prodIdLst));
Thread.Sleep(Randomx.GetId(1000, 1500));
if (!downProdRst.Contains("\"code\":0"))
{
if (downProdRst.Contains("biz magic invalid"))
{
WXShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus != "登录成功")
{
Invoke(new Action(() =>
{
foreach (var row in rowLstTmp)
{
row.Cells["colOpResult"].Value = "店铺掉线";
}
}));
continue;
}
}
var errmsg = BaseRegex.GetStringJson(ref downProdRst, "msg");
if (string.IsNullOrWhiteSpace(errmsg))
errmsg = downProdRst;
Invoke(new Action(() =>
{
foreach (var row in rowLstTmp)
{
if (downProdRst.Contains("\"code\":108002"))
{
var prodId = row.Cells["colDraftId"].Value.ParseToString();
if (downProdRst.Contains(prodId))
row.Cells["colOpResult"].Value = "彻底删除失败,请检查商品是否已删除";
else
row.Cells["colOpResult"].Value = "彻底删除成功";
}
else
row.Cells["colOpResult"].Value = errmsg;
}
}));
}
if (downProdRst.Contains("\"code\":0"))
{
Invoke(new Action(() =>
{
foreach (var row in rowLstTmp)
{
row.Cells["colOpResult"].Value = "彻底删除成功";
}
}));
}
}
}
}
public class WXPreSale
@@ -1421,7 +1642,7 @@ namespace TemuKJD.WXForms.ProductForms
/// </summary>
/// <param name="status">-1 全部 5 在售 11 下架</param>
/// <returns></returns>
public static string searchProduct(ShopLoginInfo shop, int pageNum, int? presaleType = null, int pageSize = 50, int? sortType = null, int status=5)
public static string searchProduct(ShopLoginInfo shop, int pageNum, int? presaleType = null, int pageSize = 50, int? sortType = null, int status = 5)
{
//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=44&status[]=5&presaleType[]=1
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/searchProduct?token=&lang=zh_CN&" +
@@ -1437,9 +1658,9 @@ namespace TemuKJD.WXForms.ProductForms
}
/// <summary>
/// -1 全部 5 在售 11 下架
/// -1全部 5在售 11下架 1草稿箱 3审核待处理 6回收站
/// </summary>
/// <param name="saleStatus">-1 全部 5 在售 11 下架</param>
/// <param name="saleStatus">-1 全部 5在售 11下架 1草稿箱 3审核待处理 6回收站</param>
/// <returns></returns>
public static string scanProductPreview(ShopLoginInfo shop, int page, string nextKey = "", int pageSize = 50, int saleStatus = 5)
{
@@ -1449,8 +1670,22 @@ namespace TemuKJD.WXForms.ProductForms
referer = "https://store.weixin.qq.com/shop/goods/list?currentTab=PRODUCT_STATUS_ON&currentPage=" + page;
//string body = @"{""pageSize"":20,""productStatus"":[-1],""productSource"":""[1,16,32]"",""searchSource"":1,""useNew"":true,""pageNum"":1,""status"":[5]}";
//string body = @"{""pageSize"":20,""productStatus"":[-1],""productSource"":""[1,16,32]"",""searchSource"":1,""useNew"":true,""pageNum"":2,""status"":[5],""nextKey"":""ChwItc+24YajAhCD14bMBhjqLiDoDCgAMITXhswGEhwIy8im34ajAhCa74XMBhiaXyDeBygAMJrvhcwGGAEgeiiIEw==""}";
string body = @"{""pageSize"":" + pageSize + @",""productStatus"":[-1],""productSource"":""[1,16,32]"",""searchSource"":1,""useNew"":true,""pageNum"":" + page +
@",""status"":[" + saleStatus + @"],""nextKey"":""" + nextKey + @"""}";
//string body = @"{""pageSize"":" + pageSize + @",""productStatus"":[-1],""productSource"":""[1,16,32]"",""searchSource"":1,""useNew"":true,""pageNum"":" + page + @",""status"":[" + saleStatus + @"],""nextKey"":""" + nextKey + @"""}";
JObject bodyObj = new JObject();
bodyObj["pageSize"] = pageSize;
bodyObj["productStatus"] = new JArray() { -1 };
bodyObj["productSource"] = "[1,16,32]";
bodyObj["searchSource"] = 1;
bodyObj["useNew"] = true;
bodyObj["pageNum"] = page;
bodyObj["status"] = new JArray() { saleStatus };
if(!string.IsNullOrEmpty(nextKey))
{
bodyObj["nextKey"] = nextKey;
}
string body = JsonHelper.SerializeObject(bodyObj);
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
return result;
}
@@ -1472,7 +1707,7 @@ namespace TemuKJD.WXForms.ProductForms
/// <summary>
/// 下架商品
/// 删除商品
/// </summary>
/// <param name="shop"></param>
/// <param name="prodId"></param>
@@ -1485,5 +1720,20 @@ namespace TemuKJD.WXForms.ProductForms
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
return result;
}
/// <summary>
/// 彻底删除商品
/// </summary>
/// <param name="shop"></param>
/// <param name="prodId"></param>
/// <returns></returns>
public static string RealDelProd(ShopLoginInfo shop, string prodIds)
{
string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductlist/cgi/goods/batchRealDel?token=&lang=zh_CN";
string referer = "https://store.weixin.qq.com/shop/goods/list?currentTab=PRODUCT_RECYCLE_BIN";
string body = @"{""ids"":[" + prodIds + @"],""uploadSource"":6}";
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
return result;
}
}
}