拼多多前端数据格式转换
This commit is contained in:
1 parent
426e03d529
commit
5b7e2e1c50
12 files changed
+470
-254
No files matched your search
@@ -27,7 +27,7 @@ namespace AllBase
|
||||
/// <summary>
|
||||
/// 版本ID
|
||||
/// </summary>
|
||||
public static int VersionCount = 781;
|
||||
public static int VersionCount = 783;
|
||||
//public static int VersionCount = 613;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -193,10 +193,22 @@ namespace AllBase.Model.Param.PDDProdParam
|
||||
public long? vid { get; set; }
|
||||
public string value { get; set; }
|
||||
public string value_unit { get; set; }
|
||||
public table_info_dto_param table_info_dto { get; set; }
|
||||
public string content { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class table_info_dto_param
|
||||
{
|
||||
public List<table_value_param> table_value_list { get; set; }
|
||||
}
|
||||
|
||||
public class table_value_param
|
||||
{
|
||||
public string value { get; set; } // "100.0",
|
||||
public string unit { get; set; } // "%"
|
||||
}
|
||||
|
||||
public class goods_spec_property_param : goods_property_param
|
||||
{
|
||||
// 以下为sku属性
|
||||
|
||||
@@ -65,5 +65,8 @@ namespace AllBase.Model.Result
|
||||
|
||||
// 是否拼多多上传成功
|
||||
public bool isPddUpLoad { get; set; } = false;
|
||||
|
||||
public int? sale_count { get; set; }
|
||||
public string sale_count_text { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,8 @@ namespace AllBase.Model.Result.PDDResult
|
||||
/// </summary>
|
||||
public PDDMaterialInfo material3 { get; set; }
|
||||
public object source_json { get; set; }
|
||||
public string sale_count { get; set; }
|
||||
public string sale_count_text { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,5 +24,19 @@ namespace AllBase.Model.Result.PDDResult
|
||||
public string value { get; set; }
|
||||
public string unit { get; set; }
|
||||
public string raw_value { get; set; }
|
||||
public table_info_vo_info table_info_vo { get; set; }
|
||||
}
|
||||
|
||||
public class table_info_vo_info
|
||||
{
|
||||
public List<table_value_info> table_value_list { get; set; }
|
||||
}
|
||||
|
||||
public class table_value_info
|
||||
{
|
||||
public string value { get; set; } // "100.0",
|
||||
public string unit { get; set; } // "%",
|
||||
public int? column_type { get; set; } // 1
|
||||
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,12 @@ namespace TemuKJD.BLL
|
||||
}
|
||||
|
||||
KJDDBProduct dbProd = new KJDDBProduct() { size_json = "{}" };
|
||||
PDDProductInfo prodInfo = new PDDProductInfo() { source_json = JsonHelper.JObjectParse(outProdJson) };
|
||||
PDDProductInfo prodInfo = new PDDProductInfo()
|
||||
{
|
||||
source_json = JsonHelper.JObjectParse(outProdJson),
|
||||
sale_count = frontProdInfo.goods.sold_quantity.ParseToString(),
|
||||
sale_count_text = frontProdInfo.goods.side_sales_tip,
|
||||
};
|
||||
prodInfo.chance_id = null;
|
||||
prodInfo.chance_refere = null;
|
||||
prodInfo.chance_tab = null;
|
||||
@@ -305,7 +310,7 @@ namespace TemuKJD.BLL
|
||||
propInfo.values = new List<value_item>();
|
||||
foreach (var frontPropValue in frontProp.values)
|
||||
{
|
||||
propInfo.values.Add(new value_item() { value = frontPropValue, raw_value = frontPropValue });
|
||||
propInfo.values.Add(new value_item() { value = frontPropValue, raw_value = frontPropValue, unit = "" });
|
||||
}
|
||||
prodInfo.property.goods_properties.Add(propInfo);
|
||||
}
|
||||
@@ -344,7 +349,7 @@ namespace TemuKJD.BLL
|
||||
}
|
||||
|
||||
var data = Work.UserLogin.GetSignaturex() +
|
||||
"&from_shop_id=" + frontProdInfo.mall?.mall_name +
|
||||
"&from_shop_id=" + frontProdInfo.mall?.mall_id +
|
||||
"&spu_id=" + prodInfo.detail.goods_id.ParseToString() +
|
||||
"&skc_id=" + prodInfo.detail.goods_id.ParseToString() +
|
||||
"&price_text=" + prodInfo.detail.sku.Min(s => s.multi_price).ParseToInt() * 0.01m + "-" + prodInfo.detail.sku.Max(s => s.multi_price).ParseToInt() * 0.01m +
|
||||
@@ -357,6 +362,8 @@ namespace TemuKJD.BLL
|
||||
"&product_json=" + HttpUtility.UrlEncode(dbProd.product_json, Encoding.UTF8) +
|
||||
"&size_json=" + HttpUtility.UrlEncode(dbProd.size_json, Encoding.UTF8) +
|
||||
"&main_img=" + HttpUtility.UrlEncode(dbProd.main_img, Encoding.UTF8) +
|
||||
"&sale_count=" + HttpUtility.UrlEncode(prodInfo.sale_count, Encoding.UTF8) +
|
||||
"&sale_count_text=" + HttpUtility.UrlEncode(prodInfo.sale_count_text, Encoding.UTF8) +
|
||||
"&product_get_type=" + HttpUtility.UrlEncode("外部数据", Encoding.UTF8);
|
||||
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
|
||||
+150
-140
@@ -39,6 +39,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PDDDBProdListForm));
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.btnImport = new DevComponents.DotNetBar.PanelEx();
|
||||
this.chkHighestPriceSku = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.chkSameSpecPrice = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
@@ -46,22 +47,24 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.txtReplaceText = new System.Windows.Forms.TextBox();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.cmbSourceType = new System.Windows.Forms.ComboBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.txtSPU = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txtCat = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.cmbGroupFilter = new System.Windows.Forms.ComboBox();
|
||||
this.txtProdName = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.txtExtCode = new System.Windows.Forms.TextBox();
|
||||
this.lblNotes = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.cmbSort = new System.Windows.Forms.ComboBox();
|
||||
this.txtNotes = new System.Windows.Forms.TextBox();
|
||||
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
|
||||
this.lblGroup = new System.Windows.Forms.Label();
|
||||
this.pnlEmpty = new DevComponents.DotNetBar.PanelEx();
|
||||
this.lblNotes = new System.Windows.Forms.Label();
|
||||
this.txtNotes = new System.Windows.Forms.TextBox();
|
||||
this.lblGroup = new System.Windows.Forms.Label();
|
||||
this.cmbGroupFilter = new System.Windows.Forms.ComboBox();
|
||||
this.btnExportTxt = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnDelSelect = new DevComponents.DotNetBar.PanelEx();
|
||||
this.cmbGroup = new System.Windows.Forms.ComboBox();
|
||||
@@ -80,6 +83,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnSelect = new DevComponents.DotNetBar.PanelEx();
|
||||
this.dgvDbProduct = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.col_db_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colFromShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -98,6 +103,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colAddTimes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSelectTotalCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.col_notes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colHeadWords = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colEndWords = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -108,11 +114,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
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();
|
||||
@@ -160,6 +161,31 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.splitContainer1.SplitterDistance = 76;
|
||||
this.splitContainer1.TabIndex = 1;
|
||||
//
|
||||
// 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);
|
||||
//
|
||||
// chkHighestPriceSku
|
||||
//
|
||||
this.chkHighestPriceSku.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -247,7 +273,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
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.cmbSourceType, 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);
|
||||
@@ -273,6 +299,33 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(727, 71);
|
||||
this.tableLayoutPanel1.TabIndex = 679;
|
||||
//
|
||||
// cmbSourceType
|
||||
//
|
||||
this.cmbSourceType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cmbSourceType.FormattingEnabled = true;
|
||||
this.cmbSourceType.Items.AddRange(new object[] {
|
||||
"全部",
|
||||
"母店采集",
|
||||
"机会商品",
|
||||
"外部数据"});
|
||||
this.cmbSourceType.Location = new System.Drawing.Point(296, 40);
|
||||
this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||
this.cmbSourceType.Name = "cmbSourceType";
|
||||
this.cmbSourceType.Size = new System.Drawing.Size(68, 25);
|
||||
this.cmbSourceType.TabIndex = 654;
|
||||
this.cmbSourceType.Text = "全部";
|
||||
//
|
||||
// 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 = "来源:";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
@@ -324,16 +377,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.label3.TabIndex = 428;
|
||||
this.label3.Text = "标题:";
|
||||
//
|
||||
// cmbGroupFilter
|
||||
//
|
||||
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(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(68, 25);
|
||||
this.cmbGroupFilter.TabIndex = 653;
|
||||
//
|
||||
// txtProdName
|
||||
//
|
||||
this.txtProdName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -363,17 +406,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
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(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);
|
||||
this.lblNotes.TabIndex = 440;
|
||||
this.lblNotes.Text = "备注:";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
@@ -398,15 +430,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
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(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(68, 23);
|
||||
this.txtNotes.TabIndex = 439;
|
||||
//
|
||||
// btnSearch
|
||||
//
|
||||
this.btnSearch.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
@@ -432,17 +455,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.btnSearch.Text = "搜索";
|
||||
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
|
||||
//
|
||||
// lblGroup
|
||||
//
|
||||
this.lblGroup.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblGroup.AutoSize = true;
|
||||
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);
|
||||
this.lblGroup.TabIndex = 641;
|
||||
this.lblGroup.Text = "分组:";
|
||||
//
|
||||
// pnlEmpty
|
||||
//
|
||||
this.pnlEmpty.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
@@ -468,6 +480,47 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.pnlEmpty.Text = "清空条件";
|
||||
this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click);
|
||||
//
|
||||
// lblNotes
|
||||
//
|
||||
this.lblNotes.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblNotes.AutoSize = true;
|
||||
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);
|
||||
this.lblNotes.TabIndex = 440;
|
||||
this.lblNotes.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(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(68, 23);
|
||||
this.txtNotes.TabIndex = 439;
|
||||
//
|
||||
// lblGroup
|
||||
//
|
||||
this.lblGroup.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblGroup.AutoSize = true;
|
||||
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);
|
||||
this.lblGroup.TabIndex = 641;
|
||||
this.lblGroup.Text = "分组:";
|
||||
//
|
||||
// cmbGroupFilter
|
||||
//
|
||||
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(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(68, 25);
|
||||
this.cmbGroupFilter.TabIndex = 653;
|
||||
//
|
||||
// btnExportTxt
|
||||
//
|
||||
this.btnExportTxt.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -778,6 +831,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colEdit,
|
||||
this.colAddTimes,
|
||||
this.colSelectTotalCount,
|
||||
this.colSaleCount,
|
||||
this.col_notes,
|
||||
this.colHeadWords,
|
||||
this.colEndWords,
|
||||
@@ -798,6 +852,31 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.dgvDbProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDbProduct_CellContentClick);
|
||||
this.dgvDbProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvDbProduct_Scroll);
|
||||
//
|
||||
// ucSplitPage1
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.IsShowPageSize = true;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(1024, 0);
|
||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
|
||||
this.ucSplitPage1.PageSize = 50;
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(414, 25);
|
||||
this.ucSplitPage1.TabIndex = 6;
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
//
|
||||
// statusBar
|
||||
//
|
||||
this.statusBar.BackColor = System.Drawing.Color.White;
|
||||
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.statusBar.Location = new System.Drawing.Point(0, 0);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(1438, 25);
|
||||
this.statusBar.TabIndex = 5;
|
||||
//
|
||||
// colSelect
|
||||
//
|
||||
this.colSelect.FillWeight = 26F;
|
||||
@@ -912,7 +991,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// colEdit
|
||||
//
|
||||
this.colEdit.FillWeight = 35F;
|
||||
this.colEdit.FillWeight = 38F;
|
||||
this.colEdit.HeaderText = "编辑";
|
||||
this.colEdit.Name = "colEdit";
|
||||
this.colEdit.ReadOnly = true;
|
||||
@@ -935,6 +1014,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colSelectTotalCount.ReadOnly = true;
|
||||
this.colSelectTotalCount.Visible = false;
|
||||
//
|
||||
// colSaleCount
|
||||
//
|
||||
this.colSaleCount.FillWeight = 80F;
|
||||
this.colSaleCount.HeaderText = "销量";
|
||||
this.colSaleCount.Name = "colSaleCount";
|
||||
this.colSaleCount.ReadOnly = true;
|
||||
//
|
||||
// col_notes
|
||||
//
|
||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
@@ -1016,83 +1102,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.col_select_product.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
//
|
||||
// ucSplitPage1
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.IsShowPageSize = true;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(1024, 0);
|
||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
|
||||
this.ucSplitPage1.PageSize = 50;
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(414, 25);
|
||||
this.ucSplitPage1.TabIndex = 6;
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
//
|
||||
// statusBar
|
||||
//
|
||||
this.statusBar.BackColor = System.Drawing.Color.White;
|
||||
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.statusBar.Location = new System.Drawing.Point(0, 0);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
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;
|
||||
@@ -1166,6 +1175,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.Label lblExtCodePrice;
|
||||
private System.Windows.Forms.TextBox txtExtCodePrice;
|
||||
private DevComponents.DotNetBar.PanelEx btnExportTxt;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.TextBox txtReplaceText;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.TextBox txtMinPrice;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private UserComponent.UcCheckBox chkSameSpecPrice;
|
||||
private UserComponent.UcCheckBox chkHighestPriceSku;
|
||||
private System.Windows.Forms.ComboBox cmbSourceType;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private DevComponents.DotNetBar.PanelEx btnImport;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn col_db_id;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colFromShopId;
|
||||
@@ -1184,6 +1204,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colAddTimes;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectTotalCount;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn col_notes;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colHeadWords;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colEndWords;
|
||||
@@ -1194,16 +1215,5 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.DataGridViewLinkColumn col_edit;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn col_delete;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn col_select_product;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.TextBox txtReplaceText;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.TextBox txtMinPrice;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -169,6 +169,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
"编辑",
|
||||
prod.select_count,
|
||||
prod.select_total_count,
|
||||
prod.sale_count_text, // 销售数量
|
||||
prod.notes,
|
||||
prod.head_words,
|
||||
prod.end_words,
|
||||
@@ -262,6 +263,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
"&search_ext_code=" + txtExtCode.Text.Trim() +
|
||||
"&search_group=" + cmbGroupFilter.Text.Trim() +
|
||||
"&search_prod_name=" + txtProdName.Text.Trim();
|
||||
if (cmbSourceType.Text.Trim() != "全部")
|
||||
{
|
||||
data += "&product_get_type=" + cmbSourceType.Text.Trim();
|
||||
}
|
||||
if (shop != null && !string.IsNullOrEmpty(shop.ShopId))
|
||||
{
|
||||
data += "&get_select_count=true";
|
||||
@@ -331,6 +336,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.txtNotes.Text = "";
|
||||
this.cmbGroupFilter.Text = "";
|
||||
this.cmbSort.Text = "入库时间";
|
||||
this.cmbSourceType.Text = "全部";
|
||||
}
|
||||
|
||||
private void dgvDbProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
@@ -914,6 +920,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
}
|
||||
}
|
||||
|
||||
prodJObj.Remove("source_json");
|
||||
string exportData = JsonHelper.SerializeObject(prodJObj);
|
||||
using (StreamWriter sw = new StreamWriter(Path.Combine(path, dbProd.spu_id + ".txt"), false, Encoding.UTF8))
|
||||
{
|
||||
@@ -957,6 +964,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var filePathLst = openFileDialog.FileNames.ToList();
|
||||
pbLoading.Visible = true;
|
||||
this.statusBar.pgbTaskProgress.Maximum = filePathLst.Count;
|
||||
this.statusBar.UpdateProgressBar(0);
|
||||
Task.Run(() =>
|
||||
{
|
||||
int successNum = 0;
|
||||
@@ -983,7 +993,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
successNum++;
|
||||
else
|
||||
failedNum++;
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1);
|
||||
this.statusBar.lblTaskStatus.Text = "正在导入";
|
||||
}));
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
pbLoading.Visible = false;
|
||||
this.statusBar.lblTaskStatus.Text = "导入完成";
|
||||
BaseMsgForm.ShowInfo("导入完成!");
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +171,9 @@
|
||||
<metadata name="colSelectTotalCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colSaleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="col_notes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
@@ -30,12 +30,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
@@ -148,6 +148,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.btnClear = new DevComponents.DotNetBar.PanelEx();
|
||||
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.cmbSourceType = new System.Windows.Forms.ComboBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -927,6 +929,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.ucGroupBoxEx4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.ucGroupBoxEx4.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
|
||||
this.ucGroupBoxEx4.Controls.Add(this.cmbSourceType);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.label8);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.btnClearFilter);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.txtIdFilter);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.label1);
|
||||
@@ -1042,10 +1046,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.btnClearUpload.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.btnClearUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnClearUpload.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnClearUpload.Location = new System.Drawing.Point(226, 105);
|
||||
this.btnClearUpload.Location = new System.Drawing.Point(242, 107);
|
||||
this.btnClearUpload.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
|
||||
this.btnClearUpload.Name = "btnClearUpload";
|
||||
this.btnClearUpload.Size = new System.Drawing.Size(76, 23);
|
||||
this.btnClearUpload.Size = new System.Drawing.Size(60, 23);
|
||||
this.btnClearUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnClearUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.btnClearUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
@@ -1059,7 +1063,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.btnClearUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnClearUpload.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnClearUpload.TabIndex = 548;
|
||||
this.btnClearUpload.Text = "清空待上传";
|
||||
this.btnClearUpload.Text = "清空待传";
|
||||
this.btnClearUpload.Click += new System.EventHandler(this.btnClearUpload_Click);
|
||||
//
|
||||
// lblWaitToUp
|
||||
@@ -1068,28 +1072,28 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.lblWaitToUp.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.lblWaitToUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.lblWaitToUp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.lblWaitToUp.Location = new System.Drawing.Point(8, 108);
|
||||
this.lblWaitToUp.Location = new System.Drawing.Point(132, 110);
|
||||
this.lblWaitToUp.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.lblWaitToUp.Name = "lblWaitToUp";
|
||||
this.lblWaitToUp.Size = new System.Drawing.Size(95, 17);
|
||||
this.lblWaitToUp.Size = new System.Drawing.Size(71, 17);
|
||||
this.lblWaitToUp.TabIndex = 541;
|
||||
this.lblWaitToUp.Text = "待上传商品 0 件";
|
||||
this.lblWaitToUp.Text = "待上传 0 件";
|
||||
this.lblWaitToUp.Click += new System.EventHandler(this.lblWaitToUp_Click);
|
||||
//
|
||||
// lblGoodsCount
|
||||
//
|
||||
this.lblGoodsCount.AutoSize = true;
|
||||
this.lblGoodsCount.Location = new System.Drawing.Point(155, 81);
|
||||
this.lblGoodsCount.Location = new System.Drawing.Point(9, 110);
|
||||
this.lblGoodsCount.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.lblGoodsCount.Name = "lblGoodsCount";
|
||||
this.lblGoodsCount.Size = new System.Drawing.Size(131, 17);
|
||||
this.lblGoodsCount.Size = new System.Drawing.Size(71, 17);
|
||||
this.lblGoodsCount.TabIndex = 537;
|
||||
this.lblGoodsCount.Text = "产品库中共有 0 件商品";
|
||||
this.lblGoodsCount.Text = "产品库 0 件";
|
||||
this.lblGoodsCount.Click += new System.EventHandler(this.lblGoodsCount_Click);
|
||||
//
|
||||
// txtAddCount
|
||||
//
|
||||
this.txtAddCount.Location = new System.Drawing.Point(10, 78);
|
||||
this.txtAddCount.Location = new System.Drawing.Point(158, 79);
|
||||
this.txtAddCount.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
|
||||
this.txtAddCount.Name = "txtAddCount";
|
||||
this.txtAddCount.Size = new System.Drawing.Size(47, 23);
|
||||
@@ -1102,9 +1106,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.panelEx2.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.panelEx2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.panelEx2.Location = new System.Drawing.Point(60, 78);
|
||||
this.panelEx2.Location = new System.Drawing.Point(209, 79);
|
||||
this.panelEx2.Name = "panelEx2";
|
||||
this.panelEx2.Size = new System.Drawing.Size(92, 23);
|
||||
this.panelEx2.Size = new System.Drawing.Size(93, 23);
|
||||
this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.panelEx2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.panelEx2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
@@ -1215,19 +1219,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.dgvShop.AllowUserToAddRows = false;
|
||||
this.dgvShop.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
|
||||
this.dgvShop.AutoRowNumber = true;
|
||||
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
|
||||
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colSelect,
|
||||
@@ -1384,19 +1388,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.dgvSelectProduct.AllowUserToAddRows = false;
|
||||
this.dgvSelectProduct.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
|
||||
dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
|
||||
this.dgvSelectProduct.AutoRowNumber = true;
|
||||
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
|
||||
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
|
||||
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colCheck,
|
||||
@@ -1457,8 +1461,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// colSupplierName
|
||||
//
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
|
||||
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle11;
|
||||
this.colSupplierName.Frozen = true;
|
||||
this.colSupplierName.HeaderText = "店铺名称";
|
||||
this.colSupplierName.Name = "colSupplierName";
|
||||
@@ -1536,8 +1540,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// colProductName
|
||||
//
|
||||
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
|
||||
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductName.DefaultCellStyle = dataGridViewCellStyle12;
|
||||
this.colProductName.HeaderText = "商品标题";
|
||||
this.colProductName.Name = "colProductName";
|
||||
this.colProductName.ReadOnly = true;
|
||||
@@ -1700,6 +1704,29 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.panel1.TabIndex = 189;
|
||||
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
|
||||
//
|
||||
// cmbSourceType
|
||||
//
|
||||
this.cmbSourceType.FormattingEnabled = true;
|
||||
this.cmbSourceType.Items.AddRange(new object[] {
|
||||
"",
|
||||
"店铺采集",
|
||||
"机会商品",
|
||||
"外部数据"});
|
||||
this.cmbSourceType.Location = new System.Drawing.Point(37, 78);
|
||||
this.cmbSourceType.Name = "cmbSourceType";
|
||||
this.cmbSourceType.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbSourceType.TabIndex = 671;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(8, 82);
|
||||
this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(32, 17);
|
||||
this.label8.TabIndex = 670;
|
||||
this.label8.Text = "来源";
|
||||
//
|
||||
// PDDDBProdUserSelectForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -1862,5 +1889,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox txtWaitSeconds;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.ComboBox cmbSourceType;
|
||||
private System.Windows.Forms.Label label8;
|
||||
}
|
||||
}
|
||||
@@ -137,11 +137,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.chkUseExtCodePrice.Checked = pddUploadRule.IsUseExtCodePrice;
|
||||
|
||||
|
||||
this.lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件";
|
||||
this.lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
|
||||
|
||||
int prodCount = 0;
|
||||
var list = GetRandomProductList(out prodCount, 1, 1);
|
||||
lblGoodsCount.Text = "产品库中共有 " + prodCount + " 件商品";
|
||||
lblGoodsCount.Text = "产品库 " + prodCount + " 件";
|
||||
|
||||
this.panel1.SendToBack();
|
||||
chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false);
|
||||
@@ -727,7 +727,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", this.lstTemuDBProductSelect);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件";
|
||||
lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
|
||||
}));
|
||||
|
||||
Invoke(new Action(() =>
|
||||
@@ -1272,6 +1272,27 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
return "编辑失败 " + error;
|
||||
}
|
||||
|
||||
// 给前端采集的商品匹配sku的parent_id
|
||||
if (prodInfo.detail.sku.FirstOrDefault().spec[0].parent_id == null)
|
||||
{
|
||||
foreach (var skuInfo in prodInfo.detail.sku)
|
||||
{
|
||||
int index = 0;
|
||||
foreach (var specInfo in skuInfo.spec)
|
||||
{
|
||||
var specTemp = prodCatTemplateInfo.spec_module.properties.FirstOrDefault(m => m.name_alias == specInfo.parent_name);
|
||||
if (specTemp != null)
|
||||
specInfo.parent_id = specTemp.id.ParseToInt();
|
||||
else if ( prodCatTemplateInfo.spec_module.properties.Count > index)
|
||||
{
|
||||
// 填写0使用传统sku规格
|
||||
specInfo.parent_id = 0; //prodCatTemplateInfo.spec_module.properties[index].id.ParseToInt();
|
||||
}
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cell != null)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
@@ -1279,6 +1300,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
cell.Value = "正在获取运费模板";
|
||||
}));
|
||||
}
|
||||
|
||||
//运费模板
|
||||
string cost_template_html = get_cost_template(shop, prodInfo.detail.cat_ids, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, prodInfo.chance_tab);
|
||||
if (cost_template_html.Contains("\"success\":true"))
|
||||
@@ -1324,6 +1346,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
|
||||
// 根据详情图获取decoration装修模板
|
||||
if (prodInfo.decoration == null || prodInfo.decoration.floor_list == null || prodInfo.decoration.floor_list.Count == 0)
|
||||
{
|
||||
string decorationJson;
|
||||
PDDProductDecorationInfo decoration;
|
||||
PDDShopBrowserObject.GetDecoration(out decoration, out decorationJson, shop, prodInfo.detail, prodParam.goods_commit_id, prodParam.goods_id.ParseToString());
|
||||
prodInfo.decoration = decoration;
|
||||
}
|
||||
|
||||
|
||||
|
||||
prodParam.ai_goods_video = new List<object>();
|
||||
prodParam.ai_goods_video = new List<object>();
|
||||
prodParam.allergy_refund = prodInfo.detail.allergy_refund;
|
||||
@@ -1469,6 +1502,51 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
}
|
||||
}
|
||||
|
||||
// 处理材质成分特殊格式
|
||||
var propMaterial = prodInfo.property.goods_properties.FirstOrDefault(p => p.name == "材质成分");
|
||||
var propTempMaterial = prodCatTemplateInfo.modules.FirstOrDefault()?.propertys.FirstOrDefault(p => p.name_alias == "材质成分");
|
||||
if (propMaterial != null && propMaterial.values[0].value.Contains("%") && propTempMaterial?.control_type == 18)
|
||||
{
|
||||
foreach (var value_item in propMaterial.values)
|
||||
{
|
||||
string propMaterialValue = value_item.value;
|
||||
var numPercent = BaseRegex.GetMatchRegex(ref propMaterialValue, "\\d+(\\.\\d+)?%").Cast<Match>().FirstOrDefault().ParseToString();
|
||||
if (!string.IsNullOrEmpty(numPercent))
|
||||
{
|
||||
value_item.value = value_item.value.Replace(numPercent, "");
|
||||
value_item.raw_value = value_item.raw_value.Replace(numPercent, "");
|
||||
value_item.table_info_vo = new table_info_vo_info() { table_value_list = new List<table_value_info>(), };
|
||||
value_item.table_info_vo.table_value_list.Add(new table_value_info()
|
||||
{
|
||||
column_type = 1,
|
||||
unit = "%",
|
||||
value = numPercent.Replace("%", "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// 处理前端采集无vid的问题
|
||||
foreach (var propInfo in prodInfo.property.goods_properties)
|
||||
{
|
||||
if (propInfo.ref_pid == null)
|
||||
{
|
||||
var propTemp = prodCatTemplateInfo.modules.FirstOrDefault()?.propertys.FirstOrDefault(p => p.name_alias == propInfo.name);
|
||||
if (propTemp != null)
|
||||
{
|
||||
propInfo.ref_pid = propTemp.ref_pid;
|
||||
foreach (var valItem in propInfo.values)
|
||||
{
|
||||
if (valItem.vid == null)
|
||||
{
|
||||
var valTemp = propTemp.values.content.FirstOrDefault(c => c.value == valItem.value);
|
||||
if (valTemp != null)
|
||||
valItem.vid = valTemp.vid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
prodParam.goods_properties = new List<goods_spec_property_param>(); // 商品属性,通过接口获取商品模板并做匹配
|
||||
var goods_properties = new List<goods_spec_property_param>(); // 商品属性,暂存
|
||||
//step1(共3个step)通过商品属性获取二级必填属性
|
||||
@@ -1491,6 +1569,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
value_unit = "",
|
||||
content = (propInfo.values.FirstOrDefault()?.value).ParseToString(),
|
||||
};
|
||||
if (propInfo.values.FirstOrDefault()?.table_info_vo?.table_value_list?.FirstOrDefault() != null)
|
||||
{
|
||||
prop.table_info_dto = new table_info_dto_param() { table_value_list = new List<table_value_param>() };
|
||||
foreach (var table_value_param in propInfo.values.FirstOrDefault()?.table_info_vo?.table_value_list)
|
||||
{
|
||||
prop.table_info_dto.table_value_list.Add(new table_value_param()
|
||||
{
|
||||
unit = table_value_param.unit,
|
||||
value = table_value_param.value,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (cell != null)
|
||||
{
|
||||
@@ -1600,6 +1690,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
value_unit = "",
|
||||
content = (propInfo.values.FirstOrDefault()?.value).ParseToString(),
|
||||
};
|
||||
if (propInfo.values.FirstOrDefault()?.table_info_vo?.table_value_list?.FirstOrDefault() != null)
|
||||
{
|
||||
prop.table_info_dto = new table_info_dto_param() { table_value_list = new List<table_value_param>() };
|
||||
foreach (var table_value_param in propInfo.values.FirstOrDefault()?.table_info_vo?.table_value_list)
|
||||
{
|
||||
prop.table_info_dto.table_value_list.Add(new table_value_param()
|
||||
{
|
||||
unit = table_value_param.unit,
|
||||
value = table_value_param.value,
|
||||
});
|
||||
}
|
||||
}
|
||||
goods_properties.Add(prop);
|
||||
}
|
||||
//step3(共3个step)如果有遗漏的必填(required)商品属性,按默认值填写
|
||||
@@ -1933,7 +2035,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
{
|
||||
using (Graphics g = Graphics.FromImage(imageBg))
|
||||
{
|
||||
g.DrawImage(image, new Rectangle(0, 0, image.Width, image.Height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel);
|
||||
g.DrawImage(image, new Rectangle(0, 0, imageBg.Width, imageBg.Height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel);
|
||||
//Pen pen = new Pen(Color.White);
|
||||
//g.DrawLine(pen, Randomx.GetId(0, image.Width), Randomx.GetId(0, image.Height), Randomx.GetId(0, image.Width), Randomx.GetId(0, image.Height));
|
||||
//pen = new Pen(Color.Blue);
|
||||
@@ -5561,7 +5663,7 @@ Content-Type: image/jpeg
|
||||
break;
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
lblGoodsCount.Text = "产品库中共有 " + prodCount + " 件商品";
|
||||
lblGoodsCount.Text = "产品库 " + prodCount + " 件";
|
||||
}));
|
||||
Thread.Sleep(Randomx.GetId(50,100));
|
||||
foreach (var prod in list)
|
||||
@@ -5575,7 +5677,7 @@ Content-Type: image/jpeg
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件";
|
||||
lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
|
||||
}));
|
||||
addCount--;
|
||||
if (addCount <= 0)
|
||||
@@ -5606,6 +5708,7 @@ Content-Type: image/jpeg
|
||||
data += "&in_skc_ids=" + txtIdFilter.Text;
|
||||
data += "&in_groups=" + cmbGroupFilter.Text;
|
||||
data += "&in_cates=" + cmbCateFilter.Text;
|
||||
data += "&product_get_type=" + cmbSourceType.Text.Trim();
|
||||
}));
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
@@ -5649,7 +5752,7 @@ Content-Type: image/jpeg
|
||||
|
||||
this.lstTemuDBProductSelect.Clear();
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", this.lstTemuDBProductSelect);
|
||||
lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件";
|
||||
lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
|
||||
}
|
||||
|
||||
private void lblNewAddPrice_Click(object sender, EventArgs e)
|
||||
@@ -5765,7 +5868,7 @@ Content-Type: image/jpeg
|
||||
PDDDBProdUserSelectCacheForm selectCacheForm = new PDDDBProdUserSelectCacheForm(lstTemuDBProductSelect);
|
||||
selectCacheForm.ShowDialog();
|
||||
|
||||
lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件";
|
||||
lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
|
||||
}
|
||||
|
||||
private void btnClearFilter_Click(object sender, EventArgs e)
|
||||
@@ -5774,9 +5877,10 @@ Content-Type: image/jpeg
|
||||
txtExtCodeFilter.Text = "";
|
||||
cmbGroupFilter.Text = "";
|
||||
cmbCateFilter.Text = "";
|
||||
cmbSourceType.Text = "";
|
||||
int prodCount;
|
||||
GetRandomProductList(out prodCount, 1, 1);
|
||||
lblGoodsCount.Text = "产品库中共有 " + prodCount + " 件商品";
|
||||
lblGoodsCount.Text = "产品库 " + prodCount + " 件";
|
||||
}
|
||||
|
||||
private void lblLowPriceSkuImg_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -261,63 +261,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
// return;
|
||||
//}
|
||||
|
||||
PDDProdDecorationCommitParam decorationParam = new PDDProdDecorationCommitParam();
|
||||
decorationParam.goods_id = product.goods_id;
|
||||
decorationParam.goods_commit_id = commitId.ParseToLong();
|
||||
decorationParam.preview_key = "";
|
||||
decorationParam.decoration_floor_list = new List<decoration_floor_param>();
|
||||
foreach (var gallary in product.galleries)
|
||||
{
|
||||
if (gallary.type != 2)
|
||||
continue;
|
||||
|
||||
var floor_param = new decoration_floor_param();
|
||||
//floor_param.floor_id = 0; // floorItem.floor_id;
|
||||
floor_param.type = "image"; // floorItem.type;
|
||||
floor_param.content_list = new List<decoration_content_param>();
|
||||
//foreach (var c in floorItem.content_list)
|
||||
{
|
||||
var decorationContentParam = new decoration_content_param()
|
||||
{
|
||||
//file_id = c.file_id,
|
||||
img_url = gallary.url, //c.img_url,
|
||||
//height = c.height,
|
||||
//text = c.text,
|
||||
//text_module_details = null,
|
||||
//width = c.width,
|
||||
};
|
||||
//try { decorationContentParam.text_module_details = JsonHelper.DeserializeJsonToObject<text_module_detail_param>(JsonHelper.SerializeObject(c.text_module_details)); }
|
||||
//catch (Exception ex) { }
|
||||
floor_param.content_list.Add(decorationContentParam);
|
||||
}
|
||||
decorationParam.decoration_floor_list.Add(floor_param);
|
||||
}
|
||||
|
||||
var addDecorationRst = save_decoration(shop, decorationParam, product.goods_id.ParseToString(), commitId);
|
||||
Thread.Sleep(Randomx.GetId(10, 50));
|
||||
|
||||
// 第二次获取详情图
|
||||
try
|
||||
{
|
||||
var prod_decoration_rst = GetPddProdDecoration(sourceShop, sourceProdId.ToString(), commitId);
|
||||
if (!prod_decoration_rst.Contains("\"success\":true"))
|
||||
{
|
||||
var errMsg = BaseRegex.GetStringJson(ref prod_decoration_rst, "error_msg");
|
||||
if (string.IsNullOrEmpty(errMsg))
|
||||
errMsg = prod_decoration_rst;
|
||||
//OnInfoReceived("商品获取失败!商品详情图获取失败!" + errMsg);
|
||||
return "商品获取失败!商品详情图获取失败!" + errMsg;
|
||||
}
|
||||
JObject prod_decoration_obj = JObject.Parse(prod_decoration_rst);
|
||||
if (!prod_decoration_obj["result"].IsNullOrEmpty())
|
||||
decoration_json = JsonHelper.SerializeObject(prod_decoration_obj["result"]);
|
||||
decoration = JsonHelper.DeserializeJsonToObject<PDDProductDecorationInfo>(decoration_json);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//OnInfoReceived("商品获取失败!商品详情图获取失败!" + ex.Message);
|
||||
return "商品获取失败!商品详情图获取失败!" + ex.Message;
|
||||
}
|
||||
GetDecoration(out decoration, out decoration_json, shop, product, commitId, sourceProdId);
|
||||
}
|
||||
|
||||
|
||||
@@ -505,6 +449,73 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string GetDecoration(out PDDProductDecorationInfo decoration, out string decoration_json, ShopLoginInfo sourceShop, PDDProductDetailInfo product, string commitId, string sourceProdId)
|
||||
{
|
||||
decoration = null;
|
||||
decoration_json = "{}";
|
||||
PDDProdDecorationCommitParam decorationParam = new PDDProdDecorationCommitParam();
|
||||
decorationParam.goods_id = sourceProdId.ParseToLong();
|
||||
decorationParam.goods_commit_id = commitId.ParseToLong();
|
||||
decorationParam.preview_key = "";
|
||||
decorationParam.decoration_floor_list = new List<decoration_floor_param>();
|
||||
foreach (var gallary in product.galleries)
|
||||
{
|
||||
if (gallary.type != 2)
|
||||
continue;
|
||||
|
||||
var floor_param = new decoration_floor_param();
|
||||
//floor_param.floor_id = 0; // floorItem.floor_id;
|
||||
floor_param.type = "image"; // floorItem.type;
|
||||
floor_param.content_list = new List<decoration_content_param>();
|
||||
//foreach (var c in floorItem.content_list)
|
||||
{
|
||||
var decorationContentParam = new decoration_content_param()
|
||||
{
|
||||
//file_id = c.file_id,
|
||||
img_url = gallary.url, //c.img_url,
|
||||
//height = c.height,
|
||||
//text = c.text,
|
||||
//text_module_details = null,
|
||||
//width = c.width,
|
||||
};
|
||||
//try { decorationContentParam.text_module_details = JsonHelper.DeserializeJsonToObject<text_module_detail_param>(JsonHelper.SerializeObject(c.text_module_details)); }
|
||||
//catch (Exception ex) { }
|
||||
floor_param.content_list.Add(decorationContentParam);
|
||||
}
|
||||
decorationParam.decoration_floor_list.Add(floor_param);
|
||||
}
|
||||
|
||||
var addDecorationRst = save_decoration(sourceShop, decorationParam, sourceProdId.ParseToString(), commitId);
|
||||
Thread.Sleep(Randomx.GetId(10, 50));
|
||||
|
||||
// 第二次获取详情图
|
||||
try
|
||||
{
|
||||
var prod_decoration_rst = GetPddProdDecoration(sourceShop, sourceProdId.ParseToString(), commitId);
|
||||
if (!prod_decoration_rst.Contains("\"success\":true"))
|
||||
{
|
||||
var errMsg = BaseRegex.GetStringJson(ref prod_decoration_rst, "error_msg");
|
||||
if (string.IsNullOrEmpty(errMsg))
|
||||
errMsg = prod_decoration_rst;
|
||||
//OnInfoReceived("商品获取失败!商品详情图获取失败!" + errMsg);
|
||||
return "商品获取失败!商品详情图获取失败!" + errMsg;
|
||||
}
|
||||
JObject prod_decoration_obj = JObject.Parse(prod_decoration_rst);
|
||||
if (!prod_decoration_obj["result"].IsNullOrEmpty())
|
||||
{
|
||||
decoration_json = JsonHelper.SerializeObject(prod_decoration_obj["result"]);
|
||||
decoration = JsonHelper.DeserializeJsonToObject<PDDProductDecorationInfo>(decoration_json);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//OnInfoReceived("商品获取失败!商品详情图获取失败!" + ex.Message);
|
||||
return "商品获取失败!商品详情图获取失败!" + ex.Message;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 第三方获取商品并直接提交到第三方待上传列表
|
||||
/// </summary>
|
||||
@@ -805,7 +816,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
/// <param name="goodsId"></param>
|
||||
/// <param name="commitId"></param>
|
||||
/// <returns></returns>
|
||||
private string save_decoration(ShopLoginInfo shop, PDDProdDecorationCommitParam decoration, string goodsId, string commitId)
|
||||
public static string save_decoration(ShopLoginInfo shop, PDDProdDecorationCommitParam decoration, string goodsId, string commitId)
|
||||
{
|
||||
var anti = shop.AntiContents.LastOrDefault().ParseToString();
|
||||
if (shop.AntiContents.Count > 0)
|
||||
@@ -903,7 +914,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
return result;
|
||||
}
|
||||
|
||||
private string GetPddProdDecoration(ShopLoginInfo shop, string prodId, string commitId)
|
||||
public static string GetPddProdDecoration(ShopLoginInfo shop, string prodId, string commitId)
|
||||
{
|
||||
var anti = shop.AntiContents.LastOrDefault().ParseToString();
|
||||
if (shop.AntiContents.Count > 0)
|
||||
|
||||
Reference in new issue
Block a user