新代理 图标问题修复

This commit is contained in:
wule committed 2026-08-28 04:31:11 +08:00
1 parent ff3ee89383
commit 50702e461a
26 files changed
+787 -255

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 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();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.ucCheckBox2 = new TemuKJD.UserComponent.UcCheckBox(this.components);
@@ -209,27 +209,26 @@ namespace TemuKJD.WXForms.ProductForms
// ucCheckBox2
//
this.ucCheckBox2.AutoSize = true;
this.ucCheckBox2.Checked = true;
this.ucCheckBox2.CheckState = System.Windows.Forms.CheckState.Checked;
this.ucCheckBox2.Location = new System.Drawing.Point(239, 31);
this.ucCheckBox2.Location = new System.Drawing.Point(25, 31);
this.ucCheckBox2.Name = "ucCheckBox2";
this.ucCheckBox2.Size = new System.Drawing.Size(147, 21);
this.ucCheckBox2.Size = new System.Drawing.Size(195, 21);
this.ucCheckBox2.TabIndex = 896;
this.ucCheckBox2.Text = "限时秒杀频道招商活动";
this.ucCheckBox2.Text = "金秋大促跨店满减补贴(混资)";
this.ucCheckBox2.UseVisualStyleBackColor = true;
this.ucCheckBox2.Visible = false;
this.ucCheckBox2.CheckedChanged += new System.EventHandler(this.ucCheckBox2_CheckedChanged);
//
// ucCheckBox1
//
this.ucCheckBox1.AutoSize = true;
this.ucCheckBox1.Checked = true;
this.ucCheckBox1.CheckState = System.Windows.Forms.CheckState.Checked;
this.ucCheckBox1.Location = new System.Drawing.Point(25, 31);
this.ucCheckBox1.Location = new System.Drawing.Point(245, 31);
this.ucCheckBox1.Name = "ucCheckBox1";
this.ucCheckBox1.Size = new System.Drawing.Size(180, 21);
this.ucCheckBox1.TabIndex = 895;
this.ucCheckBox1.Text = "“清凉季”+“开学季”活动";
this.ucCheckBox1.UseVisualStyleBackColor = true;
this.ucCheckBox1.CheckedChanged += new System.EventHandler(this.ucCheckBox1_CheckedChanged);
//
// pnlStock
//
@@ -607,9 +606,9 @@ namespace TemuKJD.WXForms.ProductForms
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.Location = new System.Drawing.Point(10, 120);
this.btnGetInActivityProd.Name = "btnGetInActivityProd";
this.btnGetInActivityProd.Size = new System.Drawing.Size(101, 25);
this.btnGetInActivityProd.Size = new System.Drawing.Size(94, 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)))));
@@ -691,7 +690,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnStopSearch.CanvasColor = System.Drawing.SystemColors.Control;
this.btnStopSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStopSearch.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStopSearch.Location = new System.Drawing.Point(193, 120);
this.btnStopSearch.Location = new System.Drawing.Point(199, 120);
this.btnStopSearch.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnStopSearch.Name = "btnStopSearch";
this.btnStopSearch.Size = new System.Drawing.Size(58, 25);
@@ -718,7 +717,7 @@ 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(124, 120);
this.btnSearchOrder.Location = new System.Drawing.Point(130, 120);
this.btnSearchOrder.Name = "btnSearchOrder";
this.btnSearchOrder.Size = new System.Drawing.Size(66, 25);
this.btnSearchOrder.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -1078,19 +1077,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle8.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8;
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;
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;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -1252,19 +1251,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle10.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
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;
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;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -1313,8 +1312,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colSupplierName
//
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle12;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
this.colSupplierName.ReadOnly = true;
@@ -1371,8 +1370,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductName
//
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle13;
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -1399,8 +1398,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colStock
//
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colStock.DefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colStock.DefaultCellStyle = dataGridViewCellStyle14;
this.colStock.HeaderText = "库存";
this.colStock.Name = "colStock";
this.colStock.ReadOnly = true;
@@ -39,6 +39,7 @@ namespace TemuKJD.WXForms.ProductForms
int PageEnd = 9999;
int discountPrice = 10;
int discountPercent = 1;
public string currentActivityId = "1269";
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
public bool IsLoadComplate { get; set; } = false;
@@ -85,6 +86,8 @@ namespace TemuKJD.WXForms.ProductForms
cmbType.Enabled = false;
cmbType.Text = "价格比例";
txtPercent.Text = "10";
ucCheckBox2.Checked = true;
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
@@ -461,21 +464,21 @@ namespace TemuKJD.WXForms.ProductForms
}
// 查找报名活动权限
var result = WXActivity.getShopCanActivity(shop);
var result = WXActivity.getShopCanActivity(shop, currentActivityId);
if (!result.Contains("\"code\":0"))
{
ShowShopError(shop, result);
continue;
}
Thread.Sleep(Randomx.GetId(200, 1000));
if (result.Contains("\"conditionState\":3"))
if (result.Contains("\"conditionState\":3") && currentActivityId != "1323")
{
Invoke(new Action(() => { BindShop(shop, new List<string> { shop.ShopId }, "店铺不符合报名条件"); }));
continue;
}
if (result.Contains("\"requestState\":3"))
{
result = WXActivity.applyShopActivity(shop);
result = WXActivity.applyShopActivity(shop, currentActivityId);
if (!result.Contains("\"code\":0"))
{
ShowShopError(shop, result);
@@ -500,7 +503,7 @@ namespace TemuKJD.WXForms.ProductForms
if (1==1)
{
getActivityProdRst = WXActivity.getProdInActivityList(shop, page, pageSize);
getActivityProdRst = WXActivity.getProdInActivityList(shop, page, pageSize, currentActivityId);
Thread.Sleep(Randomx.GetId(150, 300));
if (!getActivityProdRst.Contains("\"code\":0"))
@@ -579,7 +582,7 @@ namespace TemuKJD.WXForms.ProductForms
if (1 == 2)
{
getActivityProdRst = WXActivity.getActivityProdList(shop, page, pageSize);
getActivityProdRst = WXActivity.getActivityProdList(shop, page, pageSize, currentActivityId);
Thread.Sleep(Randomx.GetId(150, 300));
if (!getActivityProdRst.Contains("\"code\":0"))
@@ -664,9 +667,14 @@ namespace TemuKJD.WXForms.ProductForms
{
//getActivityProdRst = WXActivity.getActivityProdList(shop, page, pageSize);
getActivityProdRst = WXActivity.getShopActivityCanApplyProduct(shop, page, pageSize);
getActivityProdRst = WXActivity.getShopActivityCanApplyProduct(shop, page, pageSize, currentActivityId);
Thread.Sleep(Randomx.GetId(150, 300));
if (!getActivityProdRst.Contains("\"code\":0"))
{
Thread.Sleep(10000);
getActivityProdRst = WXActivity.getShopActivityCanApplyProduct(shop, page, pageSize, currentActivityId);
}
if (!getActivityProdRst.Contains("\"code\":0"))
{
ShowShopError(shop, getActivityProdRst);
break;
@@ -1003,7 +1011,7 @@ namespace TemuKJD.WXForms.ProductForms
//{"cosignmentOrderId":"4436464658179189760","cosignmentProductList":[{"spuId":"10000826730228","skuId":"14511204738","cancelScene":2}],"orderId":"3736464645960385280"}
JObject signActivityObj = new JObject();
signActivityObj["platformActivityId"] = "1269";
signActivityObj["platformActivityId"] = currentActivityId;
var jArr = new JArray();
bool hasProdForActivity = false;
foreach (var row in rowLstTmp)
@@ -1062,7 +1070,7 @@ namespace TemuKJD.WXForms.ProductForms
if (!hasProdForActivity)
continue;
var signRst = WXActivity.signWxActivity(shop, signActivityObj);
var signRst = WXActivity.signWxActivity(shop, signActivityObj, currentActivityId);
Thread.Sleep(Randomx.GetId(500, 1000));
if (!signRst.Contains("\"code\":0"))
{
@@ -1187,7 +1195,7 @@ namespace TemuKJD.WXForms.ProductForms
//{"cosignmentOrderId":"4436464658179189760","cosignmentProductList":[{"spuId":"10000826730228","skuId":"14511204738","cancelScene":2}],"orderId":"3736464645960385280"}
JObject signActivityObj = new JObject();
signActivityObj["platformActivityId"] = "1269";
signActivityObj["platformActivityId"] = currentActivityId;
var jArr = new JArray();
bool hasProdForCancelActivity = false;
foreach (var row in rowLstTmp)
@@ -1257,7 +1265,7 @@ namespace TemuKJD.WXForms.ProductForms
if (!hasProdForCancelActivity)
continue;
var signRst = WXActivity.signWxActivity(shop, signActivityObj);
var signRst = WXActivity.signWxActivity(shop, signActivityObj, currentActivityId);
Thread.Sleep(Randomx.GetId(500, 1000));
if (!signRst.Contains("\"code\":0"))
{
@@ -1591,7 +1599,7 @@ namespace TemuKJD.WXForms.ProductForms
//{"cosignmentOrderId":"4436464658179189760","cosignmentProductList":[{"spuId":"10000826730228","skuId":"14511204738","cancelScene":2}],"orderId":"3736464645960385280"}
JObject signActivityObj = new JObject();
signActivityObj["platformActivityId"] = "1269";
signActivityObj["platformActivityId"] = currentActivityId;
var jArr = new JArray();
bool hasProdForCancelActivity = false;
foreach (var row in rowLstTmp)
@@ -1661,7 +1669,7 @@ namespace TemuKJD.WXForms.ProductForms
if (!hasProdForCancelActivity)
continue;
var signRst = WXActivity.signWxActivity(shop, signActivityObj);
var signRst = WXActivity.signWxActivity(shop, signActivityObj, currentActivityId);
Thread.Sleep(Randomx.GetId(500, 1000));
if (!signRst.Contains("\"code\":0"))
{
@@ -1729,12 +1737,46 @@ namespace TemuKJD.WXForms.ProductForms
}
}
}
private void ucCheckBox2_CheckedChanged(object sender, EventArgs e)
{
if (ucCheckBox2.Checked)
{
ucCheckBox1.Checked = false;
currentActivityId = "1323";
cmbType.Enabled = true;
cmbType.Text = "固定金额";
if (dgvSelectProduct.Rows.Count > 0)
{
BaseMsgForm.ShowInfo("检测到有已查询商品,由于不同活动可报名商品可能不同,建议重新查询活动商品");
}
}
}
private void ucCheckBox1_CheckedChanged(object sender, EventArgs e)
{
if (ucCheckBox1.Checked)
{
ucCheckBox2.Checked = false;
currentActivityId = "1269";
cmbType.Enabled = false;
cmbType.Text = "价格比例";
if (dgvSelectProduct.Rows.Count > 0)
{
BaseMsgForm.ShowInfo("检测到有已查询商品,由于不同活动可报名商品可能不同,建议重新查询活动商品");
}
}
}
}
public class WXActivity
{
// https://store.weixin.qq.com/shop/marketingkol/activity/detail?id=1269&curTab=2
//1016 618活动 1163 入夏好物 1269 “清凉季”+“开学季”活动
//1016 618活动 1163 入夏好物 1269 “清凉季”+“开学季”活动 1323 金秋大促跨店满减补贴(混资)
public static string getShopCanActivity(ShopLoginInfo shop, string activityId = "1269")
{
string url = "https://store.weixin.qq.com/shop-faas/mmeckolmarketingnode/activity/cgi/queryShopPlatformActivity?token=&lang=zh_CN&platformActivityId=" + activityId;