退货包裹计费功能 活动查询已报名商品 优化清理无流量 插旗等相关服务
This commit is contained in:
1 parent
3611d9a8e9
commit
99237fae41
25 files changed
+1477
-256
No files matched your search
+272
-59
@@ -32,15 +32,27 @@ 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 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.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = 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();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
|
||||
this.pnlStock = new System.Windows.Forms.Panel();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.txtIntervalMin = new System.Windows.Forms.TextBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.chkSetStockLoop = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.txtStockLow = new System.Windows.Forms.TextBox();
|
||||
this.btnStopSearch2 = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.btnSetStock = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.btnCancelActivity = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txtSkipPriceEnd = new System.Windows.Forms.TextBox();
|
||||
@@ -56,6 +68,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.btnStopOp = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnSetActivity = new DevComponents.DotNetBar.PanelEx();
|
||||
this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
|
||||
this.btnGetInActivityProd = new DevComponents.DotNetBar.PanelEx();
|
||||
this.chkProdInActivity = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.btnEmpty = new DevComponents.DotNetBar.PanelEx();
|
||||
this.txtPage = new System.Windows.Forms.TextBox();
|
||||
@@ -111,17 +124,18 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colValidPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colIsGetActivityInProd = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.btnClear = new DevComponents.DotNetBar.PanelEx();
|
||||
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.ucGroupBoxEx3.SuspendLayout();
|
||||
this.pnlStock.SuspendLayout();
|
||||
this.flowLayoutPanel1.SuspendLayout();
|
||||
this.ucGroupBoxEx4.SuspendLayout();
|
||||
this.ucGroupBoxEx1.SuspendLayout();
|
||||
@@ -172,6 +186,7 @@ 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.pnlStock);
|
||||
this.ucGroupBoxEx3.Controls.Add(this.label6);
|
||||
this.ucGroupBoxEx3.Controls.Add(this.btnCancelActivity);
|
||||
this.ucGroupBoxEx3.Controls.Add(this.label2);
|
||||
@@ -184,11 +199,169 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.ucGroupBoxEx3.Controls.Add(this.btnSetActivity);
|
||||
this.ucGroupBoxEx3.Location = new System.Drawing.Point(450, 2);
|
||||
this.ucGroupBoxEx3.Name = "ucGroupBoxEx3";
|
||||
this.ucGroupBoxEx3.Size = new System.Drawing.Size(1039, 165);
|
||||
this.ucGroupBoxEx3.Size = new System.Drawing.Size(1038, 165);
|
||||
this.ucGroupBoxEx3.TabIndex = 668;
|
||||
this.ucGroupBoxEx3.TabStop = false;
|
||||
this.ucGroupBoxEx3.Text = "活动设置";
|
||||
//
|
||||
// pnlStock
|
||||
//
|
||||
this.pnlStock.Controls.Add(this.label10);
|
||||
this.pnlStock.Controls.Add(this.txtIntervalMin);
|
||||
this.pnlStock.Controls.Add(this.label9);
|
||||
this.pnlStock.Controls.Add(this.textBox2);
|
||||
this.pnlStock.Controls.Add(this.chkSetStockLoop);
|
||||
this.pnlStock.Controls.Add(this.label8);
|
||||
this.pnlStock.Controls.Add(this.txtStockLow);
|
||||
this.pnlStock.Controls.Add(this.btnStopSearch2);
|
||||
this.pnlStock.Controls.Add(this.label7);
|
||||
this.pnlStock.Controls.Add(this.btnSetStock);
|
||||
this.pnlStock.Location = new System.Drawing.Point(555, 19);
|
||||
this.pnlStock.Name = "pnlStock";
|
||||
this.pnlStock.Size = new System.Drawing.Size(301, 134);
|
||||
this.pnlStock.TabIndex = 885;
|
||||
this.pnlStock.Visible = false;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(250, 55);
|
||||
this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(32, 17);
|
||||
this.label10.TabIndex = 858;
|
||||
this.label10.Text = "分钟";
|
||||
//
|
||||
// txtIntervalMin
|
||||
//
|
||||
this.txtIntervalMin.Font = new System.Drawing.Font("微软雅黑", 10F);
|
||||
this.txtIntervalMin.Location = new System.Drawing.Point(211, 51);
|
||||
this.txtIntervalMin.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
|
||||
this.txtIntervalMin.Name = "txtIntervalMin";
|
||||
this.txtIntervalMin.Size = new System.Drawing.Size(36, 25);
|
||||
this.txtIntervalMin.TabIndex = 857;
|
||||
this.txtIntervalMin.Text = "60";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(178, 55);
|
||||
this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(32, 17);
|
||||
this.label9.TabIndex = 856;
|
||||
this.label9.Text = "间隔";
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Font = new System.Drawing.Font("微软雅黑", 10F);
|
||||
this.textBox2.Location = new System.Drawing.Point(120, 51);
|
||||
this.textBox2.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(57, 25);
|
||||
this.textBox2.TabIndex = 855;
|
||||
this.textBox2.Text = "1";
|
||||
//
|
||||
// chkSetStockLoop
|
||||
//
|
||||
this.chkSetStockLoop.AutoSize = true;
|
||||
this.chkSetStockLoop.Location = new System.Drawing.Point(14, 53);
|
||||
this.chkSetStockLoop.Name = "chkSetStockLoop";
|
||||
this.chkSetStockLoop.Size = new System.Drawing.Size(111, 21);
|
||||
this.chkSetStockLoop.TabIndex = 854;
|
||||
this.chkSetStockLoop.Text = "循环设置库存为";
|
||||
this.chkSetStockLoop.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(42, 59);
|
||||
this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(0, 17);
|
||||
this.label8.TabIndex = 820;
|
||||
//
|
||||
// txtStockLow
|
||||
//
|
||||
this.txtStockLow.Font = new System.Drawing.Font("微软雅黑", 10F);
|
||||
this.txtStockLow.Location = new System.Drawing.Point(120, 12);
|
||||
this.txtStockLow.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
|
||||
this.txtStockLow.Name = "txtStockLow";
|
||||
this.txtStockLow.Size = new System.Drawing.Size(57, 25);
|
||||
this.txtStockLow.TabIndex = 812;
|
||||
this.txtStockLow.Text = "0";
|
||||
//
|
||||
// btnStopSearch2
|
||||
//
|
||||
this.btnStopSearch2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnStopSearch2.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.btnStopSearch2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnStopSearch2.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnStopSearch2.Location = new System.Drawing.Point(231, 98);
|
||||
this.btnStopSearch2.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
|
||||
this.btnStopSearch2.Name = "btnStopSearch2";
|
||||
this.btnStopSearch2.Size = new System.Drawing.Size(58, 25);
|
||||
this.btnStopSearch2.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStopSearch2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.btnStopSearch2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.btnStopSearch2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.btnStopSearch2.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStopSearch2.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.btnStopSearch2.Style.GradientAngle = 90;
|
||||
this.btnStopSearch2.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStopSearch2.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStopSearch2.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStopSearch2.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStopSearch2.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnStopSearch2.TabIndex = 805;
|
||||
this.btnStopSearch2.Text = "停止操作";
|
||||
this.btnStopSearch2.Click += new System.EventHandler(this.btnStopSearch2_Click);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(63, 16);
|
||||
this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(56, 17);
|
||||
this.label7.TabIndex = 813;
|
||||
this.label7.Text = "库存数量";
|
||||
//
|
||||
// btnSetStock
|
||||
//
|
||||
this.btnSetStock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnSetStock.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnSetStock.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSetStock.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnSetStock.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSetStock.Location = new System.Drawing.Point(137, 98);
|
||||
this.btnSetStock.Name = "btnSetStock";
|
||||
this.btnSetStock.Size = new System.Drawing.Size(91, 25);
|
||||
this.btnSetStock.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSetStock.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSetStock.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSetStock.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnSetStock.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnSetStock.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnSetStock.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnSetStock.Style.GradientAngle = 90;
|
||||
this.btnSetStock.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSetStock.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSetStock.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSetStock.TabIndex = 431;
|
||||
this.btnSetStock.Text = "批量设置库存";
|
||||
this.btnSetStock.Click += new System.EventHandler(this.btnSetStock_Click);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(14, 31);
|
||||
this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(161, 17);
|
||||
this.label6.TabIndex = 875;
|
||||
this.label6.Text = "“清凉季”+“开学季”活动";
|
||||
//
|
||||
// btnCancelActivity
|
||||
//
|
||||
this.btnCancelActivity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -196,7 +369,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.btnCancelActivity.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnCancelActivity.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnCancelActivity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnCancelActivity.Location = new System.Drawing.Point(933, 69);
|
||||
this.btnCancelActivity.Location = new System.Drawing.Point(932, 69);
|
||||
this.btnCancelActivity.Name = "btnCancelActivity";
|
||||
this.btnCancelActivity.Size = new System.Drawing.Size(84, 23);
|
||||
this.btnCancelActivity.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
@@ -345,7 +518,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.btnStopOp.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.btnStopOp.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnStopOp.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnStopOp.Location = new System.Drawing.Point(933, 121);
|
||||
this.btnStopOp.Location = new System.Drawing.Point(932, 121);
|
||||
this.btnStopOp.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
|
||||
this.btnStopOp.Name = "btnStopOp";
|
||||
this.btnStopOp.Size = new System.Drawing.Size(84, 23);
|
||||
@@ -372,7 +545,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.btnSetActivity.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSetActivity.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnSetActivity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSetActivity.Location = new System.Drawing.Point(933, 31);
|
||||
this.btnSetActivity.Location = new System.Drawing.Point(932, 31);
|
||||
this.btnSetActivity.Name = "btnSetActivity";
|
||||
this.btnSetActivity.Size = new System.Drawing.Size(84, 23);
|
||||
this.btnSetActivity.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
@@ -396,6 +569,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.ucGroupBoxEx4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.ucGroupBoxEx4.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
|
||||
this.ucGroupBoxEx4.Controls.Add(this.btnGetInActivityProd);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.chkProdInActivity);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.btnEmpty);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.txtPage);
|
||||
@@ -409,15 +583,41 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.ucGroupBoxEx4.TabStop = false;
|
||||
this.ucGroupBoxEx4.Text = "活动商品查询";
|
||||
//
|
||||
// btnGetInActivityProd
|
||||
//
|
||||
this.btnGetInActivityProd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnGetInActivityProd.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnGetInActivityProd.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnGetInActivityProd.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnGetInActivityProd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnGetInActivityProd.Location = new System.Drawing.Point(17, 120);
|
||||
this.btnGetInActivityProd.Name = "btnGetInActivityProd";
|
||||
this.btnGetInActivityProd.Size = new System.Drawing.Size(101, 25);
|
||||
this.btnGetInActivityProd.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnGetInActivityProd.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnGetInActivityProd.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnGetInActivityProd.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnGetInActivityProd.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnGetInActivityProd.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnGetInActivityProd.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnGetInActivityProd.Style.GradientAngle = 90;
|
||||
this.btnGetInActivityProd.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnGetInActivityProd.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnGetInActivityProd.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnGetInActivityProd.TabIndex = 867;
|
||||
this.btnGetInActivityProd.Text = "查询已报名商品";
|
||||
this.btnGetInActivityProd.Click += new System.EventHandler(this.panelEx2_Click);
|
||||
//
|
||||
// chkProdInActivity
|
||||
//
|
||||
this.chkProdInActivity.AutoSize = true;
|
||||
this.chkProdInActivity.Location = new System.Drawing.Point(17, 75);
|
||||
this.chkProdInActivity.Location = new System.Drawing.Point(17, 71);
|
||||
this.chkProdInActivity.Name = "chkProdInActivity";
|
||||
this.chkProdInActivity.Size = new System.Drawing.Size(171, 21);
|
||||
this.chkProdInActivity.Size = new System.Drawing.Size(111, 21);
|
||||
this.chkProdInActivity.TabIndex = 854;
|
||||
this.chkProdInActivity.Text = "查询所有商品(含已报名)";
|
||||
this.chkProdInActivity.Text = "查询已报名商品";
|
||||
this.chkProdInActivity.UseVisualStyleBackColor = true;
|
||||
this.chkProdInActivity.Visible = false;
|
||||
//
|
||||
// btnEmpty
|
||||
//
|
||||
@@ -501,9 +701,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.btnSearchOrder.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSearchOrder.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnSearchOrder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSearchOrder.Location = new System.Drawing.Point(108, 120);
|
||||
this.btnSearchOrder.Location = new System.Drawing.Point(124, 120);
|
||||
this.btnSearchOrder.Name = "btnSearchOrder";
|
||||
this.btnSearchOrder.Size = new System.Drawing.Size(82, 25);
|
||||
this.btnSearchOrder.Size = new System.Drawing.Size(66, 25);
|
||||
this.btnSearchOrder.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSearchOrder.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSearchOrder.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
@@ -861,19 +1061,19 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
this.dgvShop.AllowUserToAddRows = false;
|
||||
this.dgvShop.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle8.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8;
|
||||
dataGridViewCellStyle15.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle15;
|
||||
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;
|
||||
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle16;
|
||||
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colSelect,
|
||||
@@ -1035,19 +1235,19 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
this.dgvSelectProduct.AllowUserToAddRows = false;
|
||||
this.dgvSelectProduct.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle10.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
|
||||
dataGridViewCellStyle17.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle17;
|
||||
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;
|
||||
dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle18;
|
||||
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colCheck,
|
||||
@@ -1064,6 +1264,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.colPrice,
|
||||
this.colValidPrice,
|
||||
this.colStock,
|
||||
this.colIsGetActivityInProd,
|
||||
this.colOpResult});
|
||||
this.dgvSelectProduct.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dgvSelectProduct.Location = new System.Drawing.Point(0, 0);
|
||||
@@ -1095,8 +1296,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// colSupplierName
|
||||
//
|
||||
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle12;
|
||||
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle19;
|
||||
this.colSupplierName.HeaderText = "店铺名称";
|
||||
this.colSupplierName.Name = "colSupplierName";
|
||||
this.colSupplierName.ReadOnly = true;
|
||||
@@ -1153,8 +1354,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// colProductName
|
||||
//
|
||||
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductName.DefaultCellStyle = dataGridViewCellStyle13;
|
||||
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductName.DefaultCellStyle = dataGridViewCellStyle20;
|
||||
this.colProductName.HeaderText = "商品名称";
|
||||
this.colProductName.Name = "colProductName";
|
||||
this.colProductName.ReadOnly = true;
|
||||
@@ -1181,13 +1382,20 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// colStock
|
||||
//
|
||||
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colStock.DefaultCellStyle = dataGridViewCellStyle14;
|
||||
dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colStock.DefaultCellStyle = dataGridViewCellStyle21;
|
||||
this.colStock.HeaderText = "库存";
|
||||
this.colStock.Name = "colStock";
|
||||
this.colStock.ReadOnly = true;
|
||||
this.colStock.Width = 60;
|
||||
//
|
||||
// colIsGetActivityInProd
|
||||
//
|
||||
this.colIsGetActivityInProd.HeaderText = "是否是已报活动查询";
|
||||
this.colIsGetActivityInProd.Name = "colIsGetActivityInProd";
|
||||
this.colIsGetActivityInProd.ReadOnly = true;
|
||||
this.colIsGetActivityInProd.Visible = false;
|
||||
//
|
||||
// colOpResult
|
||||
//
|
||||
this.colOpResult.HeaderText = "操作结果";
|
||||
@@ -1275,16 +1483,6 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.panelEx1.Text = "停止当前操作";
|
||||
this.panelEx1.Visible = false;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(14, 31);
|
||||
this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(161, 17);
|
||||
this.label6.TabIndex = 875;
|
||||
this.label6.Text = "“清凉季”+“开学季”活动";
|
||||
//
|
||||
// WXActivity618Form
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -1303,6 +1501,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ucGroupBoxEx3.ResumeLayout(false);
|
||||
this.ucGroupBoxEx3.PerformLayout();
|
||||
this.pnlStock.ResumeLayout(false);
|
||||
this.pnlStock.PerformLayout();
|
||||
this.flowLayoutPanel1.ResumeLayout(false);
|
||||
this.flowLayoutPanel1.PerformLayout();
|
||||
this.ucGroupBoxEx4.ResumeLayout(false);
|
||||
@@ -1388,6 +1588,12 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
private DevComponents.DotNetBar.PanelEx btnEmpty;
|
||||
private System.Windows.Forms.TextBox txtPage;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox txtSkipPriceEnd;
|
||||
private UserComponent.UcCheckBox chkSkipPriceEnd;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private DevComponents.DotNetBar.PanelEx btnCancelActivity;
|
||||
private UserComponent.UcCheckBox chkProdInActivity;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName;
|
||||
@@ -1402,12 +1608,19 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colValidPrice;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colStock;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colIsGetActivityInProd;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
|
||||
private System.Windows.Forms.TextBox txtSkipPriceEnd;
|
||||
private UserComponent.UcCheckBox chkSkipPriceEnd;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private DevComponents.DotNetBar.PanelEx btnCancelActivity;
|
||||
private UserComponent.UcCheckBox chkProdInActivity;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private DevComponents.DotNetBar.PanelEx btnGetInActivityProd;
|
||||
private System.Windows.Forms.TextBox txtStockLow;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private DevComponents.DotNetBar.PanelEx btnStopSearch2;
|
||||
private DevComponents.DotNetBar.PanelEx btnSetStock;
|
||||
private System.Windows.Forms.Panel pnlStock;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.TextBox txtIntervalMin;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private UserComponent.UcCheckBox chkSetStockLoop;
|
||||
private System.Windows.Forms.Label label8;
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
|
||||
public bool IsLoadComplate { get; set; } = false;
|
||||
|
||||
public ConcurrentList<ActivityInProd> lstActivityInProd = new ConcurrentList<ActivityInProd>();
|
||||
|
||||
bool isInit = false;
|
||||
CheckBox chkSelectAll = null;
|
||||
public WxActivityData wxActivityData = new WxActivityData();
|
||||
@@ -56,7 +58,16 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
PageEnd = txtPage.Text.ParseToInt();
|
||||
|
||||
dicCheckedShopId = NaiBa.Util.Helper.ConfigHelper.LoadConfig<Dictionary<string, bool>>("wx_checked_shop_dic");
|
||||
if (BaseClass.UserAuthority.Contains("活动库存"))
|
||||
{
|
||||
this.pnlStock.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pnlStock.Visible = false;
|
||||
}
|
||||
|
||||
dicCheckedShopId = NaiBa.Util.Helper.ConfigHelper.LoadConfig<Dictionary<string, bool>>("wx_checked_shop_dic");
|
||||
if (dicCheckedShopId == null)
|
||||
dicCheckedShopId = new Dictionary<string, bool>();
|
||||
|
||||
@@ -384,6 +395,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
|
||||
private void btnSearchProd_Click(object sender, EventArgs e)
|
||||
{
|
||||
chkProdInActivity.Checked = false;
|
||||
var shopIdLst = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
|
||||
if (shopIdLst.Count <= 0)
|
||||
@@ -421,7 +433,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
void GetActivityProductLst(List<string> shopIdLst)
|
||||
{
|
||||
List<ShopLoginInfo> shopLst = GlobalConfig.ShopLoginList.Where(s => shopIdLst.Contains(s.ShopId)).ToList();
|
||||
dgvSelectProduct.Rows.Clear();
|
||||
this.wxActivityData = new WxActivityData();
|
||||
this.lstActivityInProd.Clear();
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -483,85 +497,167 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
var getActivityProdRst = "";
|
||||
if (chkProdInActivity.Checked)
|
||||
{
|
||||
//getActivityProdRst = WXActivity.getProdInActivityList(shop, page, pageSize);
|
||||
getActivityProdRst = WXActivity.getActivityProdList(shop, page, pageSize);
|
||||
|
||||
Thread.Sleep(Randomx.GetId(150, 300));
|
||||
if (!getActivityProdRst.Contains("\"code\":0"))
|
||||
if (1==1)
|
||||
{
|
||||
ShowShopError(shop, getActivityProdRst);
|
||||
break;
|
||||
}
|
||||
var totalNum = BaseRegex.GetIntJson(ref getActivityProdRst, "totalNum");
|
||||
totalPage = Math.Ceiling(totalNum * 1.0m / pageSize).ParseToInt();
|
||||
|
||||
try
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
this.statusBar.lblTaskStatus.Text = "正在查询店铺:" + shop.ShopAccount + " " + page + "/" + Math.Min(PageEnd, totalPage);
|
||||
}));
|
||||
var prodObjs = JsonHelper.JObjectParse(getActivityProdRst)["data"];
|
||||
WxActivityData dataTmp = JsonHelper.DeserializeJsonToObject<WxActivityData>(JsonHelper.SerializeObject(prodObjs));
|
||||
foreach (var prodRequest in dataTmp.requestProductInfoList.resultList)
|
||||
{
|
||||
if (this.wxActivityData.requestProductInfoList.resultList.Any(r => r.product.productId == prodRequest.product.productId && r.product.skuId == prodRequest.product.skuId))
|
||||
continue;
|
||||
getActivityProdRst = WXActivity.getProdInActivityList(shop, page, pageSize);
|
||||
|
||||
prodRequest.shopId = shop.ShopId;
|
||||
wxActivityData.requestProductInfoList.resultList.Add(prodRequest);
|
||||
Thread.Sleep(Randomx.GetId(150, 300));
|
||||
if (!getActivityProdRst.Contains("\"code\":0"))
|
||||
{
|
||||
ShowShopError(shop, getActivityProdRst);
|
||||
break;
|
||||
}
|
||||
foreach (var prod in dataTmp.productList)
|
||||
var totalNum = BaseRegex.GetIntJson(ref getActivityProdRst, "totalNum");
|
||||
totalPage = Math.Ceiling(totalNum * 1.0m / pageSize).ParseToInt();
|
||||
|
||||
try
|
||||
{
|
||||
if (this.wxActivityData.productList.Any(p => p.productKey.productId == prod.productKey.productId))
|
||||
continue;
|
||||
wxActivityData.productList.Add(prod);
|
||||
var signCnt = wxActivityData.requestProductInfoList.resultList
|
||||
.Where(r => r.product.productId == prod.productKey.productId && r.isAdded == true).ToList().Count;
|
||||
var signCntStr = signCnt > 0 ? "," + signCnt + "个已报名" : "";
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
var rowIndex = this.dgvSelectProduct.Rows.Add(
|
||||
false,
|
||||
shop.ShopId,
|
||||
shop.ShopAccount,
|
||||
"登录",
|
||||
"进店",
|
||||
prod.productKey.productId,
|
||||
"",
|
||||
prod.info.headImg.FirstOrDefault(),
|
||||
DataGridViewExtension.defaultBitmap,
|
||||
prod.info.title,
|
||||
"sku数量:" + prod.productSkus.Count + "个" + signCntStr,
|
||||
prod.productSkus.Min(s => s.productSkuInfo.salePrice) * 0.01m + " - " + prod.productSkus.Max(s => s.productSkuInfo.salePrice) * 0.01m,
|
||||
prod.productSkus.Min(s => s.productSkuInfo.salePrice) * 0.01m + " - " + prod.productSkus.Max(s => s.productSkuInfo.salePrice) * 0.01m,
|
||||
prod.info.totalStockNum,
|
||||
""
|
||||
);
|
||||
|
||||
if (prod.productKey.productId == "10000852942152")
|
||||
{
|
||||
var x = JsonHelper.SerializeObject(prod);
|
||||
}
|
||||
|
||||
dgvSelectProduct.Rows[rowIndex].Height = 60;
|
||||
//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;
|
||||
this.pbLoading.Visible = true;
|
||||
this.statusBar.lblTaskStatus.Text = "正在查询店铺:" + shop.ShopAccount + " " + page + "/" + Math.Min(PageEnd, totalPage);
|
||||
}));
|
||||
var prodObjs = JsonHelper.JObjectParse(getActivityProdRst)["productList"];
|
||||
var dataTmpList = JsonHelper.DeserializeJsonToList<ActivityInProd>(JsonHelper.SerializeObject(prodObjs));
|
||||
//lstActivityInProd.AddRange(dataTmpList);
|
||||
|
||||
foreach (var prod in dataTmpList)
|
||||
{
|
||||
if (lstActivityInProd.Any(p => p.productId == prod.productId && p.skuId == prod.skuId))
|
||||
continue;
|
||||
lstActivityInProd.Add(prod);
|
||||
//var signCnt = wxActivityData.requestProductInfoList.resultList
|
||||
// .Where(r => r.product.productId == prod.productId && r.isAdded == true).ToList().Count;
|
||||
//var signCntStr = signCnt > 0 ? "," + signCnt + "个已报名" : "";
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
var rowIndex = this.dgvSelectProduct.Rows.Add(
|
||||
false,
|
||||
shop.ShopId,
|
||||
shop.ShopAccount,
|
||||
"登录",
|
||||
"进店",
|
||||
prod.productId,
|
||||
prod.skuId,
|
||||
prod.productImgUrl,
|
||||
DataGridViewExtension.defaultBitmap,
|
||||
prod.productName,
|
||||
prod.skuName + "(" + prod.skuId + ")", //"sku数量:" + prod.productSkus.Count + "个" + signCntStr,
|
||||
prod.beforePlatformDiscountCommPrice, //prod.productSkus.Min(s => s.productSkuInfo.salePrice) * 0.01m + " - " + prod.productSkus.Max(s => s.productSkuInfo.salePrice) * 0.01m,
|
||||
prod.afterPlatformDiscountCommPrice, //prod.productSkus.Min(s => s.productSkuInfo.salePrice) * 0.01m + " - " + prod.productSkus.Max(s => s.productSkuInfo.salePrice) * 0.01m,
|
||||
prod.totalStockNum,
|
||||
"已报名",
|
||||
""
|
||||
);
|
||||
|
||||
if (prod.productId == "10000852942152")
|
||||
{
|
||||
var x = JsonHelper.SerializeObject(prod);
|
||||
}
|
||||
|
||||
dgvSelectProduct.Rows[rowIndex].Height = 60;
|
||||
//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;
|
||||
}));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
if (1 == 2)
|
||||
{
|
||||
|
||||
getActivityProdRst = WXActivity.getActivityProdList(shop, page, pageSize);
|
||||
|
||||
Thread.Sleep(Randomx.GetId(150, 300));
|
||||
if (!getActivityProdRst.Contains("\"code\":0"))
|
||||
{
|
||||
ShowShopError(shop, getActivityProdRst);
|
||||
break;
|
||||
}
|
||||
var totalNum = BaseRegex.GetIntJson(ref getActivityProdRst, "totalNum");
|
||||
totalPage = Math.Ceiling(totalNum * 1.0m / pageSize).ParseToInt();
|
||||
|
||||
try
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
this.statusBar.lblTaskStatus.Text = "正在查询店铺:" + shop.ShopAccount + " " + page + "/" + Math.Min(PageEnd, totalPage);
|
||||
}));
|
||||
var prodObjs = JsonHelper.JObjectParse(getActivityProdRst)["data"];
|
||||
WxActivityData dataTmp = JsonHelper.DeserializeJsonToObject<WxActivityData>(JsonHelper.SerializeObject(prodObjs));
|
||||
foreach (var prodRequest in dataTmp.requestProductInfoList.resultList)
|
||||
{
|
||||
if (this.wxActivityData.requestProductInfoList.resultList.Any(r => r.product.productId == prodRequest.product.productId && r.product.skuId == prodRequest.product.skuId))
|
||||
continue;
|
||||
|
||||
prodRequest.shopId = shop.ShopId;
|
||||
wxActivityData.requestProductInfoList.resultList.Add(prodRequest);
|
||||
}
|
||||
foreach (var prod in dataTmp.productList)
|
||||
{
|
||||
if (this.wxActivityData.productList.Any(p => p.productKey.productId == prod.productKey.productId))
|
||||
continue;
|
||||
wxActivityData.productList.Add(prod);
|
||||
var signCnt = wxActivityData.requestProductInfoList.resultList
|
||||
.Where(r => r.product.productId == prod.productKey.productId && r.isAdded == true).ToList().Count;
|
||||
var signCntStr = signCnt > 0 ? "," + signCnt + "个已报名" : "";
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
var rowIndex = this.dgvSelectProduct.Rows.Add(
|
||||
false,
|
||||
shop.ShopId,
|
||||
shop.ShopAccount,
|
||||
"登录",
|
||||
"进店",
|
||||
prod.productKey.productId,
|
||||
"",
|
||||
prod.info.headImg.FirstOrDefault(),
|
||||
DataGridViewExtension.defaultBitmap,
|
||||
prod.info.title,
|
||||
"sku数量:" + prod.productSkus.Count + "个" + signCntStr,
|
||||
prod.productSkus.Min(s => s.productSkuInfo.salePrice) * 0.01m + " - " + prod.productSkus.Max(s => s.productSkuInfo.salePrice) * 0.01m,
|
||||
prod.productSkus.Min(s => s.productSkuInfo.salePrice) * 0.01m + " - " + prod.productSkus.Max(s => s.productSkuInfo.salePrice) * 0.01m,
|
||||
prod.info.totalStockNum,
|
||||
""
|
||||
);
|
||||
|
||||
if (prod.productKey.productId == "10000852942152")
|
||||
{
|
||||
var x = JsonHelper.SerializeObject(prod);
|
||||
}
|
||||
|
||||
dgvSelectProduct.Rows[rowIndex].Height = 60;
|
||||
//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;
|
||||
}));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -619,6 +715,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
prod.productSkus.Min(s => s.productSkuInfo.salePrice) * 0.01m + " - " + prod.productSkus.Max(s => s.productSkuInfo.salePrice) * 0.01m,
|
||||
prod.productSkus.Min(s => s.productSkuInfo.salePrice) * 0.01m + " - " + prod.productSkus.Max(s => s.productSkuInfo.salePrice) * 0.01m,
|
||||
prod.info.totalStockNum,
|
||||
"",
|
||||
""
|
||||
);
|
||||
|
||||
@@ -932,6 +1029,11 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
|
||||
skus = skus.Where(s => s.isAdded != true).ToList();
|
||||
|
||||
// 活动价低价sku,平台半小时后就会更新,不再设置
|
||||
//var lowPrice = skus.Min(s => s.salePrice);
|
||||
//var lowPriceSku = skus.FirstOrDefault(s => s.salePrice == lowPrice);
|
||||
|
||||
foreach (var sku in skus)
|
||||
{
|
||||
JObject prodObj = new JObject();
|
||||
@@ -944,6 +1046,11 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
prodObj["activityPrice"] = Math.Floor(sku.salePrice.ParseToInt() * (100 - discountPercent) * 0.01m).ParseToInt();
|
||||
else
|
||||
prodObj["activityPrice"] = sku.salePrice.ParseToInt() - discountPrice;
|
||||
|
||||
//if (chkLowAcitvityPrice.Checked && skus.Count > 1 && sku == lowPriceSku)
|
||||
//{
|
||||
// prodObj["activityPrice"] = (txtLowAcitvityPrice.Text.ParseToDecimal() * 100).ParseToInt();
|
||||
//}
|
||||
}));
|
||||
prodObj["stockMode"] = sku.defaultStockMode;
|
||||
jArr.Add(prodObj);
|
||||
@@ -1085,9 +1192,17 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
bool hasProdForCancelActivity = false;
|
||||
foreach (var row in rowLstTmp)
|
||||
{
|
||||
|
||||
Thread.Sleep(Randomx.GetId(10, 20));
|
||||
var prodId = row.Cells["colDraftId"].Value.ParseToString();
|
||||
|
||||
if (jArr.ParseToString().Contains(prodId))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var skus = this.wxActivityData.requestProductInfoList.resultList.Where(p => p.product.productId == prodId).ToList();
|
||||
var skuIds = rowLstTmp.Where(r => r.Cells["colDraftId"].Value.ParseToString() == prodId).Select(r => r.Cells["colSkuId"].Value.ParseToString()).ToList();
|
||||
|
||||
//if (chkSkipPriceEnd.Checked && txtSkipPriceEnd.Text.Trim().Length > 0 && skus.Any(s => (s.salePrice.ParseToInt() * 0.01m).ParseToString().EndsWith(txtSkipPriceEnd.Text.Trim())))
|
||||
//{
|
||||
@@ -1095,7 +1210,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
// continue;
|
||||
//}
|
||||
|
||||
if (skus.All(s => s.isAdded != true))
|
||||
if (skus.All(s => s.isAdded != true) && skuIds.Count == 0)
|
||||
{
|
||||
Invoke(new Action(() => { row.Cells["colOpResult"].Value = "已取消报名"; }));
|
||||
}
|
||||
@@ -1105,22 +1220,35 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
Invoke(new Action(() => { row.Cells["colOpResult"].Value = "正在取消报名"; }));
|
||||
}
|
||||
|
||||
skus = skus.Where(s => s.isAdded == true).ToList();
|
||||
foreach (var sku in skus)
|
||||
if (skus.Count > 0)
|
||||
{
|
||||
JObject prodObj = new JObject();
|
||||
prodObj["productId"] = prodId;
|
||||
prodObj["skuId"] = sku.product.skuId;
|
||||
//prodObj["activityStockNum"] = 0;
|
||||
//Invoke(new Action(() =>
|
||||
//{
|
||||
// if (cmbType.Text == "价格比例")
|
||||
// prodObj["activityPrice"] = (sku.salePrice.ParseToInt() * (100 - discountPercent) * 0.01m).ParseToInt();
|
||||
// else
|
||||
// prodObj["activityPrice"] = sku.salePrice.ParseToInt() - discountPrice;
|
||||
//}));
|
||||
//prodObj["stockMode"] = sku.defaultStockMode;
|
||||
jArr.Add(prodObj);
|
||||
skus = skus.Where(s => s.isAdded == true).ToList();
|
||||
foreach (var sku in skus)
|
||||
{
|
||||
JObject prodObj = new JObject();
|
||||
prodObj["productId"] = prodId;
|
||||
prodObj["skuId"] = sku.product.skuId;
|
||||
//prodObj["activityStockNum"] = 0;
|
||||
//Invoke(new Action(() =>
|
||||
//{
|
||||
// if (cmbType.Text == "价格比例")
|
||||
// prodObj["activityPrice"] = (sku.salePrice.ParseToInt() * (100 - discountPercent) * 0.01m).ParseToInt();
|
||||
// else
|
||||
// prodObj["activityPrice"] = sku.salePrice.ParseToInt() - discountPrice;
|
||||
//}));
|
||||
//prodObj["stockMode"] = sku.defaultStockMode;
|
||||
jArr.Add(prodObj);
|
||||
}
|
||||
}
|
||||
else if (skuIds.Count > 0)
|
||||
{
|
||||
foreach (var skuId in skuIds)
|
||||
{
|
||||
JObject prodObj = new JObject();
|
||||
prodObj["productId"] = prodId;
|
||||
prodObj["skuId"] = skuId;
|
||||
jArr.Add(prodObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
signActivityObj["productList"] = jArr;
|
||||
@@ -1316,6 +1444,291 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}));
|
||||
}, cancellationTokenSource.Token);
|
||||
}
|
||||
|
||||
private void panelEx2_Click(object sender, EventArgs e)
|
||||
{
|
||||
chkProdInActivity.Checked = true;
|
||||
var shopIdLst = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
|
||||
if (shopIdLst.Count <= 0)
|
||||
{
|
||||
BaseMsgForm.ShowError("未勾选查询店铺!");
|
||||
return;
|
||||
}
|
||||
btnSearchOrder.Enabled = false;
|
||||
pbLoading.Visible = true;
|
||||
if (cancellationTokenSource != null)
|
||||
cancellationTokenSource.Cancel();
|
||||
cancellationTokenSource = new CancellationTokenSource();
|
||||
dgvSelectProduct.Rows.Clear();
|
||||
Task.Run(() =>
|
||||
{
|
||||
GetActivityProductLst(shopIdLst);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
{
|
||||
this.statusBar.lblTaskStatus.Text = "活动商品查询停止";
|
||||
BaseMsgForm.ShowInfo("活动商品查询停止");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.statusBar.lblTaskStatus.Text = "活动商品查询完毕";
|
||||
BaseMsgForm.ShowInfo("活动商品查询完毕");
|
||||
}
|
||||
pbLoading.Visible = false;
|
||||
btnSearchOrder.Enabled = true;
|
||||
}));
|
||||
}, cancellationTokenSource.Token);
|
||||
}
|
||||
|
||||
private void btnStopSearch2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.cancellationTokenSource != null)
|
||||
this.cancellationTokenSource.Cancel();
|
||||
}
|
||||
|
||||
private void btnSetStock_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;
|
||||
}
|
||||
|
||||
this.pbLoading.Visible = true;
|
||||
if (cancellationTokenSource != null && !cancellationTokenSource.IsCancellationRequested)
|
||||
cancellationTokenSource.Cancel();
|
||||
cancellationTokenSource = new CancellationTokenSource();
|
||||
|
||||
DateTime nextTime = DateTime.Now;
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
do
|
||||
{
|
||||
if (DateTime.Now >= nextTime)
|
||||
{
|
||||
SetStock(rowLst);
|
||||
}
|
||||
nextTime = DateTime.Now.AddMinutes(txtIntervalMin.Text.ParseToInt());
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
while (chkSetStockLoop.Checked);
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
{
|
||||
this.statusBar.lblTaskStatus.Text = "修改库存中断";
|
||||
BaseMsgForm.ShowInfo("修改库存中断");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.statusBar.lblTaskStatus.Text = "修改库存完毕";
|
||||
BaseMsgForm.ShowInfo("修改库存完毕");
|
||||
}
|
||||
|
||||
this.pbLoading.Visible = false;
|
||||
}));
|
||||
}, cancellationTokenSource.Token);
|
||||
}
|
||||
|
||||
public void SetStock(List<DataGridViewRow> rowLst)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
this.statusBar.lblTaskStatus.Text = "正在报名活动" + "...".Substring(0, DateTime.Now.Second % 4);
|
||||
this.statusBar.pgbTaskProgress.Maximum = rowLst.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.RemoveAll(rw => rw.Cells["colDraftId"].Value == r.Cells["colDraftId"].Value);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
//{"cosignmentOrderId":"4436464658179189760","cosignmentProductList":[{"spuId":"10000826730228","skuId":"14511204738","cancelScene":2}],"orderId":"3736464645960385280"}
|
||||
JObject signActivityObj = new JObject();
|
||||
signActivityObj["platformActivityId"] = "1269";
|
||||
var jArr = new JArray();
|
||||
bool hasProdForCancelActivity = false;
|
||||
foreach (var row in rowLstTmp)
|
||||
{
|
||||
|
||||
Thread.Sleep(Randomx.GetId(10, 20));
|
||||
var prodId = row.Cells["colDraftId"].Value.ParseToString();
|
||||
|
||||
if (jArr.ParseToString().Contains(prodId))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var skus = this.wxActivityData.requestProductInfoList.resultList.Where(p => p.product.productId == prodId).ToList();
|
||||
var skuIds = rowLstTmp.Where(r => r.Cells["colDraftId"].Value.ParseToString() == prodId).Select(r => r.Cells["colSkuId"].Value.ParseToString()).ToList();
|
||||
|
||||
//if (chkSkipPriceEnd.Checked && txtSkipPriceEnd.Text.Trim().Length > 0 && skus.Any(s => (s.salePrice.ParseToInt() * 0.01m).ParseToString().EndsWith(txtSkipPriceEnd.Text.Trim())))
|
||||
//{
|
||||
// row.Cells["colOpResult"].Value = "价格尾数命中跳过";
|
||||
// continue;
|
||||
//}
|
||||
|
||||
if (skus.All(s => s.isAdded != true) && skuIds.Count == 0)
|
||||
{
|
||||
Invoke(new Action(() => { row.Cells["colOpResult"].Value = "已取消报名"; }));
|
||||
}
|
||||
else
|
||||
{
|
||||
hasProdForCancelActivity = true;
|
||||
Invoke(new Action(() => { row.Cells["colOpResult"].Value = "正在取消报名"; }));
|
||||
}
|
||||
|
||||
if (skus.Count > 0)
|
||||
{
|
||||
skus = skus.Where(s => s.isAdded == true).ToList();
|
||||
foreach (var sku in skus)
|
||||
{
|
||||
JObject prodObj = new JObject();
|
||||
prodObj["productId"] = prodId;
|
||||
prodObj["skuId"] = sku.product.skuId;
|
||||
//prodObj["activityStockNum"] = 0;
|
||||
//Invoke(new Action(() =>
|
||||
//{
|
||||
// if (cmbType.Text == "价格比例")
|
||||
// prodObj["activityPrice"] = (sku.salePrice.ParseToInt() * (100 - discountPercent) * 0.01m).ParseToInt();
|
||||
// else
|
||||
// prodObj["activityPrice"] = sku.salePrice.ParseToInt() - discountPrice;
|
||||
//}));
|
||||
//prodObj["stockMode"] = sku.defaultStockMode;
|
||||
jArr.Add(prodObj);
|
||||
}
|
||||
}
|
||||
else if (skuIds.Count > 0)
|
||||
{
|
||||
foreach (var skuId in skuIds)
|
||||
{
|
||||
JObject prodObj = new JObject();
|
||||
prodObj["productId"] = prodId;
|
||||
prodObj["skuId"] = skuId;
|
||||
jArr.Add(prodObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
signActivityObj["productList"] = jArr;
|
||||
signActivityObj["actionType"] = 1;
|
||||
|
||||
if (!hasProdForCancelActivity)
|
||||
continue;
|
||||
|
||||
var signRst = WXActivity.signWxActivity(shop, signActivityObj);
|
||||
Thread.Sleep(Randomx.GetId(500, 1000));
|
||||
if (!signRst.Contains("\"code\":0"))
|
||||
{
|
||||
if (signRst.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 signRst, "msg");
|
||||
if (string.IsNullOrWhiteSpace(errmsg))
|
||||
errmsg = signRst;
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
foreach (var row in rowLstTmp)
|
||||
{
|
||||
row.Cells["colOpResult"].Value = errmsg;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
JArray rstArr = new JArray();
|
||||
try
|
||||
{
|
||||
rstArr = JsonHelper.JObjectParse(signRst)["checkResultList"] as JArray;
|
||||
if (rstArr == null)
|
||||
rstArr = new JArray();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
if (signRst.Contains("\"code\":0"))
|
||||
{
|
||||
foreach (var row in rowLstTmp)
|
||||
{
|
||||
if (row.Cells["colOpResult"].Value.ParseToString() == "已取消报名")
|
||||
continue;
|
||||
|
||||
var errStr = "";
|
||||
var prodId = row.Cells["colDraftId"].Value.ParseToString();
|
||||
var jObjs = rstArr.Where(a => a["product"]["productId"].ParseToString() == prodId).ToList();
|
||||
foreach (var jObj in jObjs)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(jObj["invalidString"].ParseToString()))
|
||||
errStr += jObj["product"]["skuId"] + ":" + jObj["invalidString"] + ";";
|
||||
}
|
||||
errStr = errStr.Trim(';');
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
row.Cells["colOpResult"].Value = "取消报名成功 " + errStr;
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class WXActivity
|
||||
@@ -1368,7 +1781,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
|
||||
string url = "https://store.weixin.qq.com/shop-faas/mmeckolmarketingnode/activity/cgi/getPlatformInvestmentProductInfoList?token=&lang=zh_CN";
|
||||
string refere = "https://store.weixin.qq.com/shop/marketingkol/activity/detail?id=" + activityId + "&curTab=2";
|
||||
string data = @"{""platformActivityId"":""" + activityId + @""",""pageNum"":" + page + @",""pageSize"":" + pageSize + @",""auditStatus"":2,""productId"":""""}";
|
||||
string data = @"{""platformActivityId"":""" + activityId + @""",""pageNum"":" + page + @",""pageSize"":" + pageSize + @",""auditStatus"":0,""productId"":""""}";
|
||||
|
||||
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, data, refere);
|
||||
return result;
|
||||
@@ -1384,7 +1797,21 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
}
|
||||
|
||||
public class ActivityProd
|
||||
public class GetActivityInProdInfo
|
||||
{
|
||||
public int code { get; set; } // 0
|
||||
public List<ActivityInProd> productList { get; set; }
|
||||
public int totalNum { get; set; }
|
||||
public List<StatusNo> statusNumber { get; set; }
|
||||
}
|
||||
|
||||
public class StatusNo
|
||||
{
|
||||
public int? status { get; set; } // 1, // 审核中
|
||||
public int? number { get; set; } // 3 // 数量3
|
||||
}
|
||||
|
||||
public class ActivityInProd
|
||||
{
|
||||
public string requestTime { get; set; } // "1781096322",
|
||||
public string shopNickname { get; set; } // "夜笙供应链",
|
||||
|
||||
@@ -198,6 +198,9 @@
|
||||
<metadata name="colStock.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colIsGetActivityInProd.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colOpResult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
@@ -1288,7 +1288,6 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.colCheck.ReadOnly = true;
|
||||
this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colCheck.Visible = false;
|
||||
this.colCheck.Width = 30;
|
||||
//
|
||||
// colSelectId
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
dgvShop.Columns["colSelect"].HeaderText = "";
|
||||
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
|
||||
|
||||
this.dgvSelectProduct.AddSelectorColumn("colCheck");
|
||||
//this.dgvSelectProduct.AddSelectorColumn("colCheck");
|
||||
|
||||
dgvSelectProduct.AddImgColumn("colProductSkcPic", "colImgUrl");
|
||||
dgvSelectProduct.AddImgColumn("colSkuFakeImg", "colSkuFakeImgUrl");
|
||||
@@ -367,6 +367,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
break;
|
||||
}
|
||||
case "":
|
||||
case "选择":
|
||||
dgvSelectProduct.Rows[e.RowIndex].Cells["colCheck"].Value = !(bool)dgvSelectProduct.Rows[e.RowIndex].Cells["colCheck"].Value;
|
||||
break;
|
||||
default:
|
||||
@@ -481,6 +482,10 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//getProdOnSaleRst = WXClearNoVisit260606.searchProduct(shop, 1, pageSize, spuIds, onSaleStatusCode);
|
||||
|
||||
pageSize = 50;
|
||||
if (page > 3)
|
||||
{
|
||||
|
||||
}
|
||||
getProdOnSaleRst = WxPlatformRecommendProdManage.searchProductWithSaleStatus(shop, page, pageSize, onSaleStatusCode);
|
||||
Thread.Sleep(Randomx.GetId(50, 100));
|
||||
if (!getProdOnSaleRst.Contains("\"success\":true"))
|
||||
@@ -531,14 +536,14 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
WXPlatformRecommendProdInfo recommendProd = new WXPlatformRecommendProdInfo();
|
||||
recommendProd.product_id = wxProdObj["productId"].ParseToString();
|
||||
recommendProd.title = wxProdObj["title"].ParseToString();
|
||||
var ViewUvCnt = productMetric.rowsMap
|
||||
var ViewUvCnt = productMetric.rowsMap?
|
||||
.Where(r => r.value?.spu_id_ == recommendProd.product_id)
|
||||
.Sum(r => r.value?.shopxspu_growth_product_view_cnt_30d_2.ParseToInt());
|
||||
recommendProd.product_view_uv = ViewUvCnt.ParseToString();
|
||||
var PayCnt = productMetric.rowsMap
|
||||
recommendProd.product_view_uv = ViewUvCnt.ParseToInt().ParseToString();
|
||||
var PayCnt = productMetric.rowsMap?
|
||||
.Where(r => r.value?.spu_id_ == recommendProd.product_id)
|
||||
.Sum(r => r.value?.shopxspu_growth_pay_product_cnt_30d_2.ParseToInt());
|
||||
recommendProd.pay_order_cnt = PayCnt.ParseToString();
|
||||
recommendProd.pay_order_cnt = PayCnt.ParseToInt().ParseToString();
|
||||
if (ViewUvCnt > 0)
|
||||
recommendProds.Add(recommendProd);
|
||||
|
||||
@@ -604,7 +609,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
"", // 备注
|
||||
"", // 操作结果
|
||||
"删除",
|
||||
BaseClass.StampToDateTime(wxProdObj["lastEditDraftTime"].ParseToInt()).ToString("yy-MM-dd HH:mm"),
|
||||
BaseClass.StampToDateTime(wxProdObj["updateStatusTime"].ParseToInt()).ToString("yy-MM-dd HH:mm"),
|
||||
"");
|
||||
|
||||
dgvSelectProduct.Rows[rowIndex].Height = 60;
|
||||
|
||||
Reference in new issue
Block a user