选品上传翻译商品标题 库存上传逻辑优化提高直接上传成功率 拼多多优化限时限量优惠结束逻辑

This commit is contained in:
wule committed 2025-10-24 18:15:17 +08:00
1 parent 73f9fcd8bc
commit ab33a9c0c0
19 files changed
+856 -320

No files matched your search

@@ -678,7 +678,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
loginForm.WindowState = FormWindowState.Maximized;
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
loginForm.Dock = DockStyle.Fill;
this.panel1.Controls.Add(loginForm);
loginForm.Show();
@@ -36,8 +36,11 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.label3 = new System.Windows.Forms.Label();
this.numMinSaleCount = new System.Windows.Forms.NumericUpDown();
this.btnStopActvity = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.pnlTime = new System.Windows.Forms.Panel();
this.dtpCoupon1StartTime = new System.Windows.Forms.DateTimePicker();
this.lblStartTime = new System.Windows.Forms.Label();
@@ -102,6 +105,8 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numMinSaleCount)).BeginInit();
this.ucGroupBoxEx2.SuspendLayout();
this.pnlTime.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numCoupon1KeepDays)).BeginInit();
@@ -137,6 +142,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx3);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
//
@@ -147,6 +153,76 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.splitContainer1.SplitterDistance = 140;
this.splitContainer1.TabIndex = 15;
//
// ucGroupBoxEx3
//
this.ucGroupBoxEx3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
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.label3);
this.ucGroupBoxEx3.Controls.Add(this.numMinSaleCount);
this.ucGroupBoxEx3.Controls.Add(this.btnStopActvity);
this.ucGroupBoxEx3.Location = new System.Drawing.Point(901, 2);
this.ucGroupBoxEx3.Name = "ucGroupBoxEx3";
this.ucGroupBoxEx3.Size = new System.Drawing.Size(280, 140);
this.ucGroupBoxEx3.TabIndex = 668;
this.ucGroupBoxEx3.TabStop = false;
this.ucGroupBoxEx3.Text = "结束活动";
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(35, 25);
this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 17);
this.label3.TabIndex = 755;
this.label3.Text = "销量≥";
//
// numMinSaleCount
//
this.numMinSaleCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.numMinSaleCount.Location = new System.Drawing.Point(76, 22);
this.numMinSaleCount.Maximum = new decimal(new int[] {
1000,
0,
0,
0});
this.numMinSaleCount.Name = "numMinSaleCount";
this.numMinSaleCount.Size = new System.Drawing.Size(41, 23);
this.numMinSaleCount.TabIndex = 753;
this.numMinSaleCount.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// btnStopActvity
//
this.btnStopActvity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStopActvity.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStopActvity.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnStopActvity.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStopActvity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStopActvity.Location = new System.Drawing.Point(154, 22);
this.btnStopActvity.Name = "btnStopActvity";
this.btnStopActvity.Size = new System.Drawing.Size(104, 23);
this.btnStopActvity.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopActvity.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopActvity.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopActvity.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnStopActvity.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnStopActvity.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnStopActvity.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnStopActvity.Style.GradientAngle = 90;
this.btnStopActvity.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopActvity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnStopActvity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnStopActvity.TabIndex = 746;
this.btnStopActvity.Text = "一键结束活动";
this.btnStopActvity.Click += new System.EventHandler(this.btnStopActvity_Click);
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -154,7 +230,6 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.btnStopActvity);
this.ucGroupBoxEx2.Controls.Add(this.pnlTime);
this.ucGroupBoxEx2.Controls.Add(this.numQuantity);
this.ucGroupBoxEx2.Controls.Add(this.lblQuantity);
@@ -173,36 +248,11 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.ucGroupBoxEx2.Controls.Add(this.btnCreate);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(147, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(1034, 140);
this.ucGroupBoxEx2.Size = new System.Drawing.Size(754, 140);
this.ucGroupBoxEx2.TabIndex = 667;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "商品查询创建";
//
// btnStopActvity
//
this.btnStopActvity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStopActvity.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStopActvity.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnStopActvity.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStopActvity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStopActvity.Location = new System.Drawing.Point(898, 87);
this.btnStopActvity.Name = "btnStopActvity";
this.btnStopActvity.Size = new System.Drawing.Size(104, 23);
this.btnStopActvity.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopActvity.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopActvity.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopActvity.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnStopActvity.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnStopActvity.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnStopActvity.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnStopActvity.Style.GradientAngle = 90;
this.btnStopActvity.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopActvity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnStopActvity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnStopActvity.TabIndex = 746;
this.btnStopActvity.Text = "一键结束活动";
this.btnStopActvity.Click += new System.EventHandler(this.btnStopActvity_Click);
//
// pnlTime
//
this.pnlTime.Controls.Add(this.dtpCoupon1StartTime);
@@ -310,7 +360,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
// chkTime
//
this.chkTime.AutoSize = true;
this.chkTime.Location = new System.Drawing.Point(160, 19);
this.chkTime.Location = new System.Drawing.Point(160, 23);
this.chkTime.Name = "chkTime";
this.chkTime.Size = new System.Drawing.Size(99, 21);
this.chkTime.TabIndex = 731;
@@ -407,7 +457,8 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.chkQuantity.AutoSize = true;
this.chkQuantity.Checked = true;
this.chkQuantity.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkQuantity.Location = new System.Drawing.Point(14, 19);
this.chkQuantity.Enabled = false;
this.chkQuantity.Location = new System.Drawing.Point(14, 23);
this.chkQuantity.Name = "chkQuantity";
this.chkQuantity.Size = new System.Drawing.Size(99, 21);
this.chkQuantity.TabIndex = 659;
@@ -427,17 +478,17 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
//
// txtCoupon1Name
//
this.txtCoupon1Name.Location = new System.Drawing.Point(452, 18);
this.txtCoupon1Name.Location = new System.Drawing.Point(452, 22);
this.txtCoupon1Name.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtCoupon1Name.Name = "txtCoupon1Name";
this.txtCoupon1Name.Size = new System.Drawing.Size(74, 23);
this.txtCoupon1Name.Size = new System.Drawing.Size(110, 23);
this.txtCoupon1Name.TabIndex = 489;
this.txtCoupon1Name.Text = "限量优惠";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(396, 21);
this.label2.Location = new System.Drawing.Point(396, 25);
this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17);
@@ -451,7 +502,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.btnCreate.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCreate.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCreate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCreate.Location = new System.Drawing.Point(898, 32);
this.btnCreate.Location = new System.Drawing.Point(627, 22);
this.btnCreate.Name = "btnCreate";
this.btnCreate.Size = new System.Drawing.Size(104, 23);
this.btnCreate.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -967,6 +1018,9 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx3.ResumeLayout(false);
this.ucGroupBoxEx3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numMinSaleCount)).EndInit();
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.pnlTime.ResumeLayout(false);
@@ -1061,5 +1115,8 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
private System.Windows.Forms.DataGridViewTextBoxColumn colSalesThirtyDays;
private System.Windows.Forms.DataGridViewTextBoxColumn colIsCanSet;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private UserComponent.UcGroupBoxEx ucGroupBoxEx3;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.NumericUpDown numMinSaleCount;
}
}
@@ -312,6 +312,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.dgvProduct.Columns["colActivityPrice"].Visible = false;
ucGroupBoxEx2.Enabled = false;
ucGroupBoxEx3.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
@@ -675,6 +676,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
Invoke(new Action(() =>
{
ucGroupBoxEx2.Enabled = true;
ucGroupBoxEx3.Enabled = true;
string sRst = "设置结束!";
if (cancellationTokenSource.IsCancellationRequested)
sRst = "已取消设置!";
@@ -684,6 +686,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
}));
}, cancellationTokenSource.Token);
}
public void GetToken(ShopLoginInfo shop)
{
if (!dicShopGetCount.Keys.Contains(shop))
@@ -728,7 +731,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
loginForm.WindowState = FormWindowState.Maximized;
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
loginForm.Dock = DockStyle.Fill;
this.panel1.Controls.Add(loginForm);
loginForm.Show();
@@ -835,6 +838,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.dgvProduct.Columns["colActivityPrice"].Visible = true;
ucGroupBoxEx2.Enabled = false;
ucGroupBoxEx3.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
@@ -894,14 +898,11 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
int totalPage = 1;
bool isError = false;
string errMsg = "";
while (page < totalPage)
while (page <= totalPage)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
if (page == 0)
page++;
int tryCount = 0;
tryAgain:
@@ -910,6 +911,9 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
if (page >= 1)
Thread.Sleep(Randomx.GetId(3000, 7000));
if (page == 0)
page++;
//long startStamp = BaseClass.DateTimeToTimestampSeconds(dtpCoupon1StartTime.Value);
//long endStamp = BaseClass.DateTimeToTimestampSeconds(dtpCoupon1StartTime.Value.Date.AddDays(numCoupon1KeepDays.Value.ParseToInt())) - 1;
string jsonStr = get_xianshixianliang_activity_prod_list(shop, page, pageSize);
@@ -935,6 +939,9 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
if (jsonStr.Contains("\"success\":true"))
{
int total = BaseRegex.GetStringJson(ref jsonStr, "online_sum").ParseToInt();
totalPage = Math.Ceiling(1m * total / pageSize).ParseToInt();
MarketingActivityResult marketingActivityRst = new MarketingActivityResult();
try
{
@@ -947,6 +954,14 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
BaseMsgForm.ShowError(ex.Message);
}
marketingActivityRst.marketing_activity_list = marketingActivityRst.marketing_activity_list
.Where(r => !activityGoodsInfoLst.Any(a => a.activity_id == r.activity_id)).ToList();
if (marketingActivityRst.marketing_activity_list.Count == 0)
{
page++;
continue;
}
foreach (var pInfo in marketingActivityRst.marketing_activity_list)
{
if (pInfo.online_quantity < pInfo.online_activity_quantity)
@@ -954,7 +969,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
}
pInfo.shopId = shop.ShopId;
pInfo.shopName = shop.ShopAccount;
if (pInfo != null && !activityGoodsInfoLst.Any(a => a.goods_id == pInfo.goods_id))
if (pInfo != null && !activityGoodsInfoLst.Any(a => a.activity_id == pInfo.activity_id))
{
activityGoodsInfoLst.Add(pInfo);
string url = pInfo.hd_thumb_url;
@@ -983,6 +998,10 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
}));
}
}
//筛选销量达标的,如果没有则下一页
marketingActivityRst.marketing_activity_list = marketingActivityRst.marketing_activity_list
.Where(r => r.sold_activity_quantity >= numMinSaleCount.Value).ToList();
if (marketingActivityRst.marketing_activity_list.Count == 0)
{
page++;
@@ -991,6 +1010,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
foreach (var activityGoods in marketingActivityRst.marketing_activity_list)
{
Thread.Sleep(Randomx.GetId(500, 1500));
if (cancellationTokenSource.IsCancellationRequested)
break;
@@ -1020,9 +1040,6 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
}
}
}
int total = BaseRegex.GetStringJson(ref jsonStr, "online_sum").ParseToInt();
totalPage = Math.Ceiling(1m * total / pageSize).ParseToInt();
}
}
@@ -1049,6 +1066,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
Invoke(new Action(() =>
{
ucGroupBoxEx2.Enabled = true;
ucGroupBoxEx3.Enabled = true;
string sRst = "结束活动已完成!";
if (cancellationTokenSource.IsCancellationRequested)
sRst = "已取消结束活动!";
@@ -1094,8 +1112,17 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
public string hd_thumb_url { get; set; }
public int? min_on_sale_group_price { get; set; }
public int? max_on_sale_group_price { get; set; }
/// <summary>
/// 商品总库存
/// </summary>
public int? online_quantity { get; set; }// 1584,
/// <summary>
/// 剩余库存
/// </summary>
public int? online_activity_quantity { get; set; }// 100,
/// <summary>
/// 已售出库存
/// </summary>
public int? sold_activity_quantity { get; set; }// 0,
public List<price_info> price_info { get; set; }
@@ -1107,5 +1134,14 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
{
public int? max_pre_sale_price { get; set; }// 8613,
public int? min_pre_sale_price { get; set; }// 8343,
/// <summary>
/// 活动开始时的库存
/// </summary>
public int? activity_quantity { get; set; }// 100,
/// <summary>
/// 活动剩余库存
/// </summary>
public int? activity_stock_quantity{ get; set; }// 94,
}
}
@@ -592,7 +592,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
loginForm.WindowState = FormWindowState.Maximized;
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
loginForm.Dock = DockStyle.Fill;
this.panel1.Controls.Add(loginForm);
loginForm.Show();
@@ -577,7 +577,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
// loginForm.TopLevel = false;
// loginForm.openType = EnumOpenType.manage;
// loginForm.WindowState = FormWindowState.Maximized;
// loginForm.InitUrl = "https://mms.pinduoduo.com/tool/surprise-coupon/create/";
// loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
// loginForm.Dock = DockStyle.Fill;
// this.panel1.Controls.Add(loginForm);
// loginForm.Show();
@@ -593,7 +593,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
loginForm.WindowState = FormWindowState.Maximized;
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
loginForm.Dock = DockStyle.Fill;
this.panel1.Controls.Add(loginForm);
loginForm.Show();
+238 -186
View File
@@ -30,19 +30,12 @@ namespace TemuKJD.PDDForms.ProductForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
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 dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.panel1 = new System.Windows.Forms.Panel();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnUp = new DevComponents.DotNetBar.PanelEx();
this.btnDown = new DevComponents.DotNetBar.PanelEx();
@@ -66,6 +59,8 @@ namespace TemuKJD.PDDForms.ProductForms
this.label6 = new System.Windows.Forms.Label();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -77,6 +72,8 @@ namespace TemuKJD.PDDForms.ProductForms
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.panel1 = new System.Windows.Forms.Panel();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.dgvProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
@@ -96,11 +93,20 @@ namespace TemuKJD.PDDForms.ProductForms
this.colIsOnSale = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colStatus = 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.txtMinPrice = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtMaxPrice = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
this.splitContainer3.Panel1.SuspendLayout();
this.splitContainer3.Panel2.SuspendLayout();
@@ -109,16 +115,14 @@ namespace TemuKJD.PDDForms.ProductForms
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
this.splitContainer4.Panel1.SuspendLayout();
this.splitContainer4.Panel2.SuspendLayout();
this.splitContainer4.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
@@ -141,139 +145,6 @@ namespace TemuKJD.PDDForms.ProductForms
this.splitContainer1.SplitterDistance = 140;
this.splitContainer1.TabIndex = 12;
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
this.splitContainer3.Name = "splitContainer3";
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer3.Panel1
//
this.splitContainer3.Panel1.Controls.Add(this.splitContainer2);
//
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1362, 437);
this.splitContainer3.SplitterDistance = 407;
this.splitContainer3.TabIndex = 1;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvShop);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.pbLoading);
this.splitContainer2.Panel2.Controls.Add(this.panel1);
this.splitContainer2.Panel2.Controls.Add(this.dgvProduct);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1362, 407);
this.splitContainer2.SplitterDistance = 300;
this.splitContainer2.TabIndex = 0;
//
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(504, 178);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 188;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel1.Controls.Add(this.ucSplitPage1);
this.panel1.Location = new System.Drawing.Point(36, 53);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(984, 321);
this.panel1.TabIndex = 189;
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
this.splitContainer4.Size = new System.Drawing.Size(1362, 26);
this.splitContainer4.SplitterDistance = 671;
this.splitContainer4.TabIndex = 3;
//
// btnClear
//
this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(4, 2);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.TabIndex = 440;
this.btnClear.Text = "清空结果";
this.btnClear.Visible = false;
//
// panelEx1
//
this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx1.Location = new System.Drawing.Point(568, 3);
this.panelEx1.Name = "panelEx1";
this.panelEx1.Size = new System.Drawing.Size(115, 21);
this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelEx1.Style.GradientAngle = 90;
this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.panelEx1.TabIndex = 668;
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Click += new System.EventHandler(this.btnCancel_Click);
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -281,6 +152,10 @@ namespace TemuKJD.PDDForms.ProductForms
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.txtMinPrice);
this.ucGroupBoxEx2.Controls.Add(this.label4);
this.ucGroupBoxEx2.Controls.Add(this.txtMaxPrice);
this.ucGroupBoxEx2.Controls.Add(this.label9);
this.ucGroupBoxEx2.Controls.Add(this.btnUp);
this.ucGroupBoxEx2.Controls.Add(this.btnDown);
this.ucGroupBoxEx2.Controls.Add(this.label3);
@@ -288,19 +163,14 @@ namespace TemuKJD.PDDForms.ProductForms
this.ucGroupBoxEx2.Controls.Add(this.txtSkuSns);
this.ucGroupBoxEx2.Controls.Add(this.label1);
this.ucGroupBoxEx2.Controls.Add(this.pnlEmpty);
this.ucGroupBoxEx2.Controls.Add(this.btnClearDgv);
this.ucGroupBoxEx2.Controls.Add(this.txtShopId);
this.ucGroupBoxEx2.Controls.Add(this.label5);
this.ucGroupBoxEx2.Controls.Add(this.btnSearch);
this.ucGroupBoxEx2.Controls.Add(this.cmbStatus);
this.ucGroupBoxEx2.Controls.Add(this.label8);
this.ucGroupBoxEx2.Controls.Add(this.txtSPU);
this.ucGroupBoxEx2.Controls.Add(this.label7);
this.ucGroupBoxEx2.Controls.Add(this.txtExtCode);
this.ucGroupBoxEx2.Controls.Add(this.label2);
this.ucGroupBoxEx2.Controls.Add(this.btnDelSelect);
this.ucGroupBoxEx2.Controls.Add(this.txtShopName);
this.ucGroupBoxEx2.Controls.Add(this.label6);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(147, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(1212, 140);
@@ -417,6 +287,7 @@ namespace TemuKJD.PDDForms.ProductForms
this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.pnlEmpty.TabIndex = 504;
this.pnlEmpty.Text = "清空条件";
this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click);
//
// btnClearDgv
//
@@ -424,7 +295,7 @@ namespace TemuKJD.PDDForms.ProductForms
this.btnClearDgv.CanvasColor = System.Drawing.SystemColors.Control;
this.btnClearDgv.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClearDgv.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClearDgv.Location = new System.Drawing.Point(1056, 72);
this.btnClearDgv.Location = new System.Drawing.Point(822, 18);
this.btnClearDgv.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnClearDgv.Name = "btnClearDgv";
this.btnClearDgv.Size = new System.Drawing.Size(124, 23);
@@ -447,7 +318,7 @@ namespace TemuKJD.PDDForms.ProductForms
//
// txtShopId
//
this.txtShopId.Location = new System.Drawing.Point(384, 76);
this.txtShopId.Location = new System.Drawing.Point(577, 18);
this.txtShopId.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtShopId.Name = "txtShopId";
this.txtShopId.Size = new System.Drawing.Size(85, 23);
@@ -521,7 +392,7 @@ namespace TemuKJD.PDDForms.ProductForms
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(473, 79);
this.label7.Location = new System.Drawing.Point(666, 21);
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);
@@ -574,7 +445,7 @@ namespace TemuKJD.PDDForms.ProductForms
//
// txtShopName
//
this.txtShopName.Location = new System.Drawing.Point(529, 76);
this.txtShopName.Location = new System.Drawing.Point(722, 18);
this.txtShopName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtShopName.Name = "txtShopName";
this.txtShopName.Size = new System.Drawing.Size(86, 23);
@@ -584,7 +455,7 @@ namespace TemuKJD.PDDForms.ProductForms
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(340, 79);
this.label6.Location = new System.Drawing.Point(533, 21);
this.label6.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(44, 17);
@@ -631,22 +502,63 @@ namespace TemuKJD.PDDForms.ProductForms
this.btnRefreshShop.Text = "刷新店铺";
this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click);
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
this.splitContainer3.Name = "splitContainer3";
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer3.Panel1
//
this.splitContainer3.Panel1.Controls.Add(this.splitContainer2);
//
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1362, 437);
this.splitContainer3.SplitterDistance = 407;
this.splitContainer3.TabIndex = 1;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvShop);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.pbLoading);
this.splitContainer2.Panel2.Controls.Add(this.panel1);
this.splitContainer2.Panel2.Controls.Add(this.dgvProduct);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1362, 407);
this.splitContainer2.SplitterDistance = 300;
this.splitContainer2.TabIndex = 0;
//
// dgvShop
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle26.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle26;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle27.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle27.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle27.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle27.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle27.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle27;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -751,6 +663,34 @@ namespace TemuKJD.PDDForms.ProductForms
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
//
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(504, 178);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 188;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel1.Controls.Add(this.ucSplitPage1);
this.panel1.Controls.Add(this.txtShopName);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.label7);
this.panel1.Controls.Add(this.txtShopId);
this.panel1.Controls.Add(this.btnClearDgv);
this.panel1.Location = new System.Drawing.Point(36, 53);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(984, 321);
this.panel1.TabIndex = 189;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
@@ -769,18 +709,18 @@ namespace TemuKJD.PDDForms.ProductForms
//
this.dgvProduct.AllowUserToAddRows = false;
this.dgvProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle8.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle28.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle28;
this.dgvProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvProduct.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.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle29.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle29.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle29.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle29.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle29.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle29.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle29;
this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -864,8 +804,8 @@ namespace TemuKJD.PDDForms.ProductForms
//
// colProductName
//
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle30.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle30;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -933,6 +873,25 @@ namespace TemuKJD.PDDForms.ProductForms
this.colOpResult.ReadOnly = true;
this.colOpResult.Width = 200;
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
this.splitContainer4.Size = new System.Drawing.Size(1362, 26);
this.splitContainer4.SplitterDistance = 671;
this.splitContainer4.TabIndex = 3;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
@@ -944,6 +903,94 @@ namespace TemuKJD.PDDForms.ProductForms
this.statusBar.Size = new System.Drawing.Size(671, 26);
this.statusBar.TabIndex = 2;
//
// btnClear
//
this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(4, 1);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.TabIndex = 440;
this.btnClear.Text = "清空结果";
this.btnClear.Visible = false;
//
// panelEx1
//
this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx1.Location = new System.Drawing.Point(568, 2);
this.panelEx1.Name = "panelEx1";
this.panelEx1.Size = new System.Drawing.Size(115, 21);
this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelEx1.Style.GradientAngle = 90;
this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.panelEx1.TabIndex = 668;
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Click += new System.EventHandler(this.btnCancel_Click);
//
// txtMinPrice
//
this.txtMinPrice.Location = new System.Drawing.Point(383, 73);
this.txtMinPrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtMinPrice.Name = "txtMinPrice";
this.txtMinPrice.Size = new System.Drawing.Size(85, 23);
this.txtMinPrice.TabIndex = 658;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(472, 76);
this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 17);
this.label4.TabIndex = 661;
this.label4.Text = "最高价格";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtMaxPrice
//
this.txtMaxPrice.Location = new System.Drawing.Point(528, 73);
this.txtMaxPrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtMaxPrice.Name = "txtMaxPrice";
this.txtMaxPrice.Size = new System.Drawing.Size(86, 23);
this.txtMaxPrice.TabIndex = 660;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(327, 76);
this.label9.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(56, 17);
this.label9.TabIndex = 659;
this.label9.Text = "最低价格";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// PDDProductUpDownForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -959,6 +1006,9 @@ namespace TemuKJD.PDDForms.ProductForms
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.ucGroupBoxEx1.ResumeLayout(false);
this.splitContainer3.Panel1.ResumeLayout(false);
this.splitContainer3.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
@@ -967,17 +1017,15 @@ namespace TemuKJD.PDDForms.ProductForms
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit();
this.splitContainer4.Panel1.ResumeLayout(false);
this.splitContainer4.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.ucGroupBoxEx1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit();
this.ResumeLayout(false);
}
@@ -1046,5 +1094,9 @@ namespace TemuKJD.PDDForms.ProductForms
private System.Windows.Forms.DataGridViewTextBoxColumn colIsOnSale;
private System.Windows.Forms.DataGridViewTextBoxColumn colStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private System.Windows.Forms.TextBox txtMinPrice;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtMaxPrice;
private System.Windows.Forms.Label label9;
}
}
@@ -196,9 +196,6 @@ namespace TemuKJD.PDDForms.ProductForms
row.Cells["colMessage"].Value = "";
}
if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true)
PDDShopLoginForm.shopLoginInstance.Dispose();
ucGroupBoxEx2.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
@@ -209,9 +206,6 @@ namespace TemuKJD.PDDForms.ProductForms
foreach (var shopId in lstShopIdTemp)
{
int sleepTime = 0;
int sleepTimeTotal = 0;
this.Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在查询...";
@@ -295,7 +289,12 @@ namespace TemuKJD.PDDForms.ProductForms
List<string> skuSns = null;
if (!string.IsNullOrWhiteSpace(txtSkuSns.Text))
skuSns = new List<string>() { txtSkuSns.Text.Trim() };
string jsonStr = shop_goods_search(shop, goods_id_list, txtGoodsName.Text.Trim(), out_goods_sn_list, skuSns, isOnsale, page, pageSize);
long? minPrice = null, maxPrice = null;
if (!string.IsNullOrWhiteSpace(txtMinPrice.Text))
minPrice = (txtMinPrice.Text.Trim().ParseToDecimal() * 100).ParseToLong();
if (!string.IsNullOrWhiteSpace(txtMaxPrice.Text))
maxPrice = (txtMaxPrice.Text.Trim().ParseToDecimal() * 100).ParseToLong();
string jsonStr = shop_goods_search(shop, goods_id_list, txtGoodsName.Text.Trim(), out_goods_sn_list, skuSns, isOnsale, minPrice, maxPrice, page, pageSize);
if (jsonStr.Contains("繁忙") && tryCount < 5)
{
tryCount++;
@@ -411,7 +410,7 @@ namespace TemuKJD.PDDForms.ProductForms
private string shop_goods_search(ShopLoginInfo shop, List<string> goods_id_list, string goods_name,
List<string> out_goods_sn_list = null, List<string> out_sku_sns = null, int? isOnsale = null, int page=1, int pageSize = 100)
List<string> out_goods_sn_list = null, List<string> out_sku_sns = null, int? isOnsale = null, long? minPrice=null, long? maxPrice=null, int page=1, int pageSize = 100)
{
var anti = shop.AntiContents.LastOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
@@ -434,6 +433,15 @@ namespace TemuKJD.PDDForms.ProductForms
dicParam["out_sku_sns"] = out_sku_sns;
dicParam["sold_out"] = 0;
dicParam["size"] = pageSize;
if (minPrice != null || maxPrice != null)
{
long[] nArr = new long[] { 0, 1000000000 };
if (minPrice != null)
nArr[0] = minPrice.Value;
if (maxPrice != null)
nArr[1] = maxPrice.Value;
dicParam["sku_price_range"] = nArr;
}
string body = JsonHelper.SerializeObject(dicParam); //"{\"out_goods_sn_gray_flag\":true,\"pre_sale_type\":4,\"page\":1,\"shipment_time_type\":3,\"is_onsale\":1,\"sold_out\":0," + "\"size\":" + pageSize + "}";
string refere = "https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav";
@@ -553,8 +561,6 @@ namespace TemuKJD.PDDForms.ProductForms
return;
}
if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true)
PDDShopLoginForm.shopLoginInstance.Dispose();
ucGroupBoxEx2.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
@@ -672,8 +678,6 @@ namespace TemuKJD.PDDForms.ProductForms
return;
}
if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true)
PDDShopLoginForm.shopLoginInstance.Dispose();
ucGroupBoxEx2.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
@@ -792,30 +796,25 @@ namespace TemuKJD.PDDForms.ProductForms
{
dicShopGetCount[shop] = 0;
while (PDDShopLoginForm.shopLoginInstance != null && !PDDShopLoginForm.shopLoginInstance.IsDisposed)
{
Thread.Sleep(500);
}
PDDShopLoginForm loginForm = null;
Invoke(new Action(() =>
{
this.panel1.SendToBack();
PDDShopLoginForm loginForm = new PDDShopLoginForm(shop);
loginForm = new PDDShopLoginForm(shop);
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
loginForm.WindowState = FormWindowState.Maximized;
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
loginForm.InitUrl = "https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav";
loginForm.Dock = DockStyle.Fill;
this.panel1.Controls.Add(loginForm);
loginForm.Show();
}));
int sleepTime = Randomx.GetId(2000, 3000);
Thread.Sleep(sleepTime);
Thread.Sleep(Randomx.GetId(3000, 5000));
Invoke(new Action(() =>
{
if (PDDShopLoginForm.shopLoginInstance != null)
PDDShopLoginForm.shopLoginInstance.Dispose();
if (loginForm != null)
loginForm.Close();
}));
}
}
@@ -835,8 +834,6 @@ namespace TemuKJD.PDDForms.ProductForms
return;
}
if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true)
PDDShopLoginForm.shopLoginInstance.Dispose();
ucGroupBoxEx2.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
@@ -984,5 +981,11 @@ namespace TemuKJD.PDDForms.ProductForms
{
}
private void pnlEmpty_Click(object sender, EventArgs e)
{
cmbStatus.Text = "在售";
txtSPU.Text = txtGoodsName.Text = txtExtCode.Text = txtSkuSns.Text = txtMinPrice.Text = txtMaxPrice.Text = "";
}
}
}