微信筛选店铺 店铺分组 运费加价
This commit is contained in:
1 parent
b4fa5cacb1
commit
afaabea1fa
33 files changed
+1338
-536
No files matched your search
+57
-29
@@ -30,11 +30,11 @@ namespace TemuKJD.ToolForms
|
||||
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 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();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.btnNext = new System.Windows.Forms.Button();
|
||||
this.btnPrev = new System.Windows.Forms.Button();
|
||||
@@ -60,6 +60,7 @@ namespace TemuKJD.ToolForms
|
||||
this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx();
|
||||
this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnDel = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnCancelSelect = new DevComponents.DotNetBar.PanelEx();
|
||||
this.txtTitle = new System.Windows.Forms.TextBox();
|
||||
this.btnSearchTitle = new DevComponents.DotNetBar.PanelEx();
|
||||
this.chkSkip = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
@@ -113,7 +114,7 @@ namespace TemuKJD.ToolForms
|
||||
this.splitContainer2.Panel1.Controls.Add(this.btnNext);
|
||||
this.splitContainer2.Panel1.Controls.Add(this.btnPrev);
|
||||
this.splitContainer2.Panel1.Controls.Add(this.txtAddress);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1390, 438);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1390, 440);
|
||||
this.splitContainer2.SplitterDistance = 26;
|
||||
this.splitContainer2.TabIndex = 6;
|
||||
//
|
||||
@@ -152,7 +153,7 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
|
||||
this.pbLoading.Location = new System.Drawing.Point(673, 196);
|
||||
this.pbLoading.Location = new System.Drawing.Point(673, 194);
|
||||
this.pbLoading.Name = "pbLoading";
|
||||
this.pbLoading.Size = new System.Drawing.Size(50, 50);
|
||||
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
@@ -164,20 +165,20 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
this.dgvProduct.AllowUserToAddRows = false;
|
||||
this.dgvProduct.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle6.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvProduct.AutoRowNumber = true;
|
||||
this.dgvProduct.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dgvProduct.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvProduct.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.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
|
||||
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.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colCheck,
|
||||
@@ -196,7 +197,7 @@ namespace TemuKJD.ToolForms
|
||||
this.dgvProduct.Name = "dgvProduct";
|
||||
this.dgvProduct.ReadOnly = true;
|
||||
this.dgvProduct.RowTemplate.Height = 23;
|
||||
this.dgvProduct.Size = new System.Drawing.Size(1390, 437);
|
||||
this.dgvProduct.Size = new System.Drawing.Size(1390, 433);
|
||||
this.dgvProduct.TabIndex = 7;
|
||||
this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick);
|
||||
//
|
||||
@@ -236,8 +237,8 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
// colGoodsName
|
||||
//
|
||||
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle8;
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.colGoodsName.FillWeight = 120F;
|
||||
this.colGoodsName.HeaderText = "商品名称";
|
||||
this.colGoodsName.Name = "colGoodsName";
|
||||
@@ -265,8 +266,8 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
// colPrice
|
||||
//
|
||||
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colPrice.DefaultCellStyle = dataGridViewCellStyle9;
|
||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colPrice.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.colPrice.FillWeight = 70F;
|
||||
this.colPrice.HeaderText = "价格";
|
||||
this.colPrice.Name = "colPrice";
|
||||
@@ -281,8 +282,8 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
// colMsg
|
||||
//
|
||||
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colMsg.DefaultCellStyle = dataGridViewCellStyle10;
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colMsg.DefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.colMsg.FillWeight = 200F;
|
||||
this.colMsg.HeaderText = "操作结果";
|
||||
this.colMsg.Name = "colMsg";
|
||||
@@ -306,6 +307,7 @@ namespace TemuKJD.ToolForms
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnCancelSelect);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.txtTitle);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnSearchTitle);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.chkSkip);
|
||||
@@ -331,7 +333,7 @@ namespace TemuKJD.ToolForms
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnImportCookie);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label2);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1404, 561);
|
||||
this.splitContainer1.SplitterDistance = 474;
|
||||
this.splitContainer1.SplitterDistance = 469;
|
||||
this.splitContainer1.SplitterWidth = 3;
|
||||
this.splitContainer1.TabIndex = 4;
|
||||
//
|
||||
@@ -346,7 +348,7 @@ namespace TemuKJD.ToolForms
|
||||
this.ucTabControlMetro1.Name = "ucTabControlMetro1";
|
||||
this.ucTabControlMetro1.SelectedIndex = 0;
|
||||
this.ucTabControlMetro1.ShowCloseButton = false;
|
||||
this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 474);
|
||||
this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 469);
|
||||
this.ucTabControlMetro1.TabIndex = 462;
|
||||
this.ucTabControlMetro1.TabSelectColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.ucTabControlMetro1.TabSelectTextColor = System.Drawing.Color.Gray;
|
||||
@@ -358,7 +360,7 @@ namespace TemuKJD.ToolForms
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 26);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(1396, 444);
|
||||
this.tabPage1.Size = new System.Drawing.Size(1396, 446);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "商品页面";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
@@ -370,7 +372,7 @@ namespace TemuKJD.ToolForms
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 26);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(1396, 443);
|
||||
this.tabPage2.Size = new System.Drawing.Size(1396, 439);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "采集列表";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
@@ -447,6 +449,31 @@ namespace TemuKJD.ToolForms
|
||||
this.btnDel.TabIndex = 409;
|
||||
this.btnDel.Text = "删";
|
||||
//
|
||||
// btnCancelSelect
|
||||
//
|
||||
this.btnCancelSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnCancelSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnCancelSelect.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnCancelSelect.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnCancelSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnCancelSelect.Location = new System.Drawing.Point(581, 33);
|
||||
this.btnCancelSelect.Name = "btnCancelSelect";
|
||||
this.btnCancelSelect.Size = new System.Drawing.Size(115, 23);
|
||||
this.btnCancelSelect.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnCancelSelect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnCancelSelect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnCancelSelect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnCancelSelect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnCancelSelect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnCancelSelect.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnCancelSelect.Style.GradientAngle = 90;
|
||||
this.btnCancelSelect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnCancelSelect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnCancelSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnCancelSelect.TabIndex = 999;
|
||||
this.btnCancelSelect.Text = "取消选中已入库";
|
||||
this.btnCancelSelect.Click += new System.EventHandler(this.btnCancelSelect_Click);
|
||||
//
|
||||
// txtTitle
|
||||
//
|
||||
this.txtTitle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -628,7 +655,7 @@ namespace TemuKJD.ToolForms
|
||||
this.statusBar.Location = new System.Drawing.Point(317, 60);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(740, 25);
|
||||
this.statusBar.Size = new System.Drawing.Size(739, 25);
|
||||
this.statusBar.TabIndex = 823;
|
||||
//
|
||||
// label4
|
||||
@@ -901,5 +928,6 @@ namespace TemuKJD.ToolForms
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private System.Windows.Forms.TextBox txtTitle;
|
||||
private DevComponents.DotNetBar.PanelEx btnSearchTitle;
|
||||
private DevComponents.DotNetBar.PanelEx btnCancelSelect;
|
||||
}
|
||||
}
|
||||
@@ -523,6 +523,9 @@ namespace TemuKJD.ToolForms
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
break;
|
||||
|
||||
if (row.Index % 20 == 0)
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("supplier_product_list_" + MainForm.ProcessCount, lstJSTListProductInfo);
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.statusBar.lblTaskStatus.Text = "正在入库表格第 " + (row.Index + 1) + " 行数据";
|
||||
@@ -533,7 +536,13 @@ namespace TemuKJD.ToolForms
|
||||
if (prod == null || prod.dbProduct == null || prod.dbProduct.product_json.Length < 10)
|
||||
continue;
|
||||
var dbProd = prod.dbProduct;
|
||||
|
||||
|
||||
if (prod.getProductMsg.Contains("入库成功") || prod.getProductMsg.Contains("已存在相同id商品"))
|
||||
{
|
||||
if (!chkOverride.Checked)
|
||||
continue;
|
||||
}
|
||||
|
||||
bool isExist = false;
|
||||
var existUrl = BaseClass.BuildObjString("product/get_product_list");
|
||||
string existData = UserLogin.GetSignaturex() + "&search_spu=" + prod.spuId;
|
||||
@@ -564,9 +573,11 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
else
|
||||
{
|
||||
//入库成功 已存在相同id商品
|
||||
prod.getProductMsg = "已存在相同id商品,跳过";
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
row.Cells["colMsg"].Value = "已存在相同id商品,跳过";
|
||||
row.Cells["colMsg"].Value = prod.getProductMsg;
|
||||
}));
|
||||
continue;
|
||||
}
|
||||
@@ -606,6 +617,7 @@ namespace TemuKJD.ToolForms
|
||||
"&sale_count=" + dbProd.sale_count +
|
||||
"&sale_count_text=" + HttpUtility.UrlEncode(dbProd.sale_count_text, Encoding.UTF8) +
|
||||
"&main_img=" + HttpUtility.UrlEncode(dbProd.main_img, Encoding.UTF8) +
|
||||
"&wx_safe_status=" + HttpUtility.UrlEncode("安全商品", Encoding.UTF8) +
|
||||
"&product_get_type=" + HttpUtility.UrlEncode("厂商直采", Encoding.UTF8);
|
||||
if (!isExist)
|
||||
{
|
||||
@@ -640,13 +652,14 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
else
|
||||
{
|
||||
string msg = "商品入库成功!";
|
||||
prod.getProductMsg = "商品入库成功!";
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
row.Cells["colMsg"].Value = msg;
|
||||
row.Cells["colMsg"].Value = prod.getProductMsg;
|
||||
}));
|
||||
}
|
||||
}
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("supplier_product_list_" + MainForm.ProcessCount, lstJSTListProductInfo);
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -712,6 +725,9 @@ namespace TemuKJD.ToolForms
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
break;
|
||||
|
||||
if (row.Index % 20 == 0)
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("supplier_product_list_" + MainForm.ProcessCount, lstJSTListProductInfo);
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.statusBar.lblTaskStatus.Text = "正在采集表格第 " + (row.Index + 1) + " 行详情数据";
|
||||
@@ -727,6 +743,8 @@ namespace TemuKJD.ToolForms
|
||||
{
|
||||
if (prod.getProductMsg == "商品已存在,跳过详情采集")
|
||||
continue;
|
||||
if (prod.getProductMsg.Contains("入库成功") || prod.getProductMsg.Contains("已存在相同id商品"))
|
||||
continue;
|
||||
|
||||
bool isExist = false;
|
||||
var existUrl = BaseClass.BuildObjString("product/get_product_list");
|
||||
@@ -858,9 +876,6 @@ namespace TemuKJD.ToolForms
|
||||
try { row.Cells["colMsg"].Value = prod.getProductMsg; } catch { }
|
||||
}));
|
||||
}
|
||||
|
||||
if (row.Index % 20 == 0 )
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("supplier_product_list_" + MainForm.ProcessCount, lstJSTListProductInfo);
|
||||
}
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("supplier_product_list_" + MainForm.ProcessCount, lstJSTListProductInfo);
|
||||
Invoke(new Action(() =>
|
||||
@@ -1068,5 +1083,22 @@ namespace TemuKJD.ToolForms
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
private void btnCancelSelect_Click(object sender, EventArgs e)
|
||||
{
|
||||
Task.Run(() => {
|
||||
|
||||
foreach(DataGridViewRow row in dgvProduct.Rows)
|
||||
{
|
||||
if (row.Cells["colMsg"].Value.ParseToString().Contains("入库成功") || row.Cells["colMsg"].Value.ParseToString().Contains("已存在相同id商品"))
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
row.Cells["colcheck"].Value = false;
|
||||
}));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user