研究微信免审上架,其他一些功能优化
This commit is contained in:
1 parent
42be98616b
commit
6d7b9d7b56
13 files changed
+812
-209
No files matched your search
+120
-59
@@ -32,14 +32,17 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
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 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.label18 = new System.Windows.Forms.Label();
|
||||
this.txtPreDays = new System.Windows.Forms.TextBox();
|
||||
this.chkPreSale = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.chkSkipUploaded = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.chkSameSpecPrice = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
@@ -47,6 +50,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.txtReplaceText = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.chkUpDraft = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.chkHighestPriceSku = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.txtWaitSeconds = new System.Windows.Forms.TextBox();
|
||||
@@ -60,7 +64,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
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.ucAddPrice2 = new TemuKJD.PDDForms.ProductSelectForms.UcAddPrice();
|
||||
this.lblNewAddPrice = new System.Windows.Forms.Label();
|
||||
this.txtAddMorePrice = new System.Windows.Forms.TextBox();
|
||||
this.txtAddTimes = new System.Windows.Forms.TextBox();
|
||||
@@ -107,11 +111,11 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.colUploadCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.chkTestNoAuditUpload = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.并发上传 = new DevComponents.DotNetBar.PanelEx();
|
||||
this.pbLoading = new System.Windows.Forms.PictureBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.txtSinglePriceAdd = new System.Windows.Forms.TextBox();
|
||||
this.chkUpDraft = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -194,6 +198,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
|
||||
this.ucGroupBoxEx2.Controls.Add(this.label18);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.txtPreDays);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.chkPreSale);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.chkSkipUploaded);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.chkSameSpecPrice);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.label5);
|
||||
@@ -228,6 +235,37 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.ucGroupBoxEx2.TabStop = false;
|
||||
this.ucGroupBoxEx2.Text = "商品上传";
|
||||
//
|
||||
// label18
|
||||
//
|
||||
this.label18.AutoSize = true;
|
||||
this.label18.Location = new System.Drawing.Point(662, 120);
|
||||
this.label18.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
|
||||
this.label18.Name = "label18";
|
||||
this.label18.Size = new System.Drawing.Size(54, 17);
|
||||
this.label18.TabIndex = 800;
|
||||
this.label18.Text = "(3-45天)";
|
||||
//
|
||||
// txtPreDays
|
||||
//
|
||||
this.txtPreDays.Location = new System.Drawing.Point(629, 117);
|
||||
this.txtPreDays.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||
this.txtPreDays.Name = "txtPreDays";
|
||||
this.txtPreDays.Size = new System.Drawing.Size(33, 23);
|
||||
this.txtPreDays.TabIndex = 790;
|
||||
this.txtPreDays.Text = "5";
|
||||
this.txtPreDays.TextChanged += new System.EventHandler(this.txtPreDays_TextChanged);
|
||||
//
|
||||
// chkPreSale
|
||||
//
|
||||
this.chkPreSale.AutoSize = true;
|
||||
this.chkPreSale.Location = new System.Drawing.Point(537, 118);
|
||||
this.chkPreSale.Name = "chkPreSale";
|
||||
this.chkPreSale.Size = new System.Drawing.Size(99, 21);
|
||||
this.chkPreSale.TabIndex = 789;
|
||||
this.chkPreSale.Text = "设置预售天数";
|
||||
this.chkPreSale.UseVisualStyleBackColor = true;
|
||||
this.chkPreSale.CheckedChanged += new System.EventHandler(this.chkPreSale_CheckedChanged);
|
||||
//
|
||||
// chkSkipUploaded
|
||||
//
|
||||
this.chkSkipUploaded.AutoSize = true;
|
||||
@@ -239,6 +277,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.chkSkipUploaded.TabIndex = 755;
|
||||
this.chkSkipUploaded.Text = "跳过店铺已上货商品";
|
||||
this.chkSkipUploaded.UseVisualStyleBackColor = true;
|
||||
this.chkSkipUploaded.CheckedChanged += new System.EventHandler(this.chkSkipUploaded_CheckedChanged);
|
||||
//
|
||||
// chkSameSpecPrice
|
||||
//
|
||||
@@ -251,6 +290,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.chkSameSpecPrice.TabIndex = 745;
|
||||
this.chkSameSpecPrice.Text = "颜色规格同价";
|
||||
this.chkSameSpecPrice.UseVisualStyleBackColor = true;
|
||||
this.chkSameSpecPrice.CheckedChanged += new System.EventHandler(this.chkSameSpecPrice_CheckedChanged);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
@@ -270,6 +310,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.txtMinPrice.Size = new System.Drawing.Size(33, 23);
|
||||
this.txtMinPrice.TabIndex = 743;
|
||||
this.txtMinPrice.Text = "10";
|
||||
this.txtMinPrice.TextChanged += new System.EventHandler(this.txtMinPrice_TextChanged);
|
||||
//
|
||||
// label8
|
||||
//
|
||||
@@ -289,6 +330,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.txtReplaceText.Size = new System.Drawing.Size(285, 23);
|
||||
this.txtReplaceText.TabIndex = 740;
|
||||
this.txtReplaceText.Text = "真丝,蚕丝,香云纱,羊绒,羊毛,羊羔绒,羊羔毛,羽绒,皮草";
|
||||
this.txtReplaceText.TextChanged += new System.EventHandler(this.txtReplaceText_TextChanged);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
@@ -300,6 +342,17 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.label3.TabIndex = 741;
|
||||
this.label3.Text = "移除标题介绍中的词语:";
|
||||
//
|
||||
// chkUpDraft
|
||||
//
|
||||
this.chkUpDraft.AutoSize = true;
|
||||
this.chkUpDraft.Location = new System.Drawing.Point(678, 91);
|
||||
this.chkUpDraft.Name = "chkUpDraft";
|
||||
this.chkUpDraft.Size = new System.Drawing.Size(99, 21);
|
||||
this.chkUpDraft.TabIndex = 769;
|
||||
this.chkUpDraft.Text = "上传到草稿箱";
|
||||
this.chkUpDraft.UseVisualStyleBackColor = true;
|
||||
this.chkUpDraft.CheckedChanged += new System.EventHandler(this.chkUpDraft_CheckedChanged);
|
||||
//
|
||||
// chkHighestPriceSku
|
||||
//
|
||||
this.chkHighestPriceSku.AutoSize = true;
|
||||
@@ -311,6 +364,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.chkHighestPriceSku.TabIndex = 739;
|
||||
this.chkHighestPriceSku.Text = "只保留最高价sku";
|
||||
this.chkHighestPriceSku.UseVisualStyleBackColor = true;
|
||||
this.chkHighestPriceSku.CheckedChanged += new System.EventHandler(this.chkHighestPriceSku_CheckedChanged);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
@@ -332,6 +386,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.txtWaitSeconds.Size = new System.Drawing.Size(32, 23);
|
||||
this.txtWaitSeconds.TabIndex = 728;
|
||||
this.txtWaitSeconds.Text = "10";
|
||||
this.txtWaitSeconds.TextChanged += new System.EventHandler(this.txtWaitSeconds_TextChanged);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
@@ -459,7 +514,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.fPnlPriceRule.AutoSize = true;
|
||||
this.fPnlPriceRule.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.fPnlPriceRule.Controls.Add(this.ucAddPrice1);
|
||||
this.fPnlPriceRule.Controls.Add(this.ucAddPrice3);
|
||||
this.fPnlPriceRule.Controls.Add(this.ucAddPrice2);
|
||||
this.fPnlPriceRule.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.fPnlPriceRule.Location = new System.Drawing.Point(0, 0);
|
||||
this.fPnlPriceRule.Name = "fPnlPriceRule";
|
||||
@@ -503,42 +558,42 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.ucAddPrice1.Size = new System.Drawing.Size(420, 23);
|
||||
this.ucAddPrice1.TabIndex = 12;
|
||||
//
|
||||
// ucAddPrice3
|
||||
// ucAddPrice2
|
||||
//
|
||||
this.ucAddPrice3.AutoSize = true;
|
||||
this.ucAddPrice3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.ucAddPrice3.isShowMax = true;
|
||||
this.ucAddPrice3.isShowMin = true;
|
||||
this.ucAddPrice3.Location = new System.Drawing.Point(3, 32);
|
||||
this.ucAddPrice3.MinimumSize = new System.Drawing.Size(0, 20);
|
||||
this.ucAddPrice3.Name = "ucAddPrice3";
|
||||
this.ucAddPrice3.PriceAddMore = new decimal(new int[] {
|
||||
this.ucAddPrice2.AutoSize = true;
|
||||
this.ucAddPrice2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.ucAddPrice2.isShowMax = true;
|
||||
this.ucAddPrice2.isShowMin = true;
|
||||
this.ucAddPrice2.Location = new System.Drawing.Point(3, 32);
|
||||
this.ucAddPrice2.MinimumSize = new System.Drawing.Size(0, 20);
|
||||
this.ucAddPrice2.Name = "ucAddPrice2";
|
||||
this.ucAddPrice2.PriceAddMore = new decimal(new int[] {
|
||||
50,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.ucAddPrice3.PriceAddTimes = new decimal(new int[] {
|
||||
this.ucAddPrice2.PriceAddTimes = new decimal(new int[] {
|
||||
20,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.ucAddPrice3.PriceEnd = new decimal(new int[] {
|
||||
this.ucAddPrice2.PriceEnd = new decimal(new int[] {
|
||||
9990,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.ucAddPrice3.PriceStart = new decimal(new int[] {
|
||||
this.ucAddPrice2.PriceStart = new decimal(new int[] {
|
||||
20,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.ucAddPrice3.SinglePriceAdd = new decimal(new int[] {
|
||||
this.ucAddPrice2.SinglePriceAdd = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.ucAddPrice3.Size = new System.Drawing.Size(420, 23);
|
||||
this.ucAddPrice3.TabIndex = 13;
|
||||
this.ucAddPrice2.Size = new System.Drawing.Size(420, 23);
|
||||
this.ucAddPrice2.TabIndex = 13;
|
||||
//
|
||||
// lblNewAddPrice
|
||||
//
|
||||
@@ -1007,6 +1062,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.chkTestNoAuditUpload);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.并发上传);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.pbLoading);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.label11);
|
||||
@@ -1021,19 +1077,19 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
this.dgvShop.AllowUserToAddRows = false;
|
||||
this.dgvShop.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle13.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13;
|
||||
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)))));
|
||||
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;
|
||||
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,
|
||||
@@ -1146,6 +1202,17 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.colMessage.Name = "colMessage";
|
||||
this.colMessage.ReadOnly = true;
|
||||
//
|
||||
// chkTestNoAuditUpload
|
||||
//
|
||||
this.chkTestNoAuditUpload.AutoSize = true;
|
||||
this.chkTestNoAuditUpload.Location = new System.Drawing.Point(964, 32);
|
||||
this.chkTestNoAuditUpload.Name = "chkTestNoAuditUpload";
|
||||
this.chkTestNoAuditUpload.Size = new System.Drawing.Size(123, 21);
|
||||
this.chkTestNoAuditUpload.TabIndex = 779;
|
||||
this.chkTestNoAuditUpload.Text = "测试面审提交商品";
|
||||
this.chkTestNoAuditUpload.UseVisualStyleBackColor = true;
|
||||
this.chkTestNoAuditUpload.Visible = false;
|
||||
//
|
||||
// 并发上传
|
||||
//
|
||||
this.并发上传.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -1208,33 +1275,23 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.txtSinglePriceAdd.Visible = false;
|
||||
this.txtSinglePriceAdd.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged);
|
||||
//
|
||||
// chkUpDraft
|
||||
//
|
||||
this.chkUpDraft.AutoSize = true;
|
||||
this.chkUpDraft.Location = new System.Drawing.Point(678, 91);
|
||||
this.chkUpDraft.Name = "chkUpDraft";
|
||||
this.chkUpDraft.Size = new System.Drawing.Size(99, 21);
|
||||
this.chkUpDraft.TabIndex = 769;
|
||||
this.chkUpDraft.Text = "上传到草稿箱";
|
||||
this.chkUpDraft.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// dgvSelectProduct
|
||||
//
|
||||
this.dgvSelectProduct.AllowUserToAddRows = false;
|
||||
this.dgvSelectProduct.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle15.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle15;
|
||||
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)))));
|
||||
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;
|
||||
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,
|
||||
@@ -1294,8 +1351,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// colSupplierName
|
||||
//
|
||||
dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle17;
|
||||
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle11;
|
||||
this.colSupplierName.Frozen = true;
|
||||
this.colSupplierName.HeaderText = "店铺名称";
|
||||
this.colSupplierName.Name = "colSupplierName";
|
||||
@@ -1373,8 +1430,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// colProductName
|
||||
//
|
||||
dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductName.DefaultCellStyle = dataGridViewCellStyle18;
|
||||
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductName.DefaultCellStyle = dataGridViewCellStyle12;
|
||||
this.colProductName.HeaderText = "商品标题";
|
||||
this.colProductName.Name = "colProductName";
|
||||
this.colProductName.ReadOnly = true;
|
||||
@@ -1620,7 +1677,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
private UserComponent.UcCheckBox chkAddMorePriceFirst;
|
||||
private System.Windows.Forms.FlowLayoutPanel fPnlPriceRule;
|
||||
private UcAddPrice ucAddPrice1;
|
||||
private UcAddPrice ucAddPrice3;
|
||||
private UcAddPrice ucAddPrice2;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private DevComponents.DotNetBar.PanelEx btnClearFilter;
|
||||
private System.Windows.Forms.TextBox txtExtCodeFilter;
|
||||
@@ -1687,5 +1744,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
private UserComponent.UcCheckBox chkUpDraft;
|
||||
private System.Windows.Forms.ComboBox cmbSpProdType;
|
||||
private System.Windows.Forms.Label label17;
|
||||
private UserComponent.UcCheckBox chkTestNoAuditUpload;
|
||||
private System.Windows.Forms.TextBox txtPreDays;
|
||||
private UserComponent.UcCheckBox chkPreSale;
|
||||
private System.Windows.Forms.Label label18;
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,6 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
public bool IsLoadComplate { get; set; } = false;
|
||||
|
||||
bool isInit = false;
|
||||
bool isStepAddPrice = false;
|
||||
CheckBox chkSelectAll = null;
|
||||
Dictionary<ShopLoginInfo, int> dicShopGetCount = new Dictionary<ShopLoginInfo, int>();
|
||||
Dictionary<ShopLoginInfo, List<string>> dicNotSupportCate = new Dictionary<ShopLoginInfo, List<string>>();
|
||||
@@ -45,6 +44,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
NaiBa.Util.ConcurrentList<AddPriceRule> lstAddPriceRule = new NaiBa.Util.ConcurrentList<AddPriceRule>();
|
||||
AddPriceRule defaultAddPriceRule = null;
|
||||
WXUploadRule wxUploadRule = null;
|
||||
public Dictionary<string, List<string>> dicCheckedShopIdList = new Dictionary<string, List<string>>();
|
||||
public WXDBProdUploadForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -84,6 +84,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
PriceAddMore = priceItem.AddMorePrice,
|
||||
SinglePriceAdd = priceItem.SinglePriceAdd,
|
||||
};
|
||||
ucPrice.lblSinglePriceAdd.Visible = false;
|
||||
ucPrice.txtSinglePriceAdd.Visible = false;
|
||||
if (IsSetFontScaleNone)
|
||||
{
|
||||
Font of = ucPrice.Font;
|
||||
@@ -95,21 +97,70 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
ucPrice.PriceChange += ucAddPrice_PriceChange;
|
||||
}
|
||||
|
||||
dicCheckedShopIdList = NaiBa.Util.Helper.ConfigHelper.LoadConfig<Dictionary<string, List<string>>>("wx_checked_shop_dic_list");
|
||||
if (dicCheckedShopIdList == null)
|
||||
dicCheckedShopIdList = new Dictionary<string, List<string>>();
|
||||
if (!dicCheckedShopIdList.Keys.Contains(BaseClass.UserName))
|
||||
dicCheckedShopIdList[BaseClass.UserName] = new List<string>();
|
||||
|
||||
defaultAddPriceRule = NaiBa.Util.Helper.ConfigHelper.LoadConfig<AddPriceRule>("wx_default_add_price_rule");
|
||||
if (defaultAddPriceRule == null)
|
||||
{
|
||||
defaultAddPriceRule = new AddPriceRule() { AddPriceTimes = 1.3m, AddMorePrice = 1, SinglePriceAdd = 1 };
|
||||
}
|
||||
txtAddTimes.TextChanged -= txtAddPrice_TextChanged;
|
||||
txtAddMorePrice.TextChanged -= txtAddPrice_TextChanged;
|
||||
txtSinglePriceAdd.TextChanged -= txtAddPrice_TextChanged;
|
||||
txtStockNum.TextChanged -= txtAddPrice_TextChanged;
|
||||
chkAddMorePriceFirst.CheckedChanged -= chkAddMorePriceFirst_CheckedChanged;
|
||||
chkStepAddPrice.CheckedChanged -= chkStepAddPrice_CheckedChanged;
|
||||
|
||||
this.txtAddTimes.Text = defaultAddPriceRule.AddPriceTimes.ToString();
|
||||
this.txtAddMorePrice.Text = defaultAddPriceRule.AddMorePrice.ToString();
|
||||
this.txtSinglePriceAdd.Text = defaultAddPriceRule.SinglePriceAdd.ToString();
|
||||
this.txtStockNum.Text = defaultAddPriceRule.StockNum.ToString();
|
||||
this.chkAddMorePriceFirst.Checked = defaultAddPriceRule.AddMorePriceFirst;
|
||||
this.chkStepAddPrice.Checked = defaultAddPriceRule.IsStepAddPrice;
|
||||
|
||||
txtAddTimes.TextChanged += txtAddPrice_TextChanged;
|
||||
txtAddMorePrice.TextChanged += txtAddPrice_TextChanged;
|
||||
txtSinglePriceAdd.TextChanged += txtAddPrice_TextChanged;
|
||||
txtStockNum.TextChanged += txtAddPrice_TextChanged;
|
||||
chkAddMorePriceFirst.CheckedChanged += chkAddMorePriceFirst_CheckedChanged;
|
||||
chkStepAddPrice.CheckedChanged += chkStepAddPrice_CheckedChanged;
|
||||
|
||||
wxUploadRule = NaiBa.Util.Helper.ConfigHelper.LoadConfig<WXUploadRule>("wx_upload_rule");
|
||||
if (wxUploadRule == null)
|
||||
wxUploadRule = new WXUploadRule();
|
||||
this.txtPreDays.TextChanged -= txtPreDays_TextChanged;
|
||||
this.txtReplaceText.TextChanged -= txtReplaceText_TextChanged;
|
||||
this.txtMinPrice.TextChanged -= txtMinPrice_TextChanged;
|
||||
this.txtWaitSeconds.TextChanged -= txtWaitSeconds_TextChanged;
|
||||
this.chkHighestPriceSku.CheckedChanged -= chkHighestPriceSku_CheckedChanged;
|
||||
this.chkSameSpecPrice.CheckedChanged -= chkSameSpecPrice_CheckedChanged;
|
||||
this.chkSkipUploaded.CheckedChanged -= chkSkipUploaded_CheckedChanged;
|
||||
this.chkUpDraft.CheckedChanged -= chkUpDraft_CheckedChanged;
|
||||
this.chkPreSale.CheckedChanged -= chkPreSale_CheckedChanged;
|
||||
|
||||
this.txtPreDays.Text = wxUploadRule.PreSaleDays.ParseToString();
|
||||
this.txtReplaceText.Text = wxUploadRule.FilterWords.ParseToString();
|
||||
this.txtMinPrice.Text = wxUploadRule.SkuMinPrice.ParseToString();
|
||||
this.txtWaitSeconds.Text = wxUploadRule.WaitSeconds.ParseToString();
|
||||
this.chkHighestPriceSku.Checked = wxUploadRule.OnlyHighestPriceSku.ParseToBool();
|
||||
this.chkSameSpecPrice.Checked = wxUploadRule.SameSpecSamePrice.ParseToBool();
|
||||
this.chkSkipUploaded.Checked = wxUploadRule.SkipUploaded.ParseToBool();
|
||||
this.chkUpDraft.Checked = wxUploadRule.UpDraft.ParseToBool();
|
||||
this.chkPreSale.Checked = wxUploadRule.IsPreSale.ParseToBool();
|
||||
|
||||
this.txtPreDays.TextChanged += txtPreDays_TextChanged;
|
||||
this.txtReplaceText.TextChanged += txtReplaceText_TextChanged;
|
||||
this.txtMinPrice.TextChanged += txtMinPrice_TextChanged;
|
||||
this.txtWaitSeconds.TextChanged += txtWaitSeconds_TextChanged;
|
||||
this.chkHighestPriceSku.CheckedChanged += chkHighestPriceSku_CheckedChanged;
|
||||
this.chkSameSpecPrice.CheckedChanged += chkSameSpecPrice_CheckedChanged;
|
||||
this.chkSkipUploaded.CheckedChanged += chkSkipUploaded_CheckedChanged;
|
||||
this.chkUpDraft.CheckedChanged += chkUpDraft_CheckedChanged;
|
||||
this.chkPreSale.CheckedChanged += chkPreSale_CheckedChanged;
|
||||
|
||||
this.lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
|
||||
|
||||
@@ -122,7 +173,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
dgvShop.Columns["colSelect"].HeaderText = "";
|
||||
//chkSelectAll.Width = chkSelectAll.Height = 13;
|
||||
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
|
||||
chkSelectAll.Checked = true;
|
||||
//chkSelectAll.Checked = true;
|
||||
|
||||
this.dgvSelectProduct.AddSelectorColumn("colCheck");
|
||||
|
||||
@@ -199,6 +250,10 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
row.Cells["colSelect"].Value = true;
|
||||
}
|
||||
}
|
||||
|
||||
dicCheckedShopIdList[BaseClass.UserName] = dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true)
|
||||
.Select(r => r.Cells["colShopId"].Value.ParseToString()).ToList();
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_checked_shop_dic_list", dicCheckedShopIdList);
|
||||
}
|
||||
|
||||
private void btnRefreshShop_Click(object sender, EventArgs e)
|
||||
@@ -291,7 +346,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
if (row == null)
|
||||
{
|
||||
this.dgvShop.Rows.Add(
|
||||
!isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse),
|
||||
//!isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse),
|
||||
dicCheckedShopIdList[BaseClass.UserName].Contains(shopEntity.ShopId),
|
||||
shopEntity.LoginName,
|
||||
shopEntity.ShopId,
|
||||
shopEntity.ShopAccount,
|
||||
@@ -345,6 +401,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
//BaseMsgForm.ShowInfo("店铺未登录!");
|
||||
}
|
||||
dicCheckedShopIdList[BaseClass.UserName] = dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true)
|
||||
.Select(r => r.Cells["colShopId"].Value.ParseToString()).ToList();
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_checked_shop_dic_list", dicCheckedShopIdList);
|
||||
break;
|
||||
case "colLoginStatus":
|
||||
if (WXShopListForm.Instance == null)
|
||||
@@ -1707,7 +1766,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
if (defaultAddPriceRule.AddMorePriceFirst)
|
||||
skuParam.productSkuInfo.salePrice = ((skuInfo.multi_price + defaultAddPriceRule.AddMorePrice * 100) * defaultAddPriceRule.AddPriceTimes).ParseToInt();
|
||||
// 阶梯式加价,如果命中则按阶梯式加价进行
|
||||
if (isStepAddPrice)
|
||||
if (defaultAddPriceRule.IsStepAddPrice)
|
||||
{
|
||||
foreach (var addPrice in lstAddPriceRule)
|
||||
{
|
||||
@@ -1764,6 +1823,21 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 预售信息
|
||||
if (chkPreSale.Checked)
|
||||
{
|
||||
upProdParam.product.deliverInfo = new productDeliverInfoParam();
|
||||
upProdParam.product.deliverInfo.deliverType = 1;
|
||||
int preSaleDays = Math.Max(3, wxUploadRule.PreSaleDays);
|
||||
preSaleDays = Math.Min(45, preSaleDays);
|
||||
upProdParam.product.deliverInfo.skuDeliverInfo = new skuDeliverInfoParam()
|
||||
{
|
||||
stockType = 1,
|
||||
fullPaymentPresaleDeliveryTime = preSaleDays.ParseToString()
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 书籍类生成书籍图片
|
||||
//qualificationList
|
||||
if (upProdParam.product.info.category.FirstOrDefault()?.name == "图书" || prodInfo.detail.cats.FirstOrDefault() == "书籍/杂志/报纸")
|
||||
@@ -1876,16 +1950,122 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
|
||||
// 提交商品上架
|
||||
var uploadProdRst = WXUpload.upProductV2(shop, upProdParam);
|
||||
if (!uploadProdRst.Contains("\"code\":0") && !uploadProdRst.Contains("\"success\":true"))
|
||||
if (!chkTestNoAuditUpload.Checked)
|
||||
{
|
||||
var error = BaseRegex.GetStringJson(ref uploadProdRst, "msg");
|
||||
if (string.IsNullOrEmpty(error))
|
||||
error = BaseRegex.GetStringJson(ref uploadProdRst, "errmsg");
|
||||
if (string.IsNullOrEmpty(error))
|
||||
error = uploadProdRst;
|
||||
return "{\"success\":false,\"draftId\":" + upProdParam.product.productKey.productId + ",\"status\":\"草稿箱\",\"errMsg\":\"上架失败 " + error + "\"}";
|
||||
var uploadProdRst = WXUpload.upProductV2(shop, upProdParam);
|
||||
if (!uploadProdRst.Contains("\"code\":0") && !uploadProdRst.Contains("\"success\":true"))
|
||||
{
|
||||
var error = BaseRegex.GetStringJson(ref uploadProdRst, "msg");
|
||||
if (string.IsNullOrEmpty(error))
|
||||
error = BaseRegex.GetStringJson(ref uploadProdRst, "errmsg");
|
||||
if (string.IsNullOrEmpty(error))
|
||||
error = uploadProdRst;
|
||||
return "{\"success\":false,\"draftId\":" + upProdParam.product.productKey.productId + ",\"status\":\"草稿箱\",\"errMsg\":\"上架失败 " + error + "\"}";
|
||||
}
|
||||
if (upProdParam.product.productKey.productId.IsNullOrEmpty())
|
||||
upProdParam.product.productKey.productId = BaseRegex.GetLongJson(ref uploadProdRst, "productId").ParseToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
#region 尝试免审接口提交 未成功
|
||||
var getEditProd = WXUpload.getEditProductV2(shop, upProdParam.product.productKey.productId);
|
||||
//getEditProd = getEditProd.Replace("8388275713", "33333333");
|
||||
//getEditProd = getEditProd.Replace("33333333", "8387633147");
|
||||
|
||||
string productJson = "";
|
||||
try
|
||||
{
|
||||
// 获取免审编辑回传数据
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var prodStr = JsonConvert.SerializeObject(upProdParam, jsonSetting);
|
||||
JObject jObj = JsonHelper.JObjectParse(prodStr);
|
||||
|
||||
JObject jObjTmp = JsonHelper.JObjectParse(getEditProd);
|
||||
jObj["product"] = jObjTmp["product"];
|
||||
|
||||
//productJson = productJson.Replace("999", "1005");
|
||||
jObj["product"]["status"] = 1; //默认为5
|
||||
foreach(var sku in jObj["product"]["productSkus"])
|
||||
{
|
||||
sku["productSkuInfo"]["stockInfo"]["stockNum"] = "1000";
|
||||
sku["productSkuInfo"]["stockInfo"]["totalNum"] = "1000";
|
||||
//sku["productSkuInfo"]["realStockInfo"]["stockNum"] = "1000";
|
||||
//sku["productSkuInfo"]["realStockInfo"]["totalNum"] = "1000";
|
||||
|
||||
var realStockInfo = new realStockInfoParam() { stockNum = 999, totalNum = 999 };
|
||||
sku["productSkuInfo"]["realStockInfo"] = JsonHelper.JObjectParse(JsonHelper.SerializeObject(realStockInfo));
|
||||
}
|
||||
productJson = JsonHelper.SerializeObject(jObj);
|
||||
|
||||
// 提交上架
|
||||
//var uploadProdRst = WXUpload.upProductJObjectV2(shop, productJson);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
|
||||
string submitJson = "{\"name\":\"goods/" + upProdParam.product.productKey.productId + "/" + DateTime.Now.ToString("yyyy-MM-dd") + "/" +
|
||||
BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now) + "/submit.json\"}";
|
||||
var initFileName = BaseRegex.GetStringJson(ref submitJson, "name");
|
||||
DateTime tickTime = DateTime.Now.AddSeconds(0 - Randomx.GetId(10, 30));
|
||||
int time1 = BaseClass.DateTimeToTimestampSeconds(tickTime) - Randomx.GetId(80, 150);
|
||||
int time2 = BaseClass.DateTimeToTimestampSeconds(tickTime);
|
||||
|
||||
var uploadPartRst = WXUpload.initUploadPart(shop, submitJson, upProdParam.product.productKey.productId, time1, time2);
|
||||
string uploadPartId = BaseRegex.GetStringJson(ref uploadPartRst, "uploadId");
|
||||
|
||||
//upProdParam.product.status = 5;
|
||||
//upProdParam.product.editStatus = 0;
|
||||
//upProdParam.product.auditReason = "";
|
||||
//upProdParam.product.info.skuIdList = new skuIdListParam();
|
||||
//upProdParam.product.info.skuList = new skuListParam();
|
||||
//upProdParam.product.info.skuList.skuInfo = new List<skuInfoParam>();
|
||||
//var listingAuditFreeRst = WXUpload.listingAuditFree(shop, upProdParam, upProdParam.product.productKey.productId, time1, time2);
|
||||
// 提交免审修改(实际生效接口)
|
||||
var listingAuditFreeRst = WXUpload.listingAuditFree(shop, productJson, upProdParam.product.productKey.productId, time1, time2);
|
||||
|
||||
string tempBlobPath = Path.GetTempPath();
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
tempBlobPath += folderLetters[Randomx.GetId(folderLetters.Length)];
|
||||
}
|
||||
if (!Directory.Exists(tempBlobPath))
|
||||
Directory.CreateDirectory(tempBlobPath);
|
||||
string blobFullPath = tempBlobPath + "\\blob"; // C:\Users\Administrator\AppData\Local\Temp\3mer3k21\blob
|
||||
using (StreamWriter sw = new StreamWriter(blobFullPath))
|
||||
{
|
||||
//skuParam.productSkuInfo.realStockInfo = new realStockInfoParam() { stockNum = 1005, totalNum = 1005 };
|
||||
|
||||
|
||||
var jObj = JsonHelper.JObjectParse(productJson);
|
||||
foreach(JObject skuObj in jObj["product"]["productSkus"])
|
||||
{
|
||||
skuObj["productSkuInfo"]["stockInfo"]["stockNum"] = 1005;
|
||||
|
||||
var realStockInfo = new realStockInfoParam() { stockNum = 999, totalNum = 999 };
|
||||
skuObj["productSkuInfo"]["realStockInfo"] = JsonHelper.JObjectParse(JsonHelper.SerializeObject(realStockInfo));
|
||||
}
|
||||
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
foreach (var sku in upProdParam.product.productSkus)
|
||||
{
|
||||
sku.productSkuInfo.stockInfo.stockNum = 1005;
|
||||
}
|
||||
var prodStr = JsonConvert.SerializeObject(upProdParam, jsonSetting);
|
||||
prodStr = JsonHelper.SerializeObject(jObj["product"]);
|
||||
sw.Write(prodStr);
|
||||
}
|
||||
uploadPartRst = WXUpload.uploadPartBinary(shop, initFileName, blobFullPath, uploadPartId, upProdParam.product.productKey.productId, time1, time2);
|
||||
//{"code":0,"etag":"18e3f73046378472219641ef181d3232"}
|
||||
//C:\Users\Administrator\AppData\Local\Temp\9uaeiplr\blob
|
||||
|
||||
var eTag = BaseRegex.GetStringJson(ref uploadPartRst, "etag");
|
||||
string rstParmStr = @"{""name"":""" + initFileName + @""",""uploadId"":""" + uploadPartId + @""",""etagList"":[""" + eTag + @"""],""partSeqList"":[1]}";
|
||||
var complateRst = WXUpload.completeUploadPart(shop, rstParmStr, upProdParam.product.productKey.productId, time1, time2);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
if (cell != null)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
@@ -2204,7 +2384,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
|
||||
private void chkStepAddPrice_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
isStepAddPrice = this.chkStepAddPrice.Checked;
|
||||
defaultAddPriceRule.IsStepAddPrice = this.chkStepAddPrice.Checked;
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig<AddPriceRule>("wx_default_add_price_rule", defaultAddPriceRule);
|
||||
}
|
||||
|
||||
private void btnClearDgv_Click(object sender, EventArgs e)
|
||||
@@ -2347,6 +2528,60 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void txtPreDays_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
wxUploadRule.PreSaleDays = txtPreDays.Text.Trim().ParseToInt();
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_upload_rule", wxUploadRule);
|
||||
}
|
||||
|
||||
private void txtReplaceText_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
wxUploadRule.FilterWords = txtReplaceText.Text.Trim();
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_upload_rule", wxUploadRule);
|
||||
}
|
||||
|
||||
private void txtMinPrice_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
wxUploadRule.SkuMinPrice = txtMinPrice.Text.Trim().ParseToInt();
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_upload_rule", wxUploadRule);
|
||||
}
|
||||
|
||||
private void txtWaitSeconds_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
wxUploadRule.WaitSeconds = txtWaitSeconds.Text.Trim().ParseToInt();
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_upload_rule", wxUploadRule);
|
||||
}
|
||||
|
||||
private void chkHighestPriceSku_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
wxUploadRule.OnlyHighestPriceSku = chkHighestPriceSku.Checked;
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_upload_rule", wxUploadRule);
|
||||
}
|
||||
|
||||
private void chkSameSpecPrice_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
wxUploadRule.SameSpecSamePrice = chkSameSpecPrice.Checked;
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_upload_rule", wxUploadRule);
|
||||
}
|
||||
|
||||
private void chkSkipUploaded_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
wxUploadRule.SkipUploaded = chkSkipUploaded.Checked;
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_upload_rule", wxUploadRule);
|
||||
}
|
||||
|
||||
private void chkUpDraft_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
wxUploadRule.UpDraft = chkUpDraft.Checked;
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_upload_rule", wxUploadRule);
|
||||
}
|
||||
|
||||
private void chkPreSale_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
wxUploadRule.IsPreSale = chkPreSale.Checked;
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_upload_rule", wxUploadRule);
|
||||
}
|
||||
}
|
||||
|
||||
public class WXUpload
|
||||
@@ -2497,6 +2732,132 @@ Content-Type: image/jpeg
|
||||
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static string upProductJObjectV2(ShopLoginInfo shop, string prodStr)
|
||||
{
|
||||
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/upProductV2?token=&lang=zh_CN";
|
||||
string referer = "https://store.weixin.qq.com/shop/goods/entry";
|
||||
//JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
//var prodStr = JsonConvert.SerializeObject(prodParam, jsonSetting);
|
||||
JObject jObj = new JObject();
|
||||
jObj.Add("data", prodStr);
|
||||
string body = JsonHelper.SerializeObject(jObj);
|
||||
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 取售后地址
|
||||
/// </summary>
|
||||
/// <param name="shop"></param>
|
||||
/// <returns></returns>
|
||||
public static string getEditProductV2(ShopLoginInfo shop, string productId)
|
||||
{
|
||||
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/getEditProductV2?token=&lang=zh_CN&productKey=%7B%22productId%22:" +
|
||||
productId + "%7D&needRealStock=true&preview=false&release=false";
|
||||
//url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/getEditProductV2?token=&lang=zh_CN&productKey=%7B%22productId%22:" +
|
||||
// productId + "%7D&needRealStock=true&preview=false&release=true";
|
||||
string referer = "https://store.weixin.qq.com/shop/goods/entry?productId=" + productId + "&isUpdateAuditFree=0&source=list_edit&continueEditInfo={%22isEditingContinued%22:false,%22lastEditDraftTime%22:0,%22listingTime%22:0}";
|
||||
//referer = "https://store.weixin.qq.com/shop/goods/entry?productId=" + productId + "&isUpdateAuditFree=1&source=list_audit_free&continueEditInfo={%22isEditingContinued%22:true,%22lastEditDraftTime%22:0,%22listingTime%22:0}";
|
||||
var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string initUploadPart(ShopLoginInfo shop, string submitJson, string prodId, int time1, int time2)
|
||||
{
|
||||
string url = "https://store.weixin.qq.com/shop-faas/mmecnodefiletransfer/filecos/initUploadPart?token=&lang=zh_CN";
|
||||
string referer = "https://store.weixin.qq.com/shop/goods/entry?productId=" + prodId +
|
||||
"&isUpdateAuditFree=1&source=list_audit_free&continueEditInfo=" +
|
||||
"{%22isEditingContinued%22:true,%22lastEditDraftTime%22:" + time1 + "," +
|
||||
"%22listingTime%22:" + time2 + "}";
|
||||
string body = submitJson; //@"{""name"":""goods/10000456038253/2026-01-20/1768887306422/submit.json""}";
|
||||
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string listingAuditFree(ShopLoginInfo shop, WXUploadProductParam prodParam, string prodId, int time1, int time2)
|
||||
{
|
||||
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/listingAuditFree?token=&lang=zh_CN";
|
||||
string referer = "https://store.weixin.qq.com/shop/goods/entry?productId=" + prodId +
|
||||
"&isUpdateAuditFree=1&source=list_audit_free&continueEditInfo=" +
|
||||
"{%22isEditingContinued%22:true,%22lastEditDraftTime%22:" + time1 + "," +
|
||||
"%22listingTime%22:" + time2 + "}";
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var prodStr = JsonConvert.SerializeObject(prodParam, jsonSetting);
|
||||
JObject jObj = new JObject();
|
||||
jObj.Add("data", prodStr);
|
||||
string body = JsonHelper.SerializeObject(jObj);
|
||||
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string listingAuditFree(ShopLoginInfo shop, string prodStr, string prodId, int time1, int time2)
|
||||
{
|
||||
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/listingAuditFree?token=&lang=zh_CN";
|
||||
string referer = "https://store.weixin.qq.com/shop/goods/entry?productId=" + prodId +
|
||||
"&isUpdateAuditFree=1&source=list_audit_free&continueEditInfo=" +
|
||||
"{%22isEditingContinued%22:true,%22lastEditDraftTime%22:" + time1 + "," +
|
||||
"%22listingTime%22:" + time2 + "}";
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
JObject jObj = new JObject();
|
||||
jObj.Add("data", prodStr);
|
||||
string body = JsonHelper.SerializeObject(jObj);
|
||||
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string uploadPartBinary(ShopLoginInfo shop, string initFileName, string blobPath, string uploadId, string prodId, int time1, int time2)
|
||||
{
|
||||
string boundaryLetters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
||||
string boundaryStr = "----WebKitFormBoundary";
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
boundaryStr += boundaryLetters[Randomx.GetId(boundaryLetters.Length)];
|
||||
}
|
||||
|
||||
string url = "https://store.weixin.qq.com/shop-faas/mmecnodefiletransfer/filecos/uploadPartBinary?token=&lang=zh_CN";
|
||||
string referer = "https://store.weixin.qq.com/shop/goods/entry?productId=" + prodId +
|
||||
"&isUpdateAuditFree=1&source=list_audit_free&continueEditInfo=" +
|
||||
"{%22isEditingContinued%22:true,%22lastEditDraftTime%22:" + time1 + "," +
|
||||
"%22listingTime%22:" + time2 + "}";
|
||||
string body = @"--" + boundaryStr + @"
|
||||
Content-Disposition: form-data; name=""name""
|
||||
|
||||
" + initFileName + @"
|
||||
--" + boundaryStr + @"
|
||||
Content-Disposition: form-data; name=""uploadId""
|
||||
|
||||
" + uploadId + @"
|
||||
--" + boundaryStr + @"
|
||||
Content-Disposition: form-data; name=""partSeq""
|
||||
|
||||
1
|
||||
--" + boundaryStr + @"
|
||||
Content-Disposition: form-data; name=""file""; filename=""blob""
|
||||
Content-Type: application/octet-stream
|
||||
|
||||
<!>" + blobPath + @"<!>
|
||||
--" + boundaryStr + @"--
|
||||
";
|
||||
var result = WXHttpResponseBLL.WeiXinUploadResponse(shop, url, body, boundaryStr, referer);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static string completeUploadPart(ShopLoginInfo shop, string completeJson, string prodId, int time1, int time2)
|
||||
{
|
||||
string url = "https://store.weixin.qq.com/shop-faas/mmecnodefiletransfer/filecos/completeUploadPart?token=&lang=zh_CN";
|
||||
string referer = "https://store.weixin.qq.com/shop/goods/entry?productId=" + prodId +
|
||||
"&isUpdateAuditFree=1&source=list_audit_free&continueEditInfo=" +
|
||||
"{%22isEditingContinued%22:true,%22lastEditDraftTime%22:" + time1 + "," +
|
||||
"%22listingTime%22:" + time2 + "}";
|
||||
string body = completeJson; //{"name":"goods/10000466857488/2026-01-20/1768907711117/submit.json","uploadId":"176890774759894589c6096cab2210e0793688fb68b482b766a0387c8667d3280a36385109","etagList":["ade9671ce546efb4cb209f5aa7e5d597"],"partSeqList":[1]}
|
||||
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public class AddPriceRule
|
||||
@@ -2529,39 +2890,23 @@ Content-Type: image/jpeg
|
||||
/// 上货库存量设置
|
||||
/// </summary>
|
||||
public int StockNum { get; set; } = 0;
|
||||
public bool IsStepAddPrice { get; set; } = false;
|
||||
}
|
||||
|
||||
public class WXUploadRule
|
||||
{
|
||||
public bool IsUseUpperSizeSpec { get; set; } = true;
|
||||
public bool IsKeepChanceGoodImg { get; set; } = true;
|
||||
/// <summary>
|
||||
/// 是否报名活动(提交一个虚拟高倍率加价再通过活动价格实现商品原价)
|
||||
/// </summary>
|
||||
public bool IsSignActivity { get; set; } = true;
|
||||
/// <summary>
|
||||
/// 准备报名活动的商品原价加价倍率
|
||||
/// </summary>
|
||||
public decimal ActivityAddPriceTimes { get; set; } = 3m;
|
||||
public bool IsLowPriceSku { get; set; } = true;
|
||||
public string LowPriceSkuName { get; set; } = "福利款";
|
||||
public decimal LowPriceSkuLowestPrice { get; set; } = 5m;
|
||||
public int PreSaleDays { get; set; } = 5;
|
||||
|
||||
/// <summary>
|
||||
/// 升级版
|
||||
/// </summary>
|
||||
public bool IsUpgradeVersion { get; set; } = false;
|
||||
public string UpgradeVersionName { get; set; } = "升级版";
|
||||
/// <summary>
|
||||
/// 升级版额外加价
|
||||
/// </summary>
|
||||
public decimal UpgradeVersionAddPrice { get; set; } = 1m;
|
||||
public string FilterWords { get; set; } = "真丝,蚕丝,香云纱,羊绒,羊毛,羊羔绒,羊羔毛,羽绒,皮草";
|
||||
|
||||
public bool IsUseExtCodePrice { get; set; }
|
||||
public int SkuMinPrice { get; set; } = 10;
|
||||
|
||||
public bool sign20981 { get; set; }
|
||||
public bool sign22347 { get; set; }
|
||||
public bool sign15996 { get; set; }
|
||||
public bool sign21365 { get; set; }
|
||||
public int WaitSeconds { get; set; } = 10;
|
||||
|
||||
public bool OnlyHighestPriceSku { get; set; } = true;
|
||||
public bool SameSpecSamePrice { get; set; } = true;
|
||||
public bool SkipUploaded { get; set; } = true;
|
||||
public bool UpDraft { get; set; } = false;
|
||||
public bool IsPreSale { get; set; } = false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user