拼多多外部前端采集数据格式化入库 50%

This commit is contained in:
wule_5900x committed 2026-01-11 00:00:19 +08:00
1 parent 343b01ab90
commit 426e03d529
9 files changed
+667 -48

No files matched your search

@@ -110,6 +110,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.label10 = new System.Windows.Forms.Label();
this.cmbSource = new System.Windows.Forms.ComboBox();
this.btnImport = new DevComponents.DotNetBar.PanelEx();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -136,6 +139,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnImport);
this.splitContainer1.Panel1.Controls.Add(this.chkHighestPriceSku);
this.splitContainer1.Panel1.Controls.Add(this.chkSameSpecPrice);
this.splitContainer1.Panel1.Controls.Add(this.label9);
@@ -228,51 +232,52 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel1.ColumnCount = 16;
this.tableLayoutPanel1.ColumnCount = 12;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 13.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20.0012F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 13.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20.0012F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 13.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20.0012F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 13.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20.0012F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 13.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 13.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 19.9952F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Controls.Add(this.cmbSource, 5, 1);
this.tableLayoutPanel1.Controls.Add(this.label10, 4, 1);
this.tableLayoutPanel1.Controls.Add(this.label5, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.txtSPU, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.label2, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.txtCat, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.label3, 4, 0);
this.tableLayoutPanel1.Controls.Add(this.cmbGroupFilter, 11, 0);
this.tableLayoutPanel1.Controls.Add(this.txtProdName, 5, 0);
this.tableLayoutPanel1.Controls.Add(this.label4, 6, 0);
this.tableLayoutPanel1.Controls.Add(this.txtExtCode, 7, 0);
this.tableLayoutPanel1.Controls.Add(this.lblNotes, 8, 0);
this.tableLayoutPanel1.Controls.Add(this.label6, 12, 0);
this.tableLayoutPanel1.Controls.Add(this.cmbSort, 13, 0);
this.tableLayoutPanel1.Controls.Add(this.txtNotes, 9, 0);
this.tableLayoutPanel1.Controls.Add(this.btnSearch, 14, 0);
this.tableLayoutPanel1.Controls.Add(this.lblGroup, 10, 0);
this.tableLayoutPanel1.Controls.Add(this.pnlEmpty, 15, 0);
this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 13);
this.tableLayoutPanel1.Controls.Add(this.label6, 8, 0);
this.tableLayoutPanel1.Controls.Add(this.cmbSort, 9, 0);
this.tableLayoutPanel1.Controls.Add(this.btnSearch, 10, 0);
this.tableLayoutPanel1.Controls.Add(this.pnlEmpty, 11, 0);
this.tableLayoutPanel1.Controls.Add(this.lblNotes, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.txtNotes, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.lblGroup, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.cmbGroupFilter, 3, 1);
this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 2);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(822, 47);
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(727, 71);
this.tableLayoutPanel1.TabIndex = 679;
//
// label5
//
this.label5.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(3, 15);
this.label5.Location = new System.Drawing.Point(3, 9);
this.label5.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(57, 17);
@@ -282,17 +287,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// txtSPU
//
this.txtSPU.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtSPU.Location = new System.Drawing.Point(60, 12);
this.txtSPU.Location = new System.Drawing.Point(60, 6);
this.txtSPU.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtSPU.Name = "txtSPU";
this.txtSPU.Size = new System.Drawing.Size(44, 23);
this.txtSPU.Size = new System.Drawing.Size(68, 23);
this.txtSPU.TabIndex = 434;
//
// label2
//
this.label2.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(110, 15);
this.label2.Location = new System.Drawing.Point(134, 9);
this.label2.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17);
@@ -302,17 +307,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// txtCat
//
this.txtCat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtCat.Location = new System.Drawing.Point(154, 12);
this.txtCat.Location = new System.Drawing.Point(178, 6);
this.txtCat.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtCat.Name = "txtCat";
this.txtCat.Size = new System.Drawing.Size(44, 23);
this.txtCat.Size = new System.Drawing.Size(68, 23);
this.txtCat.TabIndex = 425;
//
// label3
//
this.label3.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(204, 15);
this.label3.Location = new System.Drawing.Point(252, 9);
this.label3.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 17);
@@ -323,26 +328,26 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbGroupFilter.FormattingEnabled = true;
this.cmbGroupFilter.Location = new System.Drawing.Point(530, 13);
this.cmbGroupFilter.Location = new System.Drawing.Point(178, 40);
this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbGroupFilter.Name = "cmbGroupFilter";
this.cmbGroupFilter.Size = new System.Drawing.Size(44, 25);
this.cmbGroupFilter.Size = new System.Drawing.Size(68, 25);
this.cmbGroupFilter.TabIndex = 653;
//
// txtProdName
//
this.txtProdName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtProdName.Location = new System.Drawing.Point(248, 12);
this.txtProdName.Location = new System.Drawing.Point(296, 6);
this.txtProdName.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtProdName.Name = "txtProdName";
this.txtProdName.Size = new System.Drawing.Size(44, 23);
this.txtProdName.Size = new System.Drawing.Size(68, 23);
this.txtProdName.TabIndex = 427;
//
// label4
//
this.label4.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(298, 15);
this.label4.Location = new System.Drawing.Point(370, 9);
this.label4.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 17);
@@ -352,17 +357,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// txtExtCode
//
this.txtExtCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtExtCode.Location = new System.Drawing.Point(342, 12);
this.txtExtCode.Location = new System.Drawing.Point(414, 6);
this.txtExtCode.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtExtCode.Name = "txtExtCode";
this.txtExtCode.Size = new System.Drawing.Size(44, 23);
this.txtExtCode.Size = new System.Drawing.Size(68, 23);
this.txtExtCode.TabIndex = 429;
//
// lblNotes
//
this.lblNotes.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblNotes.AutoSize = true;
this.lblNotes.Location = new System.Drawing.Point(392, 15);
this.lblNotes.Location = new System.Drawing.Point(3, 44);
this.lblNotes.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.lblNotes.Name = "lblNotes";
this.lblNotes.Size = new System.Drawing.Size(44, 17);
@@ -373,7 +378,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.label6.Anchor = System.Windows.Forms.AnchorStyles.None;
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(580, 15);
this.label6.Location = new System.Drawing.Point(488, 9);
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);
@@ -387,19 +392,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.cmbSort.Items.AddRange(new object[] {
"入库时间",
"认领总数"});
this.cmbSort.Location = new System.Drawing.Point(627, 13);
this.cmbSort.Location = new System.Drawing.Point(535, 5);
this.cmbSort.Name = "cmbSort";
this.cmbSort.Size = new System.Drawing.Size(65, 25);
this.cmbSort.Size = new System.Drawing.Size(64, 25);
this.cmbSort.TabIndex = 448;
this.cmbSort.Text = "入库时间";
//
// txtNotes
//
this.txtNotes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtNotes.Location = new System.Drawing.Point(436, 12);
this.txtNotes.Location = new System.Drawing.Point(60, 41);
this.txtNotes.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(44, 23);
this.txtNotes.Size = new System.Drawing.Size(68, 23);
this.txtNotes.TabIndex = 439;
//
// btnSearch
@@ -409,7 +414,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.Location = new System.Drawing.Point(698, 11);
this.btnSearch.Location = new System.Drawing.Point(605, 5);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(56, 25);
this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -431,7 +436,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.lblGroup.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblGroup.AutoSize = true;
this.lblGroup.Location = new System.Drawing.Point(486, 15);
this.lblGroup.Location = new System.Drawing.Point(134, 44);
this.lblGroup.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.lblGroup.Name = "lblGroup";
this.lblGroup.Size = new System.Drawing.Size(44, 17);
@@ -444,7 +449,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control;
this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlEmpty.Location = new System.Drawing.Point(760, 11);
this.pnlEmpty.Location = new System.Drawing.Point(667, 5);
this.pnlEmpty.Name = "pnlEmpty";
this.pnlEmpty.Size = new System.Drawing.Size(56, 25);
this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -495,7 +500,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnDelSelect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnDelSelect.DisabledBackColor = System.Drawing.Color.Empty;
this.btnDelSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDelSelect.Location = new System.Drawing.Point(1038, 25);
this.btnDelSelect.Location = new System.Drawing.Point(941, 25);
this.btnDelSelect.Name = "btnDelSelect";
this.btnDelSelect.Size = new System.Drawing.Size(84, 25);
this.btnDelSelect.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -517,7 +522,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.cmbGroup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.cmbGroup.FormattingEnabled = true;
this.cmbGroup.Location = new System.Drawing.Point(845, 25);
this.cmbGroup.Location = new System.Drawing.Point(750, 25);
this.cmbGroup.Name = "cmbGroup";
this.cmbGroup.Size = new System.Drawing.Size(85, 25);
this.cmbGroup.TabIndex = 640;
@@ -529,7 +534,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnSetGroup.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSetGroup.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSetGroup.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSetGroup.Location = new System.Drawing.Point(932, 25);
this.btnSetGroup.Location = new System.Drawing.Point(837, 25);
this.btnSetGroup.Name = "btnSetGroup";
this.btnSetGroup.Size = new System.Drawing.Size(84, 25);
this.btnSetGroup.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -1036,6 +1041,58 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.statusBar.Size = new System.Drawing.Size(1438, 25);
this.statusBar.TabIndex = 5;
//
// label10
//
this.label10.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(252, 44);
this.label10.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(44, 17);
this.label10.TabIndex = 651;
this.label10.Text = "来源:";
//
// cmbSource
//
this.cmbSource.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbSource.FormattingEnabled = true;
this.cmbSource.Items.AddRange(new object[] {
"全部",
"母店采集",
"机会商品",
"外部数据"});
this.cmbSource.Location = new System.Drawing.Point(296, 40);
this.cmbSource.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbSource.Name = "cmbSource";
this.cmbSource.Size = new System.Drawing.Size(68, 25);
this.cmbSource.TabIndex = 654;
this.cmbSource.Text = "全部";
//
// btnImport
//
this.btnImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnImport.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnImport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnImport.DisabledBackColor = System.Drawing.Color.Empty;
this.btnImport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnImport.Location = new System.Drawing.Point(1045, 25);
this.btnImport.Name = "btnImport";
this.btnImport.Size = new System.Drawing.Size(84, 25);
this.btnImport.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnImport.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnImport.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnImport.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnImport.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnImport.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnImport.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnImport.Style.GradientAngle = 90;
this.btnImport.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnImport.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnImport.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnImport.TabIndex = 741;
this.btnImport.Text = "导入外部数据";
this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
//
// PDDDBProdListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1145,5 +1202,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.Label label8;
private UserComponent.UcCheckBox chkSameSpecPrice;
private UserComponent.UcCheckBox chkHighestPriceSku;
private System.Windows.Forms.ComboBox cmbSource;
private System.Windows.Forms.Label label10;
private DevComponents.DotNetBar.PanelEx btnImport;
}
}
@@ -18,6 +18,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.BLL;
using TemuKJD.Extension;
using TemuKJD.ToolForms;
using Work;
@@ -945,5 +946,46 @@ namespace TemuKJD.PDDForms.ProductSelectForms
if (!txtReplaceText.Text.Trim().IsNullOrEmpty())
this.lstTitleReplaceText.AddRange(txtReplaceText.Text.Trim().Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries));
}
private void btnImport_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Multiselect = true;
// 设置过滤条件,只显示文本文件
openFileDialog.Filter = "文本文件 (*.txt)|*.txt|All files (*.*)|*.*";
// 显示对话框并获取结果
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
var filePathLst = openFileDialog.FileNames.ToList();
Task.Run(() =>
{
int successNum = 0;
int failedNum = 0;
foreach (var path in filePathLst)
{
string content = "";
string rst = "";
try
{
using (StreamReader sr = new StreamReader(path))
{
content = sr.ReadToEnd();
}
rst = new PDDProdFormConverter().PddConvert(content);
}
catch (Exception ex)
{
rst = ex.Message;
}
if (string.IsNullOrEmpty(rst))
successNum++;
else
failedNum++;
}
});
}
}
}
}
@@ -1049,6 +1049,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var prodInfo = JsonHelper.DeserializeJsonToObject<PDDProductInfo>(dbProd.product_json);
prodInfo.detail.galleries.RemoveAll(g => g.type == 6); // 视频暂时移除,以后再视情况加上
if (prodInfo.detail.cats == null || prodInfo.detail.cats.Where(c => !string.IsNullOrEmpty(c)).Count() == 0)
{
var getCatRst = get_cate_detail(shop, prodInfo.detail.cat_id);
if (!getCatRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref getCatRst, "error_msg");
if (string.IsNullOrEmpty(error))
error = getCatRst;
return "新建查询失败 " + error;
}
}
var prodParam = new PDDProductUploadParam();
int currentCount = 0;
@@ -4196,6 +4209,30 @@ Content-Disposition: form-data; name=""pic_operations""
return null;
}
}
public static string get_cate_detail(ShopLoginInfo shop, long? leafCatId)
{
var anti = shop.AntiContents.LastOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
string url = "https://mms.pinduoduo.com/vodka/v2/mms/category/detail?catId=" + leafCatId;
string body = @"{}";
string refere = "https://mms.pinduoduo.com/goods/category";
var result = HttpResponseBLL.PDDGetResponse(shop, url, body, refere, anti);
for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++)
{
shop.AntiContents.Remove(anti);
anti = shop.AntiContents.LastOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
{
Thread.Sleep(Randomx.GetId(300, 500));
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
result = HttpResponseBLL.PDDGetResponse(shop, url, body, refere, anti);
}
}
return result;
}
/// <summary>
/// 新建商品获取商品goodsid和commitid