微信订单管理功能

This commit is contained in:
wule committed 2026-05-23 18:42:47 +08:00
1 parent e5910fc100
commit 2afe960b6c
19 files changed
+2095 -318

No files matched your search

@@ -32,13 +32,13 @@ 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 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.label1 = new System.Windows.Forms.Label();
@@ -111,6 +111,9 @@ namespace TemuKJD.WXForms.ProductForms
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.chkSkipPriceEnd = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.txtSkipPriceEnd = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -166,6 +169,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.label2);
this.ucGroupBoxEx3.Controls.Add(this.txtSkipPriceEnd);
this.ucGroupBoxEx3.Controls.Add(this.chkSkipPriceEnd);
this.ucGroupBoxEx3.Controls.Add(this.label1);
this.ucGroupBoxEx3.Controls.Add(this.flowLayoutPanel1);
this.ucGroupBoxEx3.Controls.Add(this.cmbType);
@@ -320,7 +326,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnSetActivity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSetActivity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSetActivity.TabIndex = 517;
this.btnSetActivity.Text = "批量设置";
this.btnSetActivity.Text = "批量报名";
this.btnSetActivity.Click += new System.EventHandler(this.btnSetActivity_Click);
//
// ucGroupBoxEx4
@@ -783,19 +789,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
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)))));
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;
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,
@@ -957,19 +963,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
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)))));
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;
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,
@@ -1017,8 +1023,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colSupplierName
//
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle19;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
this.colSupplierName.ReadOnly = true;
@@ -1075,8 +1081,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductName
//
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle20;
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -1103,8 +1109,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colStock
//
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colStock.DefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colStock.DefaultCellStyle = dataGridViewCellStyle21;
this.colStock.HeaderText = "库存";
this.colStock.Name = "colStock";
this.colStock.ReadOnly = true;
@@ -1197,6 +1203,37 @@ namespace TemuKJD.WXForms.ProductForms
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Visible = false;
//
// chkSkipPriceEnd
//
this.chkSkipPriceEnd.AutoSize = true;
this.chkSkipPriceEnd.Location = new System.Drawing.Point(25, 73);
this.chkSkipPriceEnd.Name = "chkSkipPriceEnd";
this.chkSkipPriceEnd.Size = new System.Drawing.Size(111, 21);
this.chkSkipPriceEnd.TabIndex = 853;
this.chkSkipPriceEnd.Text = "跳过价格尾数为";
this.chkSkipPriceEnd.UseVisualStyleBackColor = true;
//
// txtSkipPriceEnd
//
this.txtSkipPriceEnd.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.txtSkipPriceEnd.Font = new System.Drawing.Font("微软雅黑", 10F);
this.txtSkipPriceEnd.Location = new System.Drawing.Point(128, 71);
this.txtSkipPriceEnd.Margin = new System.Windows.Forms.Padding(0);
this.txtSkipPriceEnd.Name = "txtSkipPriceEnd";
this.txtSkipPriceEnd.Size = new System.Drawing.Size(47, 25);
this.txtSkipPriceEnd.TabIndex = 854;
this.txtSkipPriceEnd.Text = ".66";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(177, 75);
this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 17);
this.label2.TabIndex = 855;
this.label2.Text = "商品";
//
// WXActivity618Form
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1315,5 +1352,8 @@ namespace TemuKJD.WXForms.ProductForms
private System.Windows.Forms.DataGridViewTextBoxColumn colValidPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colStock;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private System.Windows.Forms.TextBox txtSkipPriceEnd;
private UserComponent.UcCheckBox chkSkipPriceEnd;
private System.Windows.Forms.Label label2;
}
}
@@ -741,13 +741,13 @@ namespace TemuKJD.WXForms.ProductForms
{
if (cancellationTokenSource.IsCancellationRequested)
{
this.statusBar.lblTaskStatus.Text = "设置活动中断";
BaseMsgForm.ShowInfo("设置活动中断");
this.statusBar.lblTaskStatus.Text = "报名活动中断";
BaseMsgForm.ShowInfo("报名活动中断");
}
else
{
this.statusBar.lblTaskStatus.Text = "设置活动完毕";
BaseMsgForm.ShowInfo("设置活动完毕");
this.statusBar.lblTaskStatus.Text = "报名活动完毕";
BaseMsgForm.ShowInfo("报名活动完毕");
}
this.pbLoading.Visible = false;
@@ -760,7 +760,7 @@ namespace TemuKJD.WXForms.ProductForms
Invoke(new Action(() =>
{
this.pbLoading.Visible = true;
this.statusBar.lblTaskStatus.Text = "正在设置活动" + "...".Substring(0, DateTime.Now.Second % 4);
this.statusBar.lblTaskStatus.Text = "正在报名活动" + "...".Substring(0, DateTime.Now.Second % 4);
this.statusBar.pgbTaskProgress.Maximum = rowLst.Count;
this.statusBar.UpdateProgressBar(0);
}));
@@ -781,7 +781,7 @@ namespace TemuKJD.WXForms.ProductForms
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在设置活动" + "...".Substring(0, DateTime.Now.Second % 4);
this.statusBar.lblTaskStatus.Text = "正在报名活动" + "...".Substring(0, DateTime.Now.Second % 4);
this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1);
r.Cells["colOpResult"].Value = "";
}));
@@ -828,6 +828,14 @@ namespace TemuKJD.WXForms.ProductForms
hasProdForActivity = true;
Invoke(new Action(() => { row.Cells["colOpResult"].Value = "正在报名"; }));
}
if (chkSkipPriceEnd.Checked && txtSkipPriceEnd.Text.Trim().Length > 0 && skus.Any(s => (s.salePrice.ParseToInt() * 0.01m).ParseToString().EndsWith(txtSkipPriceEnd.Text.Trim())))
{
hasProdForActivity = false;
row.Cells["colOpResult"].Value = "价格尾数命中跳过";
break;
}
skus = skus.Where(s => s.isAdded != true).ToList();
foreach (var sku in skus)
{