1拼多多接口上传及相关功能(不含部分功能) 2拼多多选品

This commit is contained in:
wule committed 2026-03-31 18:14:55 +08:00
1 parent ff42506091
commit 07b912e9eb
37 files changed
+21117 -206

No files matched your search

@@ -30,14 +30,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.txtAddShippingFeeTimes = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.btnApiUpload = new DevComponents.DotNetBar.PanelEx();
this.btnUpload = new DevComponents.DotNetBar.PanelEx();
this.label7 = new System.Windows.Forms.Label();
@@ -69,14 +72,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.chkAddMorePriceFirst = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.btnClearDgv = new DevComponents.DotNetBar.PanelEx();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.txtSinglePriceAdd = new System.Windows.Forms.TextBox();
this.panel4 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.fPnlPriceRule = new System.Windows.Forms.FlowLayoutPanel();
this.ucAddPrice1 = new TemuKJD.PDDForms.ProductSelectForms.UcAddPrice();
this.ucAddPrice3 = new TemuKJD.PDDForms.ProductSelectForms.UcAddPrice();
this.label11 = new System.Windows.Forms.Label();
this.lblNewAddPrice = new System.Windows.Forms.Label();
this.txtAddMorePrice = new System.Windows.Forms.TextBox();
this.txtAddTimes = new System.Windows.Forms.TextBox();
@@ -88,7 +89,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.chkChance = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkLowPriceSku = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.lblLowPriceSkuImg = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnProdDb = new DevComponents.DotNetBar.PanelEx();
this.chkSkipQualification = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.cmbSourceType = new System.Windows.Forms.ComboBox();
@@ -108,9 +112,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.lblGoodsCount = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshApi = new DevComponents.DotNetBar.PanelEx();
this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbShopLoading = new System.Windows.Forms.PictureBox();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -119,6 +125,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.colApiStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -174,6 +181,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).BeginInit();
@@ -210,6 +218,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.txtAddShippingFeeTimes);
this.ucGroupBoxEx2.Controls.Add(this.label12);
this.ucGroupBoxEx2.Controls.Add(this.btnApiUpload);
this.ucGroupBoxEx2.Controls.Add(this.btnUpload);
this.ucGroupBoxEx2.Controls.Add(this.label7);
@@ -241,10 +251,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucGroupBoxEx2.Controls.Add(this.chkAddMorePriceFirst);
this.ucGroupBoxEx2.Controls.Add(this.btnClearDgv);
this.ucGroupBoxEx2.Controls.Add(this.label14);
this.ucGroupBoxEx2.Controls.Add(this.label15);
this.ucGroupBoxEx2.Controls.Add(this.txtSinglePriceAdd);
this.ucGroupBoxEx2.Controls.Add(this.panel4);
this.ucGroupBoxEx2.Controls.Add(this.label11);
this.ucGroupBoxEx2.Controls.Add(this.lblNewAddPrice);
this.ucGroupBoxEx2.Controls.Add(this.txtAddMorePrice);
this.ucGroupBoxEx2.Controls.Add(this.txtAddTimes);
@@ -256,6 +264,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucGroupBoxEx2.Controls.Add(this.chkChance);
this.ucGroupBoxEx2.Controls.Add(this.chkLowPriceSku);
this.ucGroupBoxEx2.Controls.Add(this.lblLowPriceSkuImg);
this.ucGroupBoxEx2.Controls.Add(this.label15);
this.ucGroupBoxEx2.Controls.Add(this.label11);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(459, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(1062, 140);
@@ -263,6 +273,28 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "商品上传";
//
// txtAddShippingFeeTimes
//
this.txtAddShippingFeeTimes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtAddShippingFeeTimes.Location = new System.Drawing.Point(421, 110);
this.txtAddShippingFeeTimes.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtAddShippingFeeTimes.Name = "txtAddShippingFeeTimes";
this.txtAddShippingFeeTimes.Size = new System.Drawing.Size(31, 23);
this.txtAddShippingFeeTimes.TabIndex = 756;
this.txtAddShippingFeeTimes.Text = "1.0";
this.txtAddShippingFeeTimes.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged);
//
// label12
//
this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(384, 113);
this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(41, 17);
this.label12.TabIndex = 755;
this.label12.Text = "运费×";
//
// btnApiUpload
//
this.btnApiUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -286,7 +318,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnApiUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnApiUpload.TabIndex = 742;
this.btnApiUpload.Text = "批量上传";
this.btnApiUpload.Visible = false;
this.btnApiUpload.Click += new System.EventHandler(this.btnApiUpload_Click);
//
// btnUpload
@@ -626,11 +657,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// chkAddMorePriceFirst
//
this.chkAddMorePriceFirst.AutoSize = true;
this.chkAddMorePriceFirst.Location = new System.Drawing.Point(306, 111);
this.chkAddMorePriceFirst.Location = new System.Drawing.Point(291, 111);
this.chkAddMorePriceFirst.Name = "chkAddMorePriceFirst";
this.chkAddMorePriceFirst.Size = new System.Drawing.Size(111, 21);
this.chkAddMorePriceFirst.Size = new System.Drawing.Size(99, 21);
this.chkAddMorePriceFirst.TabIndex = 625;
this.chkAddMorePriceFirst.Text = "加价时先加再乘";
this.chkAddMorePriceFirst.Text = "加价先加再乘";
this.chkAddMorePriceFirst.UseVisualStyleBackColor = true;
this.chkAddMorePriceFirst.CheckedChanged += new System.EventHandler(this.chkAddMorePriceFirst_CheckedChanged);
//
@@ -672,21 +703,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.label14.TabIndex = 599;
this.label14.Text = "阶梯加价未\r\n勾选或条件\r\n不满足,按";
//
// label15
//
this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(283, 113);
this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(20, 17);
this.label15.TabIndex = 588;
this.label15.Text = "元";
//
// txtSinglePriceAdd
//
this.txtSinglePriceAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtSinglePriceAdd.Location = new System.Drawing.Point(252, 110);
this.txtSinglePriceAdd.Location = new System.Drawing.Point(241, 110);
this.txtSinglePriceAdd.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtSinglePriceAdd.Name = "txtSinglePriceAdd";
this.txtSinglePriceAdd.Size = new System.Drawing.Size(31, 23);
@@ -804,17 +824,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucAddPrice3.Size = new System.Drawing.Size(420, 23);
this.ucAddPrice3.TabIndex = 13;
//
// label11
//
this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(184, 113);
this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(68, 17);
this.label11.TabIndex = 536;
this.label11.Text = "元,单买加";
//
// lblNewAddPrice
//
this.lblNewAddPrice.AutoSize = true;
@@ -831,7 +840,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// txtAddMorePrice
//
this.txtAddMorePrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtAddMorePrice.Location = new System.Drawing.Point(153, 110);
this.txtAddMorePrice.Location = new System.Drawing.Point(145, 110);
this.txtAddMorePrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtAddMorePrice.Name = "txtAddMorePrice";
this.txtAddMorePrice.Size = new System.Drawing.Size(31, 23);
@@ -842,7 +851,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// txtAddTimes
//
this.txtAddTimes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtAddTimes.Location = new System.Drawing.Point(78, 110);
this.txtAddTimes.Location = new System.Drawing.Point(73, 110);
this.txtAddTimes.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtAddTimes.Name = "txtAddTimes";
this.txtAddTimes.Size = new System.Drawing.Size(31, 23);
@@ -854,7 +863,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(109, 113);
this.label10.Location = new System.Drawing.Point(103, 113);
this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(44, 17);
@@ -863,10 +872,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// txtStockNum
//
this.txtStockNum.Location = new System.Drawing.Point(486, 110);
this.txtStockNum.Location = new System.Drawing.Point(496, 110);
this.txtStockNum.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtStockNum.Name = "txtStockNum";
this.txtStockNum.Size = new System.Drawing.Size(32, 23);
this.txtStockNum.Size = new System.Drawing.Size(30, 23);
this.txtStockNum.TabIndex = 530;
this.txtStockNum.Text = "99";
this.txtStockNum.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged);
@@ -874,12 +883,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(430, 113);
this.label4.Location = new System.Drawing.Point(455, 113);
this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 17);
this.label4.Size = new System.Drawing.Size(44, 17);
this.label4.TabIndex = 531;
this.label4.Text = "库存数量";
this.label4.Text = "库存数";
//
// label9
//
@@ -941,12 +950,35 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.lblLowPriceSkuImg.Text = "传sku图";
this.lblLowPriceSkuImg.Click += new System.EventHandler(this.lblLowPriceSkuImg_Click);
//
// label15
//
this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(271, 113);
this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(20, 17);
this.label15.TabIndex = 588;
this.label15.Text = "元";
//
// label11
//
this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(175, 113);
this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(68, 17);
this.label11.TabIndex = 536;
this.label11.Text = "元,单买加";
//
// ucGroupBoxEx4
//
this.ucGroupBoxEx4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| 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.btnProdDb);
this.ucGroupBoxEx4.Controls.Add(this.chkSkipQualification);
this.ucGroupBoxEx4.Controls.Add(this.pictureBox1);
this.ucGroupBoxEx4.Controls.Add(this.cmbSourceType);
@@ -972,6 +1004,30 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucGroupBoxEx4.TabStop = false;
this.ucGroupBoxEx4.Text = "待传商品";
//
// btnProdDb
//
this.btnProdDb.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnProdDb.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnProdDb.DisabledBackColor = System.Drawing.Color.Empty;
this.btnProdDb.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnProdDb.Location = new System.Drawing.Point(264, 105);
this.btnProdDb.Name = "btnProdDb";
this.btnProdDb.Size = new System.Drawing.Size(38, 23);
this.btnProdDb.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnProdDb.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnProdDb.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnProdDb.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnProdDb.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnProdDb.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnProdDb.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnProdDb.Style.GradientAngle = 90;
this.btnProdDb.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnProdDb.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnProdDb.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnProdDb.TabIndex = 824;
this.btnProdDb.Text = "选品";
this.btnProdDb.Click += new System.EventHandler(this.btnProdDb_Click);
//
// chkSkipQualification
//
this.chkSkipQualification.Checked = true;
@@ -1049,7 +1105,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// txtAddCount
//
this.txtAddCount.Location = new System.Drawing.Point(172, 105);
this.txtAddCount.Location = new System.Drawing.Point(158, 105);
this.txtAddCount.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtAddCount.Name = "txtAddCount";
this.txtAddCount.Size = new System.Drawing.Size(35, 23);
@@ -1088,9 +1144,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(209, 105);
this.panelEx2.Location = new System.Drawing.Point(196, 105);
this.panelEx2.Name = "panelEx2";
this.panelEx2.Size = new System.Drawing.Size(93, 23);
this.panelEx2.Size = new System.Drawing.Size(65, 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)))));
@@ -1103,7 +1159,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.panelEx2.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.panelEx2.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.panelEx2.TabIndex = 431;
this.panelEx2.Text = "随机添加商品";
this.panelEx2.Text = "随机添加";
this.panelEx2.Click += new System.EventHandler(this.btnRandomAdd_Click);
//
// label2
@@ -1209,6 +1265,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
| System.Windows.Forms.AnchorStyles.Left)));
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.btnRefreshApi);
this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
@@ -1217,6 +1274,31 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "基础";
//
// btnRefreshApi
//
this.btnRefreshApi.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnRefreshApi.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnRefreshApi.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshApi.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRefreshApi.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefreshApi.Location = new System.Drawing.Point(74, 21);
this.btnRefreshApi.Name = "btnRefreshApi";
this.btnRefreshApi.Size = new System.Drawing.Size(64, 24);
this.btnRefreshApi.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshApi.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshApi.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshApi.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnRefreshApi.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnRefreshApi.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnRefreshApi.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnRefreshApi.Style.GradientAngle = 90;
this.btnRefreshApi.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshApi.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshApi.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshApi.TabIndex = 438;
this.btnRefreshApi.Text = "刷新授权";
this.btnRefreshApi.Click += new System.EventHandler(this.btnRefreshApi_Click);
//
// btnRefreshShop
//
this.btnRefreshShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -1224,9 +1306,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefreshShop.Location = new System.Drawing.Point(17, 31);
this.btnRefreshShop.Location = new System.Drawing.Point(8, 21);
this.btnRefreshShop.Name = "btnRefreshShop";
this.btnRefreshShop.Size = new System.Drawing.Size(110, 24);
this.btnRefreshShop.Size = new System.Drawing.Size(64, 24);
this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -1270,6 +1352,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.pbShopLoading);
this.splitContainer2.Panel1.Controls.Add(this.dgvShop);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
//
@@ -1281,26 +1364,38 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer2.Panel2.Controls.Add(this.dgvSelectProduct);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1523, 372);
this.splitContainer2.SplitterDistance = 300;
this.splitContainer2.SplitterDistance = 326;
this.splitContainer2.TabIndex = 0;
//
// pbShopLoading
//
this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbShopLoading.Location = new System.Drawing.Point(138, 161);
this.pbShopLoading.Name = "pbShopLoading";
this.pbShopLoading.Size = new System.Drawing.Size(50, 50);
this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbShopLoading.TabIndex = 189;
this.pbShopLoading.TabStop = false;
this.pbShopLoading.Visible = false;
//
// dgvShop
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle13.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle22.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle22;
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)))));
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14;
dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle23.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle23.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle23.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle23.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle23.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle23;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -1310,6 +1405,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.colShopNotes,
this.colSelectProduct,
this.colLoginStatus,
this.colApiStatus,
this.colCanUse,
this.colRemaining,
this.colMessage});
@@ -1320,7 +1416,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 25;
this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.Size = new System.Drawing.Size(296, 372);
this.dgvShop.Size = new System.Drawing.Size(322, 372);
this.dgvShop.TabIndex = 6;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
@@ -1381,7 +1477,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.colLoginStatus.ReadOnly = true;
this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLoginStatus.Width = 40;
this.colLoginStatus.Width = 38;
//
// colApiStatus
//
this.colApiStatus.HeaderText = "授权";
this.colApiStatus.Name = "colApiStatus";
this.colApiStatus.ReadOnly = true;
this.colApiStatus.Width = 38;
//
// colCanUse
//
@@ -1409,7 +1512,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// txtTest20981
//
this.txtTest20981.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtTest20981.Location = new System.Drawing.Point(996, 30);
this.txtTest20981.Location = new System.Drawing.Point(970, 30);
this.txtTest20981.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtTest20981.Name = "txtTest20981";
this.txtTest20981.Size = new System.Drawing.Size(127, 23);
@@ -1422,7 +1525,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnTest20981.CanvasColor = System.Drawing.SystemColors.Control;
this.btnTest20981.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnTest20981.DisabledBackColor = System.Drawing.Color.Empty;
this.btnTest20981.Location = new System.Drawing.Point(1127, 30);
this.btnTest20981.Location = new System.Drawing.Point(1101, 30);
this.btnTest20981.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnTest20981.Name = "btnTest20981";
this.btnTest20981.Size = new System.Drawing.Size(84, 23);
@@ -1447,7 +1550,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(584, 161);
this.pbLoading.Location = new System.Drawing.Point(571, 161);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -1459,19 +1562,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle15.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle15;
dataGridViewCellStyle24.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle24;
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)))));
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle16;
dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle25.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle25.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle25.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle25.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle25.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle25;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -1502,7 +1605,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.dgvSelectProduct.Name = "dgvSelectProduct";
this.dgvSelectProduct.ReadOnly = true;
this.dgvSelectProduct.RowTemplate.Height = 23;
this.dgvSelectProduct.Size = new System.Drawing.Size(1215, 372);
this.dgvSelectProduct.Size = new System.Drawing.Size(1189, 372);
this.dgvSelectProduct.TabIndex = 187;
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll);
@@ -1533,8 +1636,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// colSupplierName
//
dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle17;
dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle26;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
@@ -1612,12 +1715,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// colProductName
//
dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle18;
dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle27;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Width = 150;
this.colProductName.Width = 140;
//
// colProductCat
//
@@ -1673,7 +1776,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// colAddTime
//
this.colAddTime.FillWeight = 110F;
dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle28;
this.colAddTime.FillWeight = 80F;
this.colAddTime.HeaderText = "上传时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
@@ -1815,6 +1920,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).EndInit();
@@ -1862,16 +1968,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private UserComponent.UcCheckBox chkStepAddPrice;
private DevComponents.DotNetBar.PanelEx btnClearDgv;
private UserComponent.UcCheckBox chkAddMorePriceFirst;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes;
private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct;
private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
private System.Windows.Forms.FlowLayoutPanel fPnlPriceRule;
private UcAddPrice ucAddPrice1;
private UcAddPrice ucAddPrice3;
@@ -1915,6 +2011,26 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.PictureBox pbUpgradeVersion;
private System.Windows.Forms.Label lblUpgradeVersion;
private UserComponent.UcCheckBox chkUseExtCodePrice;
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;
private System.Windows.Forms.PictureBox pictureBox1;
private UserComponent.UcCheckBox chkSkipQualification;
private DevComponents.DotNetBar.PanelEx btnApiUpload;
private DevComponents.DotNetBar.PanelEx btnRefreshApi;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes;
private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct;
private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colApiStatus;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
@@ -1937,13 +2053,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
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;
private System.Windows.Forms.PictureBox pictureBox1;
private UserComponent.UcCheckBox chkSkipQualification;
private DevComponents.DotNetBar.PanelEx btnApiUpload;
private System.Windows.Forms.TextBox txtAddShippingFeeTimes;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.PictureBox pbShopLoading;
private DevComponents.DotNetBar.PanelEx btnProdDb;
}
}
@@ -27,6 +27,7 @@ using AllBase.Model.Result.PDDResult;
using AllBase.Model.Param.PDDProdParam;
using CefSharp;
using TemuKJD.BLL.PddApi;
using TemuKJD.WXForms.ProductForms;
namespace TemuKJD.PDDForms.ProductSelectForms
{
@@ -68,7 +69,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void UserSelectDbProductForm_Load(object sender, EventArgs e)
{
Task.Run(() => { InitPddToken(); });
//Task.Run(() => { InitPddToken(); });
RefreshApi();
this.splitContainer1.Dock = DockStyle.Fill;
this.panel1.Location = new Point(40, 30);
@@ -119,6 +121,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.txtAddMorePrice.Text = defaultAddPriceRule.AddMorePrice.ToString();
this.txtSinglePriceAdd.Text = defaultAddPriceRule.SinglePriceAdd.ToString();
this.txtStockNum.Text = defaultAddPriceRule.StockNum.ToString();
this.txtAddShippingFeeTimes.Text = defaultAddPriceRule.AddShippingFeeTimes.ToString();
this.chkAddMorePriceFirst.Checked = defaultAddPriceRule.AddMorePriceFirst;
pddUploadRule = NaiBa.Util.Helper.ConfigHelper.LoadConfig<PddUploadRule>("pdd_upload_rule");
@@ -143,9 +146,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
int prodCount = 0;
var list = GetRandomProductList(out prodCount, 1, 1);
lblGoodsCount.Text = "产品库 " + prodCount + " 件";
pictureBox1.Visible = true;
Task.Run(() =>
{
int prodCount = 0;
var list = GetRandomProductList(out prodCount, 1, 1);
Invoke(new Action(() =>
{
lblGoodsCount.Text = "产品库 " + prodCount + " 件";
pictureBox1.Visible = false;
}));
});
this.panel1.SendToBack();
chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false);
@@ -176,8 +187,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms
IsLoadComplate = true;
}
// 测试全局access_token
void InitPddToken()
{
return;
var url = "https://po.e57.cn/prod-api/api/sys-api/system/open/api/shop/list?userName=pdd用户";
//var rst = WXHttpResponseBLL.e57PostResponse(url, "&warehouseNum=123456&shopId=46568955", "");
var rst = WXHttpResponseBLL.e57GetResponse(url, "");
@@ -199,9 +213,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
// 测试写死
var shop1 = GlobalConfig.ShopLoginList.First(s => s.ShopAccount == "阿杰小铺浦哈哈");
shop1.ApiAuthInfoList = new List<AuthInfo>();
shop1.ApiAuthInfoList.Add(new AuthInfo { AccessToken = "269a0baaca9b42abb443756fac90f88b0836f610" });
//var shop1 = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopAccount == "阿杰小铺浦哈哈");
//shop1.ApiAuthInfoList = new List<AuthInfo>();
//shop1.ApiAuthInfoList.Add(new AuthInfo { AccessToken = "269a0baaca9b42abb443756fac90f88b0836f610" });
// 临时刷新token
//var rst1 = pddApi.PddPopAuthTokenCreate();
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
@@ -235,7 +252,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
if (Visible == true)
{
RefreshShop();
RefreshDbProd();
if (!isInit)
RefreshDbProd();
isInit = true;
}
@@ -315,18 +333,20 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId);
if (row == null)
{
this.dgvShop.Rows.Add(
!isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse),
var index = this.dgvShop.Rows.Add(
false, //!isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse),
shopEntity.LoginName,
shopEntity.ShopId,
shopEntity.ShopAccount,
shopEntity.Notes,
"选择商品",
canUse ? "在线" : "掉线",
shopEntity.AuthExpiresTime > DateTime.Now ? "有效" : "过期",
canUse,
shopEntity.AddProductRemaining,
string.Empty
shopEntity.Message
);
row = dgvShop.Rows[index];
}
else
{
@@ -335,9 +355,29 @@ namespace TemuKJD.PDDForms.ProductSelectForms
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
row.Cells["colShopNotes"].Value = shopEntity.Notes;
row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线";
row.Cells["colApiStatus"].Value = shopEntity.AuthExpiresTime > DateTime.Now ? "有效" : "过期";
row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red;
row.Cells["colCanUse"].Value = canUse;
row.Cells["colRemaining"].Value = shopEntity.AddProductRemaining;
row.Cells["colMessage"].Value = shopEntity.Message;
}
displayShopStatus(shopEntity);
}
void displayShopStatus(ShopLoginInfo shop)
{
bool canUse = shop.LoginStatus == "登录成功";
bool apiAuth = shop.AuthExpiresTime > DateTime.Now;
var rows = this.dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colShopId"].Value.ParseToString() == shop?.ShopId);
foreach (var row in rows)
{
row.Cells["colCanUse"].Value = canUse;
row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线";
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Blue : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Blue : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightBlue : Color.OrangeRed;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkBlue : Color.DarkRed;
row.Cells["colApiStatus"].Style.ForeColor = apiAuth ? Color.Green : Color.OrangeRed;
}
}
@@ -2091,34 +2131,38 @@ namespace TemuKJD.PDDForms.ProductSelectForms
foreach (var skuParamInfo in baseSkuParamLst)
{
var skuParam = JsonHelper.DeserializeJsonToObject<sku_param>(JsonHelper.SerializeObject(skuParamInfo));
skuParam.multi_price = (skuParamInfo.multi_price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt();
skuParam.price = (skuParamInfo.price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt();
//上面已经给过值了,且厂商直采的上家缺货则保持缺货。
// 库存上面已经给过值了,且厂商直采的上家缺货则保持缺货。
//skuParam.quantity_delta = txtStockNum.Text.Trim().ParseToInt();
skuParam.multi_price += shipPrice;
skuParam.price += shipPrice;
var new_multi_price = skuParamInfo.multi_price + (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
// 普通加价
skuParam.multi_price = (new_multi_price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt();
if (isAddMorePriceFirst) // 先加后乘
skuParam.multi_price = ((skuParamInfo.multi_price + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100) * this.txtAddTimes.Text.Trim().ParseToDecimal()).ParseToInt();
skuParam.multi_price = ((new_multi_price + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100) * this.txtAddTimes.Text.Trim().ParseToDecimal()).ParseToInt();
skuParam.price = skuParam.multi_price + Math.Max(100, this.txtSinglePriceAdd.Text.Trim().ParseToDecimal() * 100).ParseToInt();
//阶梯式加价,如果命中则按阶梯式加价进行
if (isStepAddPrice)
{
foreach (var addPrice in lstAddPriceRule)
{
if (skuParamInfo.multi_price > addPrice.MoreThanPrice * 100 && skuParamInfo.multi_price <= addPrice.LessThanPrice * 100)
if (new_multi_price > addPrice.MoreThanPrice * 100 && new_multi_price <= addPrice.LessThanPrice * 100)
{
if (isAddMorePriceFirst) // 先加后乘
skuParam.multi_price = ((skuParamInfo.multi_price + addPrice.AddMorePrice * 100) * addPrice.AddPriceTimes).ParseToInt();
skuParam.multi_price = ((new_multi_price + addPrice.AddMorePrice * 100) * addPrice.AddPriceTimes).ParseToInt();
else
skuParam.multi_price = (skuParamInfo.multi_price * addPrice.AddPriceTimes + addPrice.AddMorePrice * 100).ParseToInt();
skuParam.price = skuParam.multi_price + Math.Max(100, addPrice.SinglePriceAdd * 100).ParseToInt(); ;
skuParam.multi_price = (new_multi_price * addPrice.AddPriceTimes + addPrice.AddMorePrice * 100).ParseToInt();
skuParam.price = skuParam.multi_price + Math.Max(100, addPrice.SinglePriceAdd * 100).ParseToInt();
break;
}
}
}
// 加邮费×倍率 放前面加
//skuParam.multi_price += (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
//skuParam.price += (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
if (prodParam.market_price < skuParam.price + 1000)
{
prodParam.market_price = skuParam.price + 1000;
@@ -2674,19 +2718,21 @@ namespace TemuKJD.PDDForms.ProductSelectForms
foreach (var skuParamInfo in baseSkuParamLst)
{
var skuParam = JsonHelper.DeserializeJsonToObject<sku_param>(JsonHelper.SerializeObject(skuParamInfo));
skuParam.multi_price += shipPrice;
skuParam.price += shipPrice;
skuParam.multi_price = (skuParamInfo.multi_price * this.txtAddTimesFake.Text.Trim().ParseToDecimal()).ParseToInt();
skuParam.price = (skuParamInfo.price * this.txtAddTimesFake.Text.Trim().ParseToDecimal()).ParseToInt();
//上面已经给过值了,且厂商直采的上家缺货则保持缺货。
// 库存上面已经给过值了,且厂商直采的上家缺货则保持缺货。
//skuParam.quantity_delta = txtStockNum.Text.Trim().ParseToInt(); // 库存
var new_multi_price = skuParamInfo.multi_price + (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
// 虚拟加价3倍
skuParam.multi_price = (new_multi_price * this.txtAddTimesFake.Text.Trim().ParseToDecimal()).ParseToInt();
if (isAddMorePriceFirst) // 先加后乘
skuParam.multi_price = ((skuParamInfo.multi_price) * this.txtAddTimesFake.Text.Trim().ParseToDecimal()).ParseToInt();
skuParam.multi_price = (new_multi_price * this.txtAddTimesFake.Text.Trim().ParseToDecimal()).ParseToInt();
skuParam.price = skuParam.multi_price + Math.Max(100, this.txtSinglePriceAdd.Text.Trim().ParseToDecimal() * 100).ParseToInt();
//// 加邮费×倍率 放前面
//skuParam.multi_price += (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
//skuParam.price += (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
if (prodParamHighPrice.market_price < skuParam.price + 1000)
{
prodParamHighPrice.market_price = skuParam.price + 1000;
@@ -6085,6 +6131,7 @@ Content-Type: image/jpeg
defaultAddPriceRule.AddMorePrice = txtAddMorePrice.Text.Trim().ParseToDecimal();
defaultAddPriceRule.SinglePriceAdd = txtSinglePriceAdd.Text.Trim().ParseToDecimal();
defaultAddPriceRule.StockNum = txtStockNum.Text.Trim().ParseToInt();
defaultAddPriceRule.AddShippingFeeTimes = txtAddShippingFeeTimes.Text.Trim().ParseToDecimal();
NaiBa.Util.Helper.ConfigHelper.SaveConfig<AddPriceRule>("pdd_default_add_price_rule", defaultAddPriceRule);
}
}
@@ -6663,7 +6710,7 @@ Content-Type: image/jpeg
Invoke(new Action(() => { statusBar.lblTaskStatus.Text = "正在上传!"; }));
// 指定店铺数量同时上货
if(currentUpShopLst.Count >= 10)
if (currentUpShopLst.Count >= 10)
{
Thread.Sleep(500);
continue;
@@ -6746,6 +6793,8 @@ Content-Type: image/jpeg
{
result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"" + ex.Message + "\"}";
}
var timeSpan = DateTime.Now - startTime;
duration = timeSpan.TotalSeconds;
var error = "";
// 上传失败
@@ -6758,9 +6807,6 @@ Content-Type: image/jpeg
{
if (row.Index >= 0)
{
var endTime = DateTime.Now;
var timeSpan = endTime - startTime;
duration = timeSpan.TotalSeconds;
row.Cells["colOpResult"].Value = error + " " + duration.ParseToInt() + "秒";
}
}));
@@ -6801,6 +6847,14 @@ Content-Type: image/jpeg
string ApiUploadProduct(ShopLoginInfo shop, TemuDBProductSelect selectProd, DataGridViewRow row)
{
DataGridViewCell cell = row.Cells["colOpResult"];
Invoke(new Action(() =>
{
cell.Value = "正在初始化商品";
}));
// 模拟多线程一起上货
//Thread.Sleep(Randomx.GetId(500, 5000));
//return "{\"success\":true,\"goods_id\":" + 1000000 + ",\"status\":\"已上传\",\"msg\":\"上传成功\"}";
KJDDBProduct dbProd = selectProd.kjdDbProduct;
if (dbProd == null)
@@ -6833,24 +6887,23 @@ Content-Type: image/jpeg
prodInfo = JsonHelper.DeserializeJsonToObject<PDDProductInfo>(dbProd.product_json);
var pddApi = new PddApi(shop);
pddApi.Data["cat_id"] = prodInfo.detail.cat_id;
var carRuleGetRst = pddApi.PddGoodsCatRuleGet();
// 临时刷新token
//var rst1 = pddApi.PddPopAuthTokenCreate();
//满两件折扣,todo通过pdd.goods.cat.rule.get查询具体规则
//{"cat_rule_get_response":{"goods_properties_rule":{"input_max_spec_num":0,"properties":[{"is_sale":false,"is_important":false,"is_sku":false,"values":[{"vid":4643510,"value":"无品牌/无注册商标"},{"vid":1280848,"value":"画南头"},{"vid":30601,"value":"固竹匠"},{"vid":220778,"value":"浪漫喜事"},{"vid":334660,"value":"梦瑾"},{"vid":130470,"value":"朋意"},{"vid":12034,"value":"THEBEAST/野兽派"},{"vid":1942,"value":"Uchino/内野"},{"vid":34231,"value":"NITORI/宜得利家居"},{"vid":6439,"value":"Brother/兄弟"},{"vid":8553,"value":"Zara Home"},{"vid":8554,"value":"MUJI/无印良品"},{"vid":14223,"value":"VERSACE/范思哲"},{"vid":18534,"value":"Mtg"},{"vid":19991,"value":"SINGER/胜家"},{"vid":196848,"value":"Hoyo"},{"vid":224544,"value":"亚朵星球"},{"vid":280,"value":"KING SHORE/金号"},{"vid":327,"value":"SEMIR/森马"},{"vid":68,"value":"MERCURY/水星家纺"},{"vid":44617,"value":"LUOLAI/罗莱"},{"vid":386,"value":"Xiaomi/小米"},{"vid":394,"value":"Lock&Lock/乐扣乐扣"},{"vid":53109,"value":"CHRISTY"},{"vid":5702,"value":"东升"},{"vid":5727,"value":"DOHIA/多喜爱"},{"vid":561,"value":"Purcotton/全棉时代"},{"vid":6159,"value":"金蝉"},{"vid":6770,"value":"MENDALE/梦洁"},{"vid":8882,"value":"HLA/海澜之家"},{"vid":9570,"value":"MINISO/名创优品"},{"vid":119495,"value":"AUSTTBABY"},{"vid":119914,"value":"棉森"},{"vid":12031,"value":"大朴"},{"vid":128592,"value":"亿恩忆"},{"vid":12598,"value":"怡沁园"},{"vid":134564,"value":"茱莉亚"},{"vid":14220,"value":"JEANSWEST/真维斯"},{"vid":16898,"value":"奥帝罗"},{"vid":16900,"value":"德奇力"},{"vid":17523,"value":"Bravo/馨而乐"},{"vid":17529,"value":"Grace·orchid/洁丽雅·兰"},{"vid":165321,"value":"孩子王"},{"vid":17819,"value":"EverShine/永亮"},{"vid":172186,"value":"BULULOM/布鲁罗曼"},{"vid":173,"value":"南极人"},{"vid":192015,"value":"Mionsoo/棉上"},{"vid":192617,"value":"Lovhome/乐巢家居"},{"vid":193562,"value":"Tumei Home Collection/图美寝饰"},{"vid":195662,"value":"Jrb/嘉瑞宝"},{"vid":197759,"value":"Gafuhome"},{"vid":202708,"value":"LATEX SYSTEMS CO.,LTD."},{"vid":1746,"value":"梦雅莉"},{"vid":1747,"value":"虹原风尚"},{"vid":1748,"value":"LUOLANNI/罗兰妮"},{"vid":1749,"value":"梓晨"},{"vid":1752,"value":"LORiCA/骆易家"},{"vid":1769,"value":"BLISS/百丽丝"},{"vid":215899,"value":"竹月阁"},{"vid":216546,"value":"荣邦"},{"vid":200,"value":"GRACE/洁丽雅"},{"vid":1957,"value":"黄古林"},{"vid":245780,"value":"yesland雅熙莱帝"},{"vid":2105,"value":"SANLI/三利"},{"vid":2106,"value":"CARESEEN/康尔馨"},{"vid":262384,"value":"爱络"},{"vid":27838,"value":"ABS/爱彼此"},{"vid":275849,"value":"伊丝绮"},{"vid":280996,"value":"Qisilove/前世有约"},{"vid":281160,"value":"Ppw"},{"vid":252,"value":"BEJIROG/北极绒"},{"vid":283511,"value":"梦蝶莎"},{"vid":2675,"value":"芳华"},{"vid":32611,"value":"TY LIVE/田园生活"},{"vid":302922,"value":"一米"},{"vid":32853,"value":"温恋"},{"vid":32879,"value":"WS/伟殳家居"},{"vid":32881,"value":"港龙"},{"vid":32882,"value":"亚亨"},{"vid":273,"value":"Disney/迪士尼"},{"vid":33880,"value":"Aqara"},{"vid":294,"value":"洁玉"},{"vid":303,"value":"网易严选"},{"vid":3274,"value":"A-LIFE/最生活"},{"vid":369086,"value":"山花"},{"vid":373614,"value":"五洲"},{"vid":329,"value":"BOBDOG/巴布豆"},{"vid":382380,"value":"SouthLife/南方生活"},{"vid":330,"value":"Montagut/梦特娇"},{"vid":69,"value":"LOVO/乐蜗"},{"vid":3602,"value":"Curbblan/卡伴"},{"vid":3897,"value":"知梦人"},{"vid":45598,"value":"SAINTMARC/尚玛可"},{"vid":45746,"value":"SINOMAX/赛诺"},{"vid":45808,"value":"SOMERELLE/安睡宝"},{"vid":45938,"value":"SUNVIM/孚日"},{"vid":397,"value":"童泰"},{"vid":464223,"value":"Yuniku/优尼可"},{"vid":4602,"value":"Jago/佳奥"},{"vid":4657,"value":"四季帘华"},{"vid":517644,"value":"家顿"},{"vid":519506,"value":"MENBORY/梦宝莉"},{"vid":532306,"value":"MENDALE HOME"},{"vid":781538,"value":"4monster"},{"vid":5240,"value":"春天十字绣"},{"vid":5247,"value":"HD/惠多"},{"vid":65402,"value":"梦雯"},{"vid":842952,"value":"赛勒"},{"vid":846015,"value":"墨斗鱼"},{"vid":5832,"value":"8H"},{"vid":923181,"value":"大江(地垫)"},{"vid":950059,"value":"甄简良品"},{"vid":79195,"value":"伊佳仁"},{"vid":79198,"value":"雅熙莱帝"},{"vid":6958,"value":"轻生活"},{"vid":7347,"value":"TANGY/天意"},{"vid":7351,"value":"FREETEX"},{"vid":94190,"value":"冬阳"},{"vid":96868,"value":"硕木"},{"vid":97393,"value":"LOFTEX/亚光"},{"vid":97771,"value":"彩朵朵"},{"vid":9254,"value":"AiSleep/睡眠博士"},{"vid":9709,"value":"HD/华德"},{"vid":9780,"value":"欧意"},{"vid":9942,"value":"百思寒"},{"vid":107350,"value":"布蝶轩"},{"vid":108166,"value":"夕姿"},{"vid":12165,"value":"一朵"},{"vid":12549,"value":"金柒"},{"vid":1286,"value":"BONAS/宝娜斯"},{"vid":17569,"value":"恩兴"},{"vid":18231,Line truncated
// 主图
int cnt = 0;
string carousel_gallery = "";
foreach (var img in prodInfo.detail.galleries.Where(g => g.type ==1).ToList())
{
cnt++;
Invoke(new Action(() =>
{
cell.Value = "正在上传主图 " + cnt + "/" + prodInfo.detail.galleries.Where(g => g.type == 1).ToList().Count;
}));
string errMsg = "";
var imgBase64 = WXForms.ProductForms.WXDBProdUploadForm.GetImgBase64ForApi(out errMsg, img.url, false, false);
if (!string.IsNullOrEmpty(errMsg))
{
return errMsg;
return "主图初始化失败 " + errMsg;
}
var pddUpImgApi = new PddApi(shop);
@@ -6861,7 +6914,7 @@ Content-Type: image/jpeg
errMsg = BaseRegex.GetStringJson(ref pddUpImgApiRst, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = pddUpImgApiRst;
return errMsg;
return "主图上传失败 " + errMsg;
}
carousel_gallery += "\"" + BaseRegex.GetStringJson(ref pddUpImgApiRst, "image_url") + "\",";
}
@@ -6869,6 +6922,11 @@ Content-Type: image/jpeg
pddApi.Data["cat_id"] = prodInfo.detail.cat_id;
Invoke(new Action(() =>
{
cell.Value = "正在选取运费模板";
}));
// 运费模板
var pddAddressApi = new PddApi(shop);
pddAddressApi.Data["page"] = 1;
var pddAddressApiRst = pddAddressApi.PddGoodsLogisticsTemplateGet();
@@ -6877,7 +6935,7 @@ Content-Type: image/jpeg
var errMsg = BaseRegex.GetStringJson(ref pddAddressApiRst, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = pddAddressApiRst;
return errMsg;
return "运费模板获取失败 " + errMsg;
}
var template_id = BaseRegex.GetStringJson(ref pddAddressApiRst, "template_id");
if (template_id == null)
@@ -6886,18 +6944,25 @@ Content-Type: image/jpeg
}
pddApi.Data["cost_template_id"] = template_id;
pddApi.Data["country_id"] = 0;
pddApi.Data["country_id"] = 0; // 国内商品默认填0
//pddApi.Data["delivery_type"] = 1; // delivery_type INTEGER 非必填 发货方式。0:无物流发货;1:有物流发货。
// 详情图
cnt = 0;
string detail_gallery = "";
foreach (var img in prodInfo.detail.galleries.Where(g => g.type == 2).ToList())
{
cnt++;
Invoke(new Action(() =>
{
cell.Value = "正在上传详情图 " + cnt + "/" + prodInfo.detail.galleries.Where(g => g.type == 2).ToList().Count;
}));
string errMsg = "";
var imgBase64 = WXForms.ProductForms.WXDBProdUploadForm.GetImgBase64ForApi(out errMsg, img.url, false, false);
if (!string.IsNullOrEmpty(errMsg))
{
return errMsg;
return "详情图初始化失败 " + errMsg;
}
var pddUpImgApi = new PddApi(shop);
@@ -6908,7 +6973,7 @@ Content-Type: image/jpeg
errMsg = BaseRegex.GetStringJson(ref pddUpImgApiRst, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = pddUpImgApiRst;
return errMsg;
return "详情图上传失败 " + errMsg;
}
detail_gallery += "\"" + BaseRegex.GetStringJson(ref pddUpImgApiRst, "image_url") + "\",";
}
@@ -6918,8 +6983,118 @@ Content-Type: image/jpeg
pddApi.Data["goods_desc"] = prodInfo.detail.goods_desc;
pddApi.Data["goods_name"] = prodInfo.detail.goods_name;
//todo 非必填
pddApi.Data["goods_properties"] = "[]";
Invoke(new Action(() =>
{
cell.Value = "正在生成属性";
}));
// 获取类目属性模板
var pddApiCatRule = new PddApi(shop);
pddApiCatRule.Data["cat_id"] = prodInfo.detail.cat_id;
var catRuleGetRst = pddApiCatRule.PddGoodsCatRuleGet();
if (!catRuleGetRst.Contains("\"cat_rule_get_response\""))
{
var errMsg = BaseRegex.GetStringJson(ref catRuleGetRst, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = catRuleGetRst;
return "类目属性初始化失败 " + errMsg;
}
//{"cat_rule_get_response":{"goods_properties_rule":{"input_max_spec_num":0,"properties":[{"is_sale":false,"is_important":false,"is_sku":false,"values":[{"vid":4643510,"value":"无品牌/无注册商标"},{"vid":1280848,"value":"画南头"},{"vid":30601,"value":"固竹匠"},{"vid":220778,"value":"浪漫喜事"},{"vid":334660,"value":"梦瑾"},{"vid":130470,"value":"朋意"},{"vid":12034,"value":"THEBEAST/野兽派"},{"vid":1942,"value":"Uchino/内野"},{"vid":34231,"value":"NITORI/宜得利家居"},{"vid":6439,"value":"Brother/兄弟"},{"vid":8553,"value":"Zara Home"},{"vid":8554,"value":"MUJI/无印良品"},{"vid":14223,"value":"VERSACE/范思哲"},{"vid":18534,"value":"Mtg"},{"vid":19991,"value":"SINGER/胜家"},{"vid":196848,"value":"Hoyo"},{"vid":224544,"value":"亚朵星球"},{"vid":280,"value":"KING SHORE/金号"},{"vid":327,"value":"SEMIR/森马"},{"vid":68,"value":"MERCURY/水星家纺"},{"vid":44617,"value":"LUOLAI/罗莱"},{"vid":386,"value":"Xiaomi/小米"},{"vid":394,"value":"Lock&Lock/乐扣乐扣"},{"vid":53109,"value":"CHRISTY"},{"vid":5702,"value":"东升"},{"vid":5727,"value":"DOHIA/多喜爱"},{"vid":561,"value":"Purcotton/全棉时代"},{"vid":6159,"value":"金蝉"},{"vid":6770,"value":"MENDALE/梦洁"},{"vid":8882,"value":"HLA/海澜之家"},{"vid":9570,"value":"MINISO/名创优品"},{"vid":119495,"value":"AUSTTBABY"},{"vid":119914,"value":"棉森"},{"vid":12031,"value":"大朴"},{"vid":128592,"value":"亿恩忆"},{"vid":12598,"value":"怡沁园"},{"vid":134564,"value":"茱莉亚"},{"vid":14220,"value":"JEANSWEST/真维斯"},{"vid":16898,"value":"奥帝罗"},{"vid":16900,"value":"德奇力"},{"vid":17523,"value":"Bravo/馨而乐"},{"vid":17529,"value":"Grace·orchid/洁丽雅·兰"},{"vid":165321,"value":"孩子王"},{"vid":17819,"value":"EverShine/永亮"},{"vid":172186,"value":"BULULOM/布鲁罗曼"},{"vid":173,"value":"南极人"},{"vid":192015,"value":"Mionsoo/棉上"},{"vid":192617,"value":"Lovhome/乐巢家居"},{"vid":193562,"value":"Tumei Home Collection/图美寝饰"},{"vid":195662,"value":"Jrb/嘉瑞宝"},{"vid":197759,"value":"Gafuhome"},{"vid":202708,"value":"LATEX SYSTEMS CO.,LTD."},{"vid":1746,"value":"梦雅莉"},{"vid":1747,"value":"虹原风尚"},{"vid":1748,"value":"LUOLANNI/罗兰妮"},{"vid":1749,"value":"梓晨"},{"vid":1752,"value":"LORiCA/骆易家"},{"vid":1769,"value":"BLISS/百丽丝"},{"vid":215899,"value":"竹月阁"},{"vid":216546,"value":"荣邦"},{"vid":200,"value":"GRACE/洁丽雅"},{"vid":1957,"value":"黄古林"},{"vid":245780,"value":"yesland雅熙莱帝"},{"vid":2105,"value":"SANLI/三利"},{"vid":2106,"value":"CARESEEN/康尔馨"},{"vid":262384,"value":"爱络"},{"vid":27838,"value":"ABS/爱彼此"},{"vid":275849,"value":"伊丝绮"},{"vid":280996,"value":"Qisilove/前世有约"},{"vid":281160,"value":"Ppw"},{"vid":252,"value":"BEJIROG/北极绒"},{"vid":283511,"value":"梦蝶莎"},{"vid":2675,"value":"芳华"},{"vid":32611,"value":"TY LIVE/田园生活"},{"vid":302922,"value":"一米"},{"vid":32853,"value":"温恋"},{"vid":32879,"value":"WS/伟殳家居"},{"vid":32881,"value":"港龙"},{"vid":32882,"value":"亚亨"},{"vid":273,"value":"Disney/迪士尼"},{"vid":33880,"value":"Aqara"},{"vid":294,"value":"洁玉"},{"vid":303,"value":"网易严选"},{"vid":3274,"value":"A-LIFE/最生活"},{"vid":369086,"value":"山花"},{"vid":373614,"value":"五洲"},{"vid":329,"value":"BOBDOG/巴布豆"},{"vid":382380,"value":"SouthLife/南方生活"},{"vid":330,"value":"Montagut/梦特娇"},{"vid":69,"value":"LOVO/乐蜗"},{"vid":3602,"value":"Curbblan/卡伴"},{"vid":3897,"value":"知梦人"},{"vid":45598,"value":"SAINTMARC/尚玛可"},{"vid":45746,"value":"SINOMAX/赛诺"},{"vid":45808,"value":"SOMERELLE/安睡宝"},{"vid":45938,"value":"SUNVIM/孚日"},{"vid":397,"value":"童泰"},{"vid":464223,"value":"Yuniku/优尼可"},{"vid":4602,"value":"Jago/佳奥"},{"vid":4657,"value":"四季帘华"},{"vid":517644,"value":"家顿"},{"vid":519506,"value":"MENBORY/梦宝莉"},{"vid":532306,"value":"MENDALE HOME"},{"vid":781538,"value":"4monster"},{"vid":5240,"value":"春天十字绣"},{"vid":5247,"value":"HD/惠多"},{"vid":65402,"value":"梦雯"},{"vid":842952,"value":"赛勒"},{"vid":846015,"value":"墨斗鱼"},{"vid":5832,"value":"8H"},{"vid":923181,"value":"大江(地垫)"},{"vid":950059,"value":"甄简良品"},{"vid":79195,"value":"伊佳仁"},{"vid":79198,"value":"雅熙莱帝"},{"vid":6958,"value":"轻生活"},{"vid":7347,"value":"TANGY/天意"},{"vid":7351,"value":"FREETEX"},{"vid":94190,"value":"冬阳"},{"vid":96868,"value":"硕木"},{"vid":97393,"value":"LOFTEX/亚光"},{"vid":97771,"value":"彩朵朵"},{"vid":9254,"value":"AiSleep/睡眠博士"},{"vid":9709,"value":"HD/华德"},{"vid":9780,"value":"欧意"},{"vid":9942,"value":"百思寒"},{"vid":107350,"value":"布蝶轩"},{"vid":108166,"value":"夕姿"},{"vid":12165,"value":"一朵"},{"vid":12549,"value":"金柒"},{"vid":1286,"value":"BONAS/宝娜斯"},{"vid":17569,"value":"恩兴"},{"vid":18231,Line truncated
var catTemplateInfoObj = JsonHelper.JObjectParse(catRuleGetRst)["cat_rule_get_response"]["goods_properties_rule"];
var catTemplateInfoStr = JsonHelper.SerializeObject(catTemplateInfoObj);
var apiCatRuleInfo = JsonHelper.DeserializeJsonToObject<ApiPddGoodsCatRuleInfo>(catTemplateInfoStr);
List<ApiPddProperty> propParamLst = new List<ApiPddProperty>();
foreach (var propInfo in prodInfo.property.goods_properties)
{
var propApiInfo = apiCatRuleInfo.properties.FirstOrDefault(p => p.name == propInfo.name || p.ref_pid == propInfo.ref_pid);
if (propApiInfo != null)
{
try
{
var propParam = JsonHelper.DeserializeJsonToObject<ApiPddProperty>(JsonHelper.SerializeObject(propApiInfo));
ApiPddPropertyValue value = null;
if (propParam.name == "品牌")
{
if (propInfo.values.FirstOrDefault()?.value == "其他家")
value = propParam.values.FirstOrDefault(v => v.value == "无品牌/无注册商标");
else
{
//value = propParam.values.FirstOrDefault(v => v.value == propInfo.values.FirstOrDefault().value);
// 统一使用无品牌
value = propParam.values.FirstOrDefault(v => v.value == "无品牌/无注册商标");
}
}
else
{
if (propParam.values == null && propInfo.values.FirstOrDefault()?.value != null)
value = new ApiPddPropertyValue() { value = propInfo.values.FirstOrDefault()?.value, vid = 0 };
else
value = propParam.values?.FirstOrDefault(v => v.value == propInfo.values.FirstOrDefault()?.value);
if (value == null)
value = propParam.values?.FirstOrDefault(v => v.value == "其他");
}
if (value != null)
{
propParam.values = new List<ApiPddPropertyValue>() { value };
if (!string.IsNullOrEmpty(propInfo.values.FirstOrDefault()?.unit))
{
var unit = propParam.value_unit.FirstOrDefault(v => v == propInfo.values.FirstOrDefault().unit);
if (!string.IsNullOrEmpty(unit))
propParam.value_unit = new List<string>() { unit };
}
propParamLst.Add(propParam);
}
}
catch (Exception ex)
{
return "类目属性转换失败 " + ex.Message;
}
}
}
foreach (var propApiInfo in apiCatRuleInfo.properties)
{
if (propApiInfo.required == true && !propParamLst.Any(p => p.ref_pid == propApiInfo.ref_pid))
{
var contentOther = propApiInfo.values?.FirstOrDefault(c => c.value == "其他");
if (contentOther != null)
{
//var prop = new goods_property_param()
var propParam = JsonHelper.DeserializeJsonToObject<ApiPddProperty>(JsonHelper.SerializeObject(propApiInfo));
propParam.values = new List<ApiPddPropertyValue>() { contentOther };
propParamLst.Add(propParam);
}
else if (propApiInfo.name == "成分含量")
{
var contentValue = propApiInfo.values?.FirstOrDefault(v => v.value.Contains("以下"));
if (contentValue != null)
{
var propParam = JsonHelper.DeserializeJsonToObject<ApiPddProperty>(JsonHelper.SerializeObject(propApiInfo));
propParam.values = new List<ApiPddPropertyValue>() { contentOther };
propParamLst.Add(propParam);
}
}
else if (propApiInfo.required_rule_type == 1 && propApiInfo.values?.Count == 1) // 二级关联属性
{
var propParam = JsonHelper.DeserializeJsonToObject<ApiPddProperty>(JsonHelper.SerializeObject(propApiInfo));
propParamLst.Add(propParam);
}
}
}
string goods_properties = "";
foreach (var pp in propParamLst)
{
var pv = pp.values.FirstOrDefault();
var value_unit = pp.value_unit.FirstOrDefault().ParseToString();
var str = "{\"ref_pid\":" + pp.ref_pid + ",\"vid\":" + pv.vid + ",\"value\":\"" + pv.value + "\",\"value_unit\":\"" + value_unit + "\"},";
string temp = BaseRegex.GetMatchRegexString(ref str, @"(\d{2,4}-\d{1,2}-\d{1,2})"); // 如果有时间替换成最新的
if (!string.IsNullOrEmpty(temp))
str = "{\"ref_pid\":" + pp.ref_pid + ",\"vid\":" + pv.vid + ",\"value\":\"" + DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + "\",\"value_unit\":\"" + value_unit + "\"},";
goods_properties += str;
}
pddApi.Data["goods_properties"] = "[" + goods_properties.Trim(',') + "]";
pddApi.Data["goods_type"] = 1;
if (!string.IsNullOrEmpty(prodInfo.detail.image_url))
@@ -6937,10 +7112,7 @@ Content-Type: image/jpeg
#region 厂商直采获取推单运费模板,计算运费加价。
Invoke(new Action(() =>
{
if (cell != null)
{
cell.Value = "正在选取运费模板";
}
//cell.Value = "正在选取运费模板";
}));
var shippingTemplateJson = "";
@@ -7049,41 +7221,47 @@ Content-Type: image/jpeg
var skuInfo = JsonHelper.DeserializeJsonToObject<sku_item>(JsonHelper.SerializeObject(sku));
skuInfo.is_onsale = skuInfo.is_onsale != null ? skuInfo.is_onsale : 1;
skuInfo.limit_quantity = 999; // 只入参999
skuInfo.multi_price = (sku.multi_price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt();
skuInfo.price = (sku.price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt();
//厂商直采的上家缺货则保持缺货。
// 厂商直采的上家缺货则保持缺货。
if (skuInfo.quantity != 0)
skuInfo.quantity = txtStockNum.Text.Trim().ParseToInt();
skuInfo.multi_price += shipPrice;
skuInfo.price += shipPrice;
var new_multi_price = sku.multi_price + (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
skuInfo.multi_price = (new_multi_price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt();
//skuInfo.price = (sku.price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt();
if (isAddMorePriceFirst) // 先加后乘
skuInfo.multi_price = ((sku.multi_price + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100) * this.txtAddTimes.Text.Trim().ParseToDecimal()).ParseToInt();
skuInfo.multi_price = ((new_multi_price + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100) * this.txtAddTimes.Text.Trim().ParseToDecimal()).ParseToInt();
skuInfo.price = skuInfo.multi_price + Math.Max(100, this.txtSinglePriceAdd.Text.Trim().ParseToDecimal() * 100).ParseToInt();
//阶梯式加价,如果命中则按阶梯式加价进行
// 阶梯式加价,如果命中则按阶梯式加价进行
if (isStepAddPrice)
{
foreach (var addPrice in lstAddPriceRule)
{
if (sku.multi_price > addPrice.MoreThanPrice * 100 && sku.multi_price <= addPrice.LessThanPrice * 100)
if (new_multi_price > addPrice.MoreThanPrice * 100 && new_multi_price <= addPrice.LessThanPrice * 100)
{
if (isAddMorePriceFirst) // 先加后乘
skuInfo.multi_price = ((sku.multi_price + addPrice.AddMorePrice * 100) * addPrice.AddPriceTimes).ParseToInt();
skuInfo.multi_price = ((new_multi_price + addPrice.AddMorePrice * 100) * addPrice.AddPriceTimes).ParseToInt();
else
skuInfo.multi_price = (sku.multi_price * addPrice.AddPriceTimes + addPrice.AddMorePrice * 100).ParseToInt();
skuInfo.multi_price = (new_multi_price * addPrice.AddPriceTimes + addPrice.AddMorePrice * 100).ParseToInt();
skuInfo.price = skuInfo.multi_price + Math.Max(100, addPrice.SinglePriceAdd * 100).ParseToInt(); ;
break;
}
}
}
addPriceSkuInfoLst.Add(skuInfo);
// 聚水潭商品 加邮费×倍率 放前面
//skuInfo.multi_price += (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
//skuInfo.price += (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
if (marketPrice < skuInfo.price + 1000)
{
marketPrice = skuInfo.price.ParseToInt() + 1000;
pddApi.Data["market_price"] = marketPrice;
}
addPriceSkuInfoLst.Add(skuInfo);
}
#endregion
@@ -7097,7 +7275,7 @@ Content-Type: image/jpeg
var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecGetApiRst, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = PddGoodsSpecGetApiRst;
return errMsg;
return "初始化Sku属性失败 " + errMsg;
}
Dictionary<long, string> specNameDic = new Dictionary<long, string>();
@@ -7136,16 +7314,22 @@ Content-Type: image/jpeg
var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecIdGetApiRst, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = PddGoodsSpecIdGetApiRst;
return errMsg;
return "Sku属性生成失败 " + errMsg;
}
specInfo.spec_id = BaseRegex.GetLongJson(ref PddGoodsSpecIdGetApiRst, "spec_id");
}
}
}
Dictionary<string, string> skuImgDic = new Dictionary<string, string>();
// 拼接sku,计算最高价格和最低价格
for (int i = 0; i < addPriceSkuInfoLst.Count; i++)
{
Invoke(new Action(() =>
{
cell.Value = "正在生成Sku " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
}));
string spec = "";
for (int j = 0; j < addPriceSkuInfoLst[i].spec.Count; j++)
{
@@ -7153,38 +7337,48 @@ Content-Type: image/jpeg
}
spec = spec.Trim(',');
string errMsg = "";
var imgBase64 = WXForms.ProductForms.WXDBProdUploadForm.GetImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url, false, false);
if (!string.IsNullOrEmpty(errMsg))
string thumb_url = "";
if (skuImgDic.ContainsKey(addPriceSkuInfoLst[i].thumb_url))
{
return errMsg;
thumb_url = skuImgDic[addPriceSkuInfoLst[i].thumb_url];
}
else
{
string errMsg = "";
var imgBase64 = WXForms.ProductForms.WXDBProdUploadForm.GetImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url, false, false);
if (!string.IsNullOrEmpty(errMsg))
{
return "初始化Sku图片错误 " + errMsg;
}
var pddUpImgApi = new PddApi(shop);
pddUpImgApi.Data["image"] = "data:image/jpeg;base64," + imgBase64;
var pddUpImgApiRst = pddUpImgApi.PddGoodsImageUpload();
if (!pddUpImgApiRst.Contains("\"goods_image_upload_response\""))
{
errMsg = BaseRegex.GetStringJson(ref pddUpImgApiRst, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = pddUpImgApiRst;
return "生成Sku图片错误 " + errMsg;
}
thumb_url = BaseRegex.GetStringJson(ref pddUpImgApiRst, "image_url");
skuImgDic[addPriceSkuInfoLst[i].thumb_url] = thumb_url;
}
var pddUpImgApi = new PddApi(shop);
pddUpImgApi.Data["image"] = "data:image/jpeg;base64," + imgBase64;
var pddUpImgApiRst = pddUpImgApi.PddGoodsImageUpload();
if (!pddUpImgApiRst.Contains("\"goods_image_upload_response\""))
{
errMsg = BaseRegex.GetStringJson(ref pddUpImgApiRst, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = pddUpImgApiRst;
return errMsg;
}
addPriceSkuInfoLst[i].thumb_url = BaseRegex.GetStringJson(ref pddUpImgApiRst, "image_url");
int weight = addPriceSkuInfoLst[i].weight.IsNullOrZero() ? 1000 : addPriceSkuInfoLst[i].weight.ParseToInt();
skuApiString += ",{\"is_onsale\":" + addPriceSkuInfoLst[i].is_onsale + ",\"limit_quantity\":" + addPriceSkuInfoLst[i].limit_quantity +
",\"price\":\"" + addPriceSkuInfoLst[i].price + "\",\"weight\":1000,\"multi_price\":\"" + addPriceSkuInfoLst[i].multi_price +
"\",\"thumb_url\":\"" + addPriceSkuInfoLst[i].thumb_url + "\",\"out_sku_sn\":\"" + addPriceSkuInfoLst[i].out_sku_sn +
",\"price\":\"" + addPriceSkuInfoLst[i].price + "\",\"weight\":" + weight + ",\"multi_price\":\"" + addPriceSkuInfoLst[i].multi_price +
"\",\"thumb_url\":\"" + thumb_url + "\",\"out_sku_sn\":\"" + addPriceSkuInfoLst[i].out_sku_sn +
"\",\"quantity\":" + addPriceSkuInfoLst[i].quantity + ",\"spec_id_list\":\"[" + spec + "]\"}";
if (addPriceSkuInfoLst[i].multi_price > maxPrice)
maxPrice = addPriceSkuInfoLst[i].multi_price;
if (addPriceSkuInfoLst[i].multi_price < minPrice)
minPrice = addPriceSkuInfoLst[i].multi_price;
}
pddApi.Data.Remove("goods_properties");
pddApi.Data["sku_list"] = "[" + skuApiString.Trim(',') + "]";
//满两件折扣,todo通过pdd.goods.cat.rule.get查询具体规则
//满两件折扣,todo可通过pdd.goods.cat.rule.get查询具体规则
pddApi.Data["two_pieces_discount"] = 99;
int retryTimes = 20;
@@ -7196,6 +7390,13 @@ Content-Type: image/jpeg
pddApi.Data["is_refundable"] = true;
goto retry;
}
if (!upLoadRst.Contains("goods_add_response"))
{
var errMsg = BaseRegex.GetStringJson(ref upLoadRst, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = upLoadRst;
return "商品提交失败 " + errMsg;
}
var goods_id = BaseRegex.GetStringJson(ref upLoadRst, "goods_id");
return "{\"success\":true,\"goods_id\":" + goods_id + ",\"status\":\"已上传\",\"msg\":\"上传成功\"}";
@@ -7514,6 +7715,64 @@ Content-Type: image/jpeg
{
WaitUploadTime = txtWaitSeconds.Text.ParseToInt();
}
private void btnRefreshApi_Click(object sender, EventArgs e)
{
RefreshApi(true);
}
void RefreshApi(bool isForceRefresh = false)
{
pbShopLoading.Visible = true;
// 选中的店铺Id
Task.Run(() =>
{
while (!StartUp.IsShopInit)
{
Thread.Sleep(500);
}
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
foreach (var shop in GlobalConfig.ShopLoginList)
{
Invoke(new Action(() =>
{
shop.Message = "";
BindShop(shop, selectIds);
}));
PddApiHelper.RefreshApi(shop, isForceRefresh);
Invoke(new Action(() =>
{
shop.Message = "授权更新完成";
BindShop(shop, selectIds);
}));
}
List<List<AuthInfo>> lsts = GlobalConfig.ShopLoginList.Select(s => s.ApiAuthInfoList).ToList();
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_shop_api_auth_info_lists", lsts);
Invoke(new Action(() => { pbShopLoading.Visible = false; }));
});
}
private void btnProdDb_Click(object sender, EventArgs e)
{
WXUserProdListForm.Instance.lstTemuDBProductSelect = this.lstTemuDBProductSelect;
WXUserProdListForm.Instance.cmbSourceType.Items.Clear();
WXUserProdListForm.Instance.cmbSourceType.Items.AddRange(this.cmbSourceType.Items.Cast<Object>().ToArray());
WXUserProdListForm.Instance.SaveComplete -= dbProdList_SaveComplete;
WXUserProdListForm.Instance.SaveComplete += dbProdList_SaveComplete;
WXUserProdListForm.Instance.Show();
WXUserProdListForm.Instance.BringToFront();
}
private void dbProdList_SaveComplete(object obj)
{
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", this.lstTemuDBProductSelect);
Invoke(new Action(() =>
{
lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
}));
}
}
public class AddPriceRule
@@ -7546,6 +7805,7 @@ Content-Type: image/jpeg
/// 上货库存量设置
/// </summary>
public int StockNum { get; set; } = 0;
public decimal AddShippingFeeTimes { get; set; } = 1;
}
public class PddUploadRule
@@ -135,6 +135,9 @@
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colApiStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCanUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>