diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index 25b3d7b..7e738c2 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -31,7 +31,7 @@ namespace AllBase
///
/// 版本ID
///
- public static int VersionCount = 1269;
+ public static int VersionCount = 1271;
public static string MainPath = "29wx";
//public static string MainPath = "29wx";
//public static string MainPath = "29pdd";
diff --git a/TEMUKJD/WXForms/OrderForms/WXOrderListOptimizeForm.cs b/TEMUKJD/WXForms/OrderForms/WXOrderListOptimizeForm.cs
index b6f9096..f2fcee2 100644
--- a/TEMUKJD/WXForms/OrderForms/WXOrderListOptimizeForm.cs
+++ b/TEMUKJD/WXForms/OrderForms/WXOrderListOptimizeForm.cs
@@ -233,7 +233,7 @@ namespace TemuKJD.WXForms.OrderForms
string spuId = lblSpuId.Text.Trim();
string skuId = lblSkuId.Text.Trim();
string num = txtCurrentStock.Text.Trim();
- var rst = WXPreSale.DownProd(shop, spuId);
+ var rst = WXProdNoCheckEditHelper.DownProd(shop, spuId);
if (!rst.Contains("\"code\":0"))
{
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs
index be4b2c2..31fbf19 100644
--- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs
+++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs
@@ -32,26 +32,28 @@ namespace TemuKJD.WXForms.ProductForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = 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();
+ 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();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
+ this.txtWaitSeconds = new System.Windows.Forms.TextBox();
+ this.label6 = new System.Windows.Forms.Label();
+ this.chkRemoveSpecialChar = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkIsSubmitSuccess = new TemuKJD.UserComponent.UcCheckBox(this.components);
+ this.chkUseShanghaiReturnOrderAddress = new TemuKJD.UserComponent.UcCheckBox(this.components);
+ this.label7 = new System.Windows.Forms.Label();
this.txtStockNum = new System.Windows.Forms.TextBox();
this.txtShippingPriceTimes = new System.Windows.Forms.TextBox();
this.txtAddTimes = new System.Windows.Forms.TextBox();
this.txtAddMorePrice = new System.Windows.Forms.TextBox();
- this.label6 = new System.Windows.Forms.Label();
- this.chkRemoveSpecialChar = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.label13 = new System.Windows.Forms.Label();
this.btnStop = new DevComponents.DotNetBar.PanelEx();
- this.label7 = new System.Windows.Forms.Label();
this.chkRandomCompanyProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkAddMorePriceFirst = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.btnClearDgv = new DevComponents.DotNetBar.PanelEx();
@@ -62,7 +64,6 @@ namespace TemuKJD.WXForms.ProductForms
this.ucAddPrice1 = new TemuKJD.PDDForms.ProductSelectForms.UcAddPrice();
this.ucAddPrice2 = new TemuKJD.PDDForms.ProductSelectForms.UcAddPrice();
this.lblNewAddPrice = new System.Windows.Forms.Label();
- this.txtWaitSeconds = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.btnUpload = new DevComponents.DotNetBar.PanelEx();
this.label4 = new System.Windows.Forms.Label();
@@ -310,23 +311,24 @@ namespace TemuKJD.WXForms.ProductForms
this.ucGroupBoxEx2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
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.txtWaitSeconds);
+ this.ucGroupBoxEx2.Controls.Add(this.label6);
+ this.ucGroupBoxEx2.Controls.Add(this.chkRemoveSpecialChar);
this.ucGroupBoxEx2.Controls.Add(this.chkIsSubmitSuccess);
+ this.ucGroupBoxEx2.Controls.Add(this.chkUseShanghaiReturnOrderAddress);
+ this.ucGroupBoxEx2.Controls.Add(this.label7);
this.ucGroupBoxEx2.Controls.Add(this.txtStockNum);
this.ucGroupBoxEx2.Controls.Add(this.txtShippingPriceTimes);
this.ucGroupBoxEx2.Controls.Add(this.txtAddTimes);
this.ucGroupBoxEx2.Controls.Add(this.txtAddMorePrice);
- this.ucGroupBoxEx2.Controls.Add(this.label6);
- this.ucGroupBoxEx2.Controls.Add(this.chkRemoveSpecialChar);
this.ucGroupBoxEx2.Controls.Add(this.label13);
this.ucGroupBoxEx2.Controls.Add(this.btnStop);
- this.ucGroupBoxEx2.Controls.Add(this.label7);
this.ucGroupBoxEx2.Controls.Add(this.chkRandomCompanyProd);
this.ucGroupBoxEx2.Controls.Add(this.chkAddMorePriceFirst);
this.ucGroupBoxEx2.Controls.Add(this.btnClearDgv);
this.ucGroupBoxEx2.Controls.Add(this.label14);
this.ucGroupBoxEx2.Controls.Add(this.pnlStep);
this.ucGroupBoxEx2.Controls.Add(this.lblNewAddPrice);
- this.ucGroupBoxEx2.Controls.Add(this.txtWaitSeconds);
this.ucGroupBoxEx2.Controls.Add(this.label10);
this.ucGroupBoxEx2.Controls.Add(this.btnUpload);
this.ucGroupBoxEx2.Controls.Add(this.label4);
@@ -341,16 +343,76 @@ namespace TemuKJD.WXForms.ProductForms
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "商品上传";
//
+ // txtWaitSeconds
+ //
+ this.txtWaitSeconds.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtWaitSeconds.Location = new System.Drawing.Point(1056, 12);
+ this.txtWaitSeconds.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
+ this.txtWaitSeconds.Name = "txtWaitSeconds";
+ this.txtWaitSeconds.Size = new System.Drawing.Size(22, 23);
+ this.txtWaitSeconds.TabIndex = 728;
+ this.txtWaitSeconds.Text = "10";
+ this.txtWaitSeconds.TextChanged += new System.EventHandler(this.txtWaitSeconds_TextChanged);
+ //
+ // label6
+ //
+ this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(1015, 15);
+ this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(44, 17);
+ this.label6.TabIndex = 727;
+ this.label6.Text = "多等待";
+ //
+ // chkRemoveSpecialChar
+ //
+ this.chkRemoveSpecialChar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.chkRemoveSpecialChar.AutoSize = true;
+ this.chkRemoveSpecialChar.Checked = true;
+ this.chkRemoveSpecialChar.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.chkRemoveSpecialChar.Location = new System.Drawing.Point(886, 13);
+ this.chkRemoveSpecialChar.Name = "chkRemoveSpecialChar";
+ this.chkRemoveSpecialChar.Size = new System.Drawing.Size(135, 21);
+ this.chkRemoveSpecialChar.TabIndex = 896;
+ this.chkRemoveSpecialChar.Text = "移除标题前特殊符号";
+ this.chkRemoveSpecialChar.UseVisualStyleBackColor = true;
+ this.chkRemoveSpecialChar.CheckedChanged += new System.EventHandler(this.chkRemoveSpecialChar_CheckedChanged);
+ //
// chkIsSubmitSuccess
//
this.chkIsSubmitSuccess.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkIsSubmitSuccess.AutoSize = true;
- this.chkIsSubmitSuccess.Location = new System.Drawing.Point(700, 13);
+ this.chkIsSubmitSuccess.Location = new System.Drawing.Point(790, 13);
this.chkIsSubmitSuccess.Name = "chkIsSubmitSuccess";
this.chkIsSubmitSuccess.Size = new System.Drawing.Size(99, 21);
this.chkIsSubmitSuccess.TabIndex = 906;
this.chkIsSubmitSuccess.Text = "校验是否提审";
this.chkIsSubmitSuccess.UseVisualStyleBackColor = true;
+ this.chkIsSubmitSuccess.CheckedChanged += new System.EventHandler(this.chkIsSubmitSuccess_CheckedChanged);
+ //
+ // chkUseShanghaiReturnOrderAddress
+ //
+ this.chkUseShanghaiReturnOrderAddress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.chkUseShanghaiReturnOrderAddress.AutoSize = true;
+ this.chkUseShanghaiReturnOrderAddress.Location = new System.Drawing.Point(645, 13);
+ this.chkUseShanghaiReturnOrderAddress.Name = "chkUseShanghaiReturnOrderAddress";
+ this.chkUseShanghaiReturnOrderAddress.Size = new System.Drawing.Size(149, 21);
+ this.chkUseShanghaiReturnOrderAddress.TabIndex = 916;
+ this.chkUseShanghaiReturnOrderAddress.Text = "使用29供货商退货地址";
+ this.chkUseShanghaiReturnOrderAddress.UseVisualStyleBackColor = true;
+ this.chkUseShanghaiReturnOrderAddress.CheckedChanged += new System.EventHandler(this.chkUseShanghaiReturnOrderAddress_CheckedChanged);
+ //
+ // label7
+ //
+ this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(1077, 15);
+ this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(20, 17);
+ this.label7.TabIndex = 729;
+ this.label7.Text = "秒";
//
// txtStockNum
//
@@ -395,30 +457,6 @@ namespace TemuKJD.WXForms.ProductForms
this.txtAddMorePrice.Text = "1.0";
this.txtAddMorePrice.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged);
//
- // label6
- //
- this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(930, 15);
- this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(56, 17);
- this.label6.TabIndex = 727;
- this.label6.Text = "额外等待";
- //
- // chkRemoveSpecialChar
- //
- this.chkRemoveSpecialChar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.chkRemoveSpecialChar.AutoSize = true;
- this.chkRemoveSpecialChar.Checked = true;
- this.chkRemoveSpecialChar.CheckState = System.Windows.Forms.CheckState.Checked;
- this.chkRemoveSpecialChar.Location = new System.Drawing.Point(800, 13);
- this.chkRemoveSpecialChar.Name = "chkRemoveSpecialChar";
- this.chkRemoveSpecialChar.Size = new System.Drawing.Size(135, 21);
- this.chkRemoveSpecialChar.TabIndex = 896;
- this.chkRemoveSpecialChar.Text = "移除标题前特殊符号";
- this.chkRemoveSpecialChar.UseVisualStyleBackColor = true;
- //
// label13
//
this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@@ -436,7 +474,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnStop.CanvasColor = System.Drawing.SystemColors.Control;
this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStop.DisabledBackColor = System.Drawing.Color.Empty;
- this.btnStop.Location = new System.Drawing.Point(1032, 44);
+ this.btnStop.Location = new System.Drawing.Point(1032, 65);
this.btnStop.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(60, 23);
@@ -456,24 +494,13 @@ namespace TemuKJD.WXForms.ProductForms
this.btnStop.Text = "停止上传";
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
- // label7
- //
- this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(1010, 15);
- this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(20, 17);
- this.label7.TabIndex = 729;
- this.label7.Text = "秒";
- //
// chkRandomCompanyProd
//
this.chkRandomCompanyProd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkRandomCompanyProd.AutoSize = true;
this.chkRandomCompanyProd.Checked = true;
this.chkRandomCompanyProd.CheckState = System.Windows.Forms.CheckState.Checked;
- this.chkRandomCompanyProd.Location = new System.Drawing.Point(1032, 100);
+ this.chkRandomCompanyProd.Location = new System.Drawing.Point(1032, 121);
this.chkRandomCompanyProd.Name = "chkRandomCompanyProd";
this.chkRandomCompanyProd.Size = new System.Drawing.Size(99, 21);
this.chkRandomCompanyProd.TabIndex = 889;
@@ -499,7 +526,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnClearDgv.CanvasColor = System.Drawing.SystemColors.Control;
this.btnClearDgv.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClearDgv.DisabledBackColor = System.Drawing.Color.Empty;
- this.btnClearDgv.Location = new System.Drawing.Point(1032, 72);
+ this.btnClearDgv.Location = new System.Drawing.Point(1032, 93);
this.btnClearDgv.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnClearDgv.Name = "btnClearDgv";
this.btnClearDgv.Size = new System.Drawing.Size(60, 23);
@@ -654,17 +681,6 @@ namespace TemuKJD.WXForms.ProductForms
this.lblNewAddPrice.Text = "增加阶梯";
this.lblNewAddPrice.Click += new System.EventHandler(this.lblNewAddPrice_Click);
//
- // txtWaitSeconds
- //
- this.txtWaitSeconds.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.txtWaitSeconds.Location = new System.Drawing.Point(986, 12);
- this.txtWaitSeconds.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
- this.txtWaitSeconds.Name = "txtWaitSeconds";
- this.txtWaitSeconds.Size = new System.Drawing.Size(24, 23);
- this.txtWaitSeconds.TabIndex = 728;
- this.txtWaitSeconds.Text = "10";
- this.txtWaitSeconds.TextChanged += new System.EventHandler(this.txtWaitSeconds_TextChanged);
- //
// label10
//
this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@@ -683,7 +699,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnUpload.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnUpload.DisabledBackColor = System.Drawing.Color.Empty;
this.btnUpload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnUpload.Location = new System.Drawing.Point(1032, 16);
+ this.btnUpload.Location = new System.Drawing.Point(1032, 37);
this.btnUpload.Name = "btnUpload";
this.btnUpload.Size = new System.Drawing.Size(60, 23);
this.btnUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -823,7 +839,7 @@ namespace TemuKJD.WXForms.ProductForms
//
// chkUseWXComplateProd
//
- this.chkUseWXComplateProd.Location = new System.Drawing.Point(529, 28);
+ this.chkUseWXComplateProd.Location = new System.Drawing.Point(492, 28);
this.chkUseWXComplateProd.Name = "chkUseWXComplateProd";
this.chkUseWXComplateProd.Size = new System.Drawing.Size(87, 21);
this.chkUseWXComplateProd.TabIndex = 876;
@@ -854,7 +870,7 @@ namespace TemuKJD.WXForms.ProductForms
//
// chkPreSale
//
- this.chkPreSale.Location = new System.Drawing.Point(281, 28);
+ this.chkPreSale.Location = new System.Drawing.Point(261, 28);
this.chkPreSale.Name = "chkPreSale";
this.chkPreSale.Size = new System.Drawing.Size(65, 21);
this.chkPreSale.TabIndex = 789;
@@ -955,11 +971,11 @@ namespace TemuKJD.WXForms.ProductForms
this.chkSkipUploaded.AutoSize = true;
this.chkSkipUploaded.Checked = true;
this.chkSkipUploaded.CheckState = System.Windows.Forms.CheckState.Checked;
- this.chkSkipUploaded.Location = new System.Drawing.Point(424, 28);
+ this.chkSkipUploaded.Location = new System.Drawing.Point(407, 28);
this.chkSkipUploaded.Name = "chkSkipUploaded";
- this.chkSkipUploaded.Size = new System.Drawing.Size(111, 21);
+ this.chkSkipUploaded.Size = new System.Drawing.Size(87, 21);
this.chkSkipUploaded.TabIndex = 755;
- this.chkSkipUploaded.Text = "跳过店铺已铺货";
+ this.chkSkipUploaded.Text = "跳过已铺货";
this.chkSkipUploaded.UseVisualStyleBackColor = true;
this.chkSkipUploaded.CheckedChanged += new System.EventHandler(this.chkSkipUploaded_CheckedChanged);
//
@@ -978,7 +994,7 @@ namespace TemuKJD.WXForms.ProductForms
//
// txtPreDays
//
- this.txtPreDays.Location = new System.Drawing.Point(347, 27);
+ this.txtPreDays.Location = new System.Drawing.Point(327, 27);
this.txtPreDays.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtPreDays.Name = "txtPreDays";
this.txtPreDays.Size = new System.Drawing.Size(22, 23);
@@ -1027,7 +1043,7 @@ namespace TemuKJD.WXForms.ProductForms
this.chkAiShortTitle.AutoSize = true;
this.chkAiShortTitle.Checked = true;
this.chkAiShortTitle.CheckState = System.Windows.Forms.CheckState.Checked;
- this.chkAiShortTitle.Location = new System.Drawing.Point(198, 28);
+ this.chkAiShortTitle.Location = new System.Drawing.Point(177, 28);
this.chkAiShortTitle.Name = "chkAiShortTitle";
this.chkAiShortTitle.Size = new System.Drawing.Size(87, 21);
this.chkAiShortTitle.TabIndex = 862;
@@ -1072,7 +1088,7 @@ namespace TemuKJD.WXForms.ProductForms
// label18
//
this.label18.AutoSize = true;
- this.label18.Location = new System.Drawing.Point(367, 30);
+ this.label18.Location = new System.Drawing.Point(347, 30);
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);
@@ -1116,7 +1132,7 @@ namespace TemuKJD.WXForms.ProductForms
this.txtTitleHeadWord.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtTitleHeadWord.MaxLength = 15;
this.txtTitleHeadWord.Name = "txtTitleHeadWord";
- this.txtTitleHeadWord.Size = new System.Drawing.Size(126, 25);
+ this.txtTitleHeadWord.Size = new System.Drawing.Size(109, 25);
this.txtTitleHeadWord.TabIndex = 835;
this.txtTitleHeadWord.TextChanged += new System.EventHandler(this.txtTitleHeadWord_TextChanged);
//
@@ -2593,19 +2609,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
- dataGridViewCellStyle33.BackColor = System.Drawing.Color.WhiteSmoke;
- this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle33;
+ dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
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)))));
- dataGridViewCellStyle34.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle34.BackColor = System.Drawing.SystemColors.Control;
- dataGridViewCellStyle34.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle34.ForeColor = System.Drawing.SystemColors.WindowText;
- dataGridViewCellStyle34.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle34.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle34.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
- this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle34;
+ 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.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -2837,19 +2853,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
- dataGridViewCellStyle35.BackColor = System.Drawing.Color.WhiteSmoke;
- this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle35;
+ dataGridViewCellStyle11.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
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)))));
- dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle36.BackColor = System.Drawing.SystemColors.Control;
- dataGridViewCellStyle36.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle36.ForeColor = System.Drawing.SystemColors.WindowText;
- dataGridViewCellStyle36.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle36.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle36.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
- this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle36;
+ dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;
+ dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
+ dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -2911,8 +2927,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colSupplierName
//
- dataGridViewCellStyle37.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle37;
+ dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle13;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
@@ -2992,8 +3008,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductName
//
- dataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colProductName.DefaultCellStyle = dataGridViewCellStyle38;
+ dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colProductName.DefaultCellStyle = dataGridViewCellStyle14;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -3001,8 +3017,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductCat
//
- dataGridViewCellStyle39.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colProductCat.DefaultCellStyle = dataGridViewCellStyle39;
+ dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colProductCat.DefaultCellStyle = dataGridViewCellStyle15;
this.colProductCat.HeaderText = "商品类目";
this.colProductCat.Name = "colProductCat";
this.colProductCat.ReadOnly = true;
@@ -3057,8 +3073,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colAddTime
//
- dataGridViewCellStyle40.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colAddTime.DefaultCellStyle = dataGridViewCellStyle40;
+ dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colAddTime.DefaultCellStyle = dataGridViewCellStyle16;
this.colAddTime.HeaderText = "上传时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
@@ -3418,5 +3434,6 @@ namespace TemuKJD.WXForms.ProductForms
private UserComponent.UcCheckBox chkIsSubmitSuccess;
private System.Windows.Forms.NumericUpDown numFilterViewUv;
private UserComponent.UcCheckBox chkFilterViewUv;
+ private UserComponent.UcCheckBox chkUseShanghaiReturnOrderAddress;
}
}
\ No newline at end of file
diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs
index 5ee4a6f..e7763ca 100644
--- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs
+++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs
@@ -216,6 +216,7 @@ namespace TemuKJD.WXForms.ProductForms
this.chkPreSale.Checked = wxUploadRule.IsPreSale.ParseToBool();
this.txtTitleHeadWord.Text = wxUploadRule.TitleHeadWords.ParseToString();
this.chkAiShortTitle.Checked = wxUploadRule.IsAiShortTitle;
+ this.chkUseShanghaiReturnOrderAddress.Checked = wxUploadRule.IsUseShanghaiReturnOrderAddress;
this.chkUseWXComplateProd.Checked = wxUploadRule.IsUseWXComplateProd;
this.chkSaveBound.Checked = wxUploadRule.IsSaveBound;
if (wxUploadRule.IsSaveBound)
@@ -2826,154 +2827,137 @@ namespace TemuKJD.WXForms.ProductForms
}));
}
- var afterSaleAddress = "";
- var afterSaleDetail = "";
- // 厂商直采获取售后地址用于处理售后单
- if (dbProd.product_get_type_text == "厂商直采")
+ // 非上海仓退货
+ if (!chkUseShanghaiReturnOrderAddress.Checked)
{
-
- var urlAfterSale = BaseClass.BuildObjString("product/wx_get_after_sale");
- var dataAfterSale = Work.UserLogin.GetSignaturex();
- if (!string.IsNullOrEmpty(dbProd.real_coid))
- dataAfterSale += "&coid=" + dbProd.skc_id + "->" + dbProd.real_coid;
- else
- dataAfterSale += "&coid=" + dbProd.skc_id;
- var htmlAfterSale = GetHtml.PostUtf8(urlAfterSale, dataAfterSale);
- if (string.IsNullOrEmpty(htmlAfterSale) || !htmlAfterSale.Contains("\"code\":200"))
- htmlAfterSale = GetHtml.PostUtf8(urlAfterSale, dataAfterSale);
- if (string.IsNullOrEmpty(htmlAfterSale) || !htmlAfterSale.Contains("\"code\":200"))
+ var afterSaleAddress = "";
+ var afterSaleDetail = "";
+ // 厂商直采获取售后地址用于处理售后单
+ if (dbProd.product_get_type_text == "厂商直采")
{
- }
- else
- {
- if (htmlAfterSale.Contains("\"data\":\"\""))
+ var urlAfterSale = BaseClass.BuildObjString("product/wx_get_after_sale");
+ var dataAfterSale = Work.UserLogin.GetSignaturex();
+ if (!string.IsNullOrEmpty(dbProd.real_coid))
+ dataAfterSale += "&coid=" + dbProd.skc_id + "->" + dbProd.real_coid;
+ else
+ dataAfterSale += "&coid=" + dbProd.skc_id;
+ var htmlAfterSale = GetHtml.PostUtf8(urlAfterSale, dataAfterSale);
+ if (string.IsNullOrEmpty(htmlAfterSale) || !htmlAfterSale.Contains("\"code\":200"))
+ htmlAfterSale = GetHtml.PostUtf8(urlAfterSale, dataAfterSale);
+ if (string.IsNullOrEmpty(htmlAfterSale) || !htmlAfterSale.Contains("\"code\":200"))
{
+
}
else
{
- try
+ if (htmlAfterSale.Contains("\"data\":\"\""))
{
- afterSaleAddress = JsonHelper.SerializeObject(JsonHelper.JObjectParse(htmlAfterSale)["data"]);
}
- catch
+ else
{
+ try
+ {
+ afterSaleAddress = JsonHelper.SerializeObject(JsonHelper.JObjectParse(htmlAfterSale)["data"]);
+ }
+ catch
+ {
+ }
}
}
- }
- //{"address_id":null,"user_name":"退货","postal_code":null,"province_name":"广东省","city_name":"揭阳市","county_name":"榕城区","street_name":"东兴街道","detail_info":"建阳路万泰华庭二期对面眼镜","tel_number":"13024622251","number":"10431013","name":"麦多多供应链"}
- //{"address_id":null,"user_name":"退货","postal_code":null,"province_name":"广东省","city_name":"揭阳市","county_name":"榕城区","street_name":"东兴街道","detail_info":"建阳路万泰华庭二期对面眼镜","tel_number":"13024622251","number":"10431013","name":"麦多多供应链"}
- if (string.IsNullOrEmpty(afterSaleAddress))
- {
- // 获取推单售后地址
- var urlAfter = BaseClass.BuildObjString("product/e57_after_sale");
- var dataAfter = Work.UserLogin.GetSignaturex() + "&coid=" + dbProd.skc_id;
- var afterRst = GetHtml.PostUtf8(urlAfter, dataAfter);
- try
+ //{"address_id":null,"user_name":"退货","postal_code":null,"province_name":"广东省","city_name":"揭阳市","county_name":"榕城区","street_name":"东兴街道","detail_info":"建阳路万泰华庭二期对面眼镜","tel_number":"13024622251","number":"10431013","name":"麦多多供应链"}
+ //{"address_id":null,"user_name":"退货","postal_code":null,"province_name":"广东省","city_name":"揭阳市","county_name":"榕城区","street_name":"东兴街道","detail_info":"建阳路万泰华庭二期对面眼镜","tel_number":"13024622251","number":"10431013","name":"麦多多供应链"}
+ if (string.IsNullOrEmpty(afterSaleAddress))
{
- afterSaleAddress = JsonHelper.SerializeObject(JsonHelper.JObjectParse(afterRst)["data"]);
- if (afterRst.Contains("\"code\":0") && !string.IsNullOrEmpty(afterSaleAddress))
+ // 获取推单售后地址
+ var urlAfter = BaseClass.BuildObjString("product/e57_after_sale");
+ var dataAfter = Work.UserLogin.GetSignaturex() + "&coid=" + dbProd.skc_id;
+ var afterRst = GetHtml.PostUtf8(urlAfter, dataAfter);
+ try
{
- urlAfterSale = BaseClass.BuildObjString("product/wx_add_mdy_after_sale");
- dataAfterSale = Work.UserLogin.GetSignaturex() +
- "&coid=" + dbProd.skc_id +
- "&after_sale_json=" + afterSaleAddress;
- htmlAfterSale = GetHtml.PostUtf8(urlAfterSale, dataAfterSale);
- if (string.IsNullOrEmpty(htmlAfterSale) || !htmlAfterSale.Contains("\"code\":200"))
+ afterSaleAddress = JsonHelper.SerializeObject(JsonHelper.JObjectParse(afterRst)["data"]);
+ if (afterRst.Contains("\"code\":0") && !string.IsNullOrEmpty(afterSaleAddress))
+ {
+ urlAfterSale = BaseClass.BuildObjString("product/wx_add_mdy_after_sale");
+ dataAfterSale = Work.UserLogin.GetSignaturex() +
+ "&coid=" + dbProd.skc_id +
+ "&after_sale_json=" + afterSaleAddress;
htmlAfterSale = GetHtml.PostUtf8(urlAfterSale, dataAfterSale);
+ if (string.IsNullOrEmpty(htmlAfterSale) || !htmlAfterSale.Contains("\"code\":200"))
+ htmlAfterSale = GetHtml.PostUtf8(urlAfterSale, dataAfterSale);
+ }
+ }
+ catch (Exception ex)
+ {
}
}
- catch (Exception ex)
+
+ if (string.IsNullOrEmpty(afterSaleAddress))
{
+ return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"售后地址信息获取失败\"}";
}
}
- if (string.IsNullOrEmpty(afterSaleAddress))
+ // 官方库1688厂家数据必须有退货地址才能上传,用户自采数据使用店铺或默认退货地址 26.5.29
+ // 官方库暂时也放开限制可以随意传 26.5.31
+ else if (dbProd.product_get_type_text == "1688厂家" && dbProd.add_user_name == "admin" && 1 == 2)
{
- return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"售后地址信息获取失败\"}";
- }
- }
-
- // 官方库1688厂家数据必须有退货地址才能上传,用户自采数据使用店铺或默认退货地址 26.5.29
- // 官方库暂时也放开限制可以随意传 26.5.31
- else if (dbProd.product_get_type_text == "1688厂家" && dbProd.add_user_name == "admin" && 1 == 2)
- {
- var urlAfterSale = BaseClass.BuildObjString("product/wx_get_after_sale");
- var dataAfterSale = Work.UserLogin.GetSignaturex();
- dataAfterSale += "&coid=" + dbProd.from_shop_id;
- var htmlAfterSale = GetHtml.PostUtf8(urlAfterSale, dataAfterSale);
- if (string.IsNullOrEmpty(htmlAfterSale) || !htmlAfterSale.Contains("\"code\":200"))
- htmlAfterSale = GetHtml.PostUtf8(urlAfterSale, dataAfterSale);
- if (string.IsNullOrEmpty(htmlAfterSale) || !htmlAfterSale.Contains("\"code\":200"))
- {
-
- }
- else
- {
- if (htmlAfterSale.Contains("\"data\":\"\""))
+ var urlAfterSale = BaseClass.BuildObjString("product/wx_get_after_sale");
+ var dataAfterSale = Work.UserLogin.GetSignaturex();
+ dataAfterSale += "&coid=" + dbProd.from_shop_id;
+ var htmlAfterSale = GetHtml.PostUtf8(urlAfterSale, dataAfterSale);
+ if (string.IsNullOrEmpty(htmlAfterSale) || !htmlAfterSale.Contains("\"code\":200"))
+ htmlAfterSale = GetHtml.PostUtf8(urlAfterSale, dataAfterSale);
+ if (string.IsNullOrEmpty(htmlAfterSale) || !htmlAfterSale.Contains("\"code\":200"))
{
+
}
else
{
- try
+ if (htmlAfterSale.Contains("\"data\":\"\""))
{
- afterSaleAddress = JsonHelper.SerializeObject(JsonHelper.JObjectParse(htmlAfterSale)["data"]);
}
- catch
+ else
{
+ try
+ {
+ afterSaleAddress = JsonHelper.SerializeObject(JsonHelper.JObjectParse(htmlAfterSale)["data"]);
+ }
+ catch
+ {
+ }
}
}
+
+ if (string.IsNullOrEmpty(afterSaleAddress))
+ {
+ return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"售后地址信息获取失败\"}";
+ }
}
- if (string.IsNullOrEmpty(afterSaleAddress))
+ else if (GlobalConfig.GlobalSettings.IsWxUseSoftwareDefaultAddress == true && !IsWxNotUseSoftwareDefaultAddressOnce)
{
- return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"售后地址信息获取失败\"}";
+ if (GlobalConfig.WXShopDefaultAddressList.Any(a => a.shop_id == shop.ShopId))
+ WXShopDefaultAddressListForm.GetShopDefaultAddress(new List() { shop });
+ var address = GlobalConfig.WXShopDefaultAddressList.First(a => a.shop_id == shop.ShopId);
+ if (!address.isFullAddress)
+ return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"店铺地址信息获取失败\"}";
+ afterSaleAddress = JsonHelper.SerializeObject(address);
}
- }
- else if(GlobalConfig.GlobalSettings.IsWxUseSoftwareDefaultAddress == true && !IsWxNotUseSoftwareDefaultAddressOnce)
- {
- if (GlobalConfig.WXShopDefaultAddressList.Any(a => a.shop_id == shop.ShopId))
- WXShopDefaultAddressListForm.GetShopDefaultAddress(new List() { shop });
- var address = GlobalConfig.WXShopDefaultAddressList.First(a => a.shop_id == shop.ShopId);
- if (!address.isFullAddress)
- return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"店铺地址信息获取失败\"}";
- afterSaleAddress = JsonHelper.SerializeObject(address);
- }
-
- if (!string.IsNullOrEmpty(afterSaleAddress))
- {
- afterSaleDetail = BaseRegex.GetStringJson(ref afterSaleAddress, "detail_info");
- if (string.IsNullOrEmpty(afterSaleDetail))
+ if (!string.IsNullOrEmpty(afterSaleAddress))
{
- return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"售后地址详细信息获取失败\"}";
+ afterSaleDetail = BaseRegex.GetStringJson(ref afterSaleAddress, "detail_info");
+ if (string.IsNullOrEmpty(afterSaleDetail))
+ {
+ return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"售后地址详细信息获取失败\"}";
+ }
}
- }
- var addressRst = WXUpload.getAddress(shop, afterSaleDetail);
- if (!addressRst.Contains("\"code\":0") && !addressRst.Contains("\"success\":true"))
- {
- var error = BaseRegex.GetStringJson(ref addressRst, "msg");
- if (string.IsNullOrEmpty(error))
- error = addressRst;
- return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"售后地址获取失败 " + error + "\"}";
- }
- if (addressRst.Contains("\"totalNum\":0") && !string.IsNullOrEmpty(afterSaleDetail))
- {
- string provinceName = BaseRegex.GetStringJson(ref afterSaleAddress, "province_name");
- string cityName = BaseRegex.GetStringJson(ref afterSaleAddress, "city_name");
- string countyName = BaseRegex.GetStringJson(ref afterSaleAddress, "county_name");
- string detailInfo = afterSaleDetail;
- string userName = BaseRegex.GetStringJson(ref afterSaleAddress, "user_name");
- string telNumber = BaseRegex.GetStringJson(ref afterSaleAddress, "tel_number");
- var addAddRst = WXUpload.addAddress(shop, provinceName, cityName, countyName, detailInfo, userName, telNumber);
-
- Thread.Sleep(Randomx.GetId(500, 1000));
-
- addressRst = WXUpload.getAddress(shop, afterSaleDetail);
+ var addressRst = WXUpload.getAddress(shop, afterSaleDetail);
if (!addressRst.Contains("\"code\":0") && !addressRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref addressRst, "msg");
@@ -2981,15 +2965,65 @@ namespace TemuKJD.WXForms.ProductForms
error = addressRst;
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"售后地址获取失败 " + error + "\"}";
}
- }
+ if (addressRst.Contains("\"totalNum\":0") && !string.IsNullOrEmpty(afterSaleDetail))
+ {
+ string provinceName = BaseRegex.GetStringJson(ref afterSaleAddress, "province_name");
+ string cityName = BaseRegex.GetStringJson(ref afterSaleAddress, "city_name");
+ string countyName = BaseRegex.GetStringJson(ref afterSaleAddress, "county_name");
+ string detailInfo = afterSaleDetail;
+ string userName = BaseRegex.GetStringJson(ref afterSaleAddress, "user_name");
+ string telNumber = BaseRegex.GetStringJson(ref afterSaleAddress, "tel_number");
+ var addAddRst = WXUpload.addAddress(shop, provinceName, cityName, countyName, detailInfo, userName, telNumber);
- if (addressRst.Contains("\"totalNum\":0"))
+ Thread.Sleep(Randomx.GetId(500, 1000));
+
+ addressRst = WXUpload.getAddress(shop, afterSaleDetail);
+ if (!addressRst.Contains("\"code\":0") && !addressRst.Contains("\"success\":true"))
+ {
+ var error = BaseRegex.GetStringJson(ref addressRst, "msg");
+ if (string.IsNullOrEmpty(error))
+ error = addressRst;
+ return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"售后地址获取失败 " + error + "\"}";
+ }
+ }
+
+ if (addressRst.Contains("\"totalNum\":0"))
+ {
+ return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"售后地址获取失败\"}";
+ }
+
+ upProdParam.product.info.afterSaleInfo = new afterSaleInfoParam();
+ upProdParam.product.info.afterSaleInfo.afterSaleAddressId = BaseRegex.GetStringJson(ref addressRst, "addressId");
+ }
+ // 上海仓退货
+ else
{
- return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"售后地址获取失败\"}";
- }
+ try
+ {
+ string addressId = "";
+ string setAddressRst = WXProdNoCheckEditHelper.SetShanghaiReturnOrderAddress(shop);
+ if (setAddressRst.Contains("\"success\":true"))
+ {
+ addressId = WXProdNoCheckEditHelper.dicShopAddressId[shop.ShopId];
+ }
+ else
+ {
+ var errmsg = BaseRegex.GetStringJson(ref setAddressRst, "msg");
+ if (string.IsNullOrWhiteSpace(errmsg))
+ errmsg = setAddressRst;
+ WXProdNoCheckEditHelper.dicShopAddressId.Remove(shop.ShopId);
+ return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"退货地址指定失败:" + errmsg + "\"}";
+ }
- upProdParam.product.info.afterSaleInfo = new afterSaleInfoParam();
- upProdParam.product.info.afterSaleInfo.afterSaleAddressId = BaseRegex.GetStringJson(ref addressRst, "addressId");
+ upProdParam.product.info.afterSaleInfo = new afterSaleInfoParam();
+ upProdParam.product.info.afterSaleInfo.afterSaleAddressId = addressId;
+ }
+ catch (Exception ex)
+ {
+ WXProdNoCheckEditHelper.dicShopAddressId.Remove(shop.ShopId);
+ return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"退货地址指定失败:" + ex.Message + "\"}";
+ }
+ }
#endregion
// 厂商直采获取推单运费模板
@@ -6934,6 +6968,24 @@ namespace TemuKJD.WXForms.ProductForms
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_upload_rule", wxUploadRule);
}
}
+
+ private void chkRemoveSpecialChar_CheckedChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void chkIsSubmitSuccess_CheckedChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void chkUseShanghaiReturnOrderAddress_CheckedChanged(object sender, EventArgs e)
+ {
+ if (!IsFormLoad) return;
+
+ wxUploadRule.IsUseShanghaiReturnOrderAddress = chkUseShanghaiReturnOrderAddress.Checked;
+ NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_upload_rule", wxUploadRule);
+ }
}
public class WXUpload
@@ -7423,5 +7475,10 @@ Content-Type: application/octet-stream
public int FilterBoundMaxSave { get; set; } = 1000;
public bool IsAiShortTitle { get; set; } = false;
public bool IsUseWXComplateProd { get; set; }
+
+ ///
+ /// 上海仓退货
+ ///
+ public bool IsUseShanghaiReturnOrderAddress { get; set; } = false;
}
}
diff --git a/TEMUKJD/WXForms/ProductForms/WXProdCouponOrderBoomForm.cs b/TEMUKJD/WXForms/ProductForms/WXProdCouponOrderBoomForm.cs
index 08aa0dd..ae447da 100644
--- a/TEMUKJD/WXForms/ProductForms/WXProdCouponOrderBoomForm.cs
+++ b/TEMUKJD/WXForms/ProductForms/WXProdCouponOrderBoomForm.cs
@@ -697,9 +697,9 @@ namespace TemuKJD.WXForms.ProductForms
string getProdOnSaleRst = "";
if (string.IsNullOrEmpty(PreType) && sortType == null)
- getProdOnSaleRst = WXPreSale.scanProductPreview(shop, page, nextKey, pageSize);
+ getProdOnSaleRst = WXProdNoCheckEditHelper.scanProductPreview(shop, page, nextKey, pageSize);
else
- getProdOnSaleRst = WXPreSale.searchProduct(shop, page, null, pageSize, sortType);
+ getProdOnSaleRst = WXProdNoCheckEditHelper.searchProduct(shop, page, null, pageSize, sortType);
Thread.Sleep(Randomx.GetId(50, 100));
if (!getProdOnSaleRst.Contains("\"success\":true"))
{
diff --git a/TEMUKJD/WXForms/ProductForms/WXProdNoCheckEditAddressForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXProdNoCheckEditAddressForm.Designer.cs
index 80f5bd7..d0059a2 100644
--- a/TEMUKJD/WXForms/ProductForms/WXProdNoCheckEditAddressForm.Designer.cs
+++ b/TEMUKJD/WXForms/ProductForms/WXProdNoCheckEditAddressForm.Designer.cs
@@ -32,16 +32,16 @@ namespace TemuKJD.WXForms.ProductForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = 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();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = 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();
+ 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 dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.txtFilterProductId = new System.Windows.Forms.TextBox();
@@ -86,9 +86,8 @@ namespace TemuKJD.WXForms.ProductForms
this.label17 = new System.Windows.Forms.Label();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
- this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.pbLoadingShop = new System.Windows.Forms.PictureBox();
this.label3 = new System.Windows.Forms.Label();
- this.chkSearchPromotionLink = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.cmbPreType = new System.Windows.Forms.ComboBox();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
@@ -105,6 +104,7 @@ namespace TemuKJD.WXForms.ProductForms
this.colOnSaleNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.pbLoading = new System.Windows.Forms.PictureBox();
this.chkTestNoAuditUpload = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
@@ -136,8 +136,6 @@ namespace TemuKJD.WXForms.ProductForms
this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
- this.pbLoading = new System.Windows.Forms.PictureBox();
- this.pbLoadingShop = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -154,13 +152,13 @@ namespace TemuKJD.WXForms.ProductForms
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pbLoadingShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
this.splitContainer4.Panel1.SuspendLayout();
this.splitContainer4.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.pbLoadingShop)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
@@ -932,9 +930,7 @@ namespace TemuKJD.WXForms.ProductForms
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.pbLoadingShop);
- this.splitContainer2.Panel1.Controls.Add(this.comboBox1);
this.splitContainer2.Panel1.Controls.Add(this.label3);
- this.splitContainer2.Panel1.Controls.Add(this.chkSearchPromotionLink);
this.splitContainer2.Panel1.Controls.Add(this.cmbPreType);
this.splitContainer2.Panel1.Controls.Add(this.dgvShop);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
@@ -949,23 +945,22 @@ namespace TemuKJD.WXForms.ProductForms
this.splitContainer2.SplitterDistance = 350;
this.splitContainer2.TabIndex = 0;
//
- // comboBox1
+ // pbLoadingShop
//
- this.comboBox1.FormattingEnabled = true;
- this.comboBox1.Items.AddRange(new object[] {
- "短链",
- "长链"});
- this.comboBox1.Location = new System.Drawing.Point(148, 28);
- this.comboBox1.Name = "comboBox1";
- this.comboBox1.Size = new System.Drawing.Size(49, 25);
- this.comboBox1.TabIndex = 995;
- this.comboBox1.Text = "短链";
- this.comboBox1.Visible = false;
+ this.pbLoadingShop.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.pbLoadingShop.Image = global::TemuKJD.Properties.Resources.loading_blue;
+ this.pbLoadingShop.Location = new System.Drawing.Point(150, 196);
+ this.pbLoadingShop.Name = "pbLoadingShop";
+ this.pbLoadingShop.Size = new System.Drawing.Size(50, 50);
+ this.pbLoadingShop.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+ this.pbLoadingShop.TabIndex = 996;
+ this.pbLoadingShop.TabStop = false;
+ this.pbLoadingShop.Visible = false;
//
// label3
//
this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(199, 31);
+ this.label3.Location = new System.Drawing.Point(15, 37);
this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label3.Name = "label3";
this.label3.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
@@ -974,18 +969,6 @@ namespace TemuKJD.WXForms.ProductForms
this.label3.Text = "预售状态";
this.label3.Visible = false;
//
- // chkSearchPromotionLink
- //
- this.chkSearchPromotionLink.AutoSize = true;
- this.chkSearchPromotionLink.Location = new System.Drawing.Point(9, 30);
- this.chkSearchPromotionLink.Name = "chkSearchPromotionLink";
- this.chkSearchPromotionLink.Size = new System.Drawing.Size(147, 21);
- this.chkSearchPromotionLink.TabIndex = 827;
- this.chkSearchPromotionLink.Text = "同时查询商品推广链接";
- this.chkSearchPromotionLink.UseVisualStyleBackColor = true;
- this.chkSearchPromotionLink.Visible = false;
- this.chkSearchPromotionLink.CheckedChanged += new System.EventHandler(this.chkSearchPromotionLink_CheckedChanged);
- //
// cmbPreType
//
this.cmbPreType.FormattingEnabled = true;
@@ -993,7 +976,7 @@ namespace TemuKJD.WXForms.ProductForms
"",
"预售",
"非预售"});
- this.cmbPreType.Location = new System.Drawing.Point(255, 27);
+ this.cmbPreType.Location = new System.Drawing.Point(71, 33);
this.cmbPreType.Name = "cmbPreType";
this.cmbPreType.Size = new System.Drawing.Size(134, 25);
this.cmbPreType.TabIndex = 807;
@@ -1004,19 +987,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
- dataGridViewCellStyle21.BackColor = System.Drawing.Color.WhiteSmoke;
- this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle21;
+ dataGridViewCellStyle11.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
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)))));
- dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Control;
- dataGridViewCellStyle22.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.WindowText;
- dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
- this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle22;
+ dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;
+ dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
+ dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -1158,6 +1141,18 @@ namespace TemuKJD.WXForms.ProductForms
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
//
+ // pbLoading
+ //
+ this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
+ this.pbLoading.Location = new System.Drawing.Point(471, 196);
+ this.pbLoading.Name = "pbLoading";
+ this.pbLoading.Size = new System.Drawing.Size(50, 50);
+ this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+ this.pbLoading.TabIndex = 781;
+ this.pbLoading.TabStop = false;
+ this.pbLoading.Visible = false;
+ //
// chkTestNoAuditUpload
//
this.chkTestNoAuditUpload.AutoSize = true;
@@ -1173,19 +1168,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
- dataGridViewCellStyle23.BackColor = System.Drawing.Color.WhiteSmoke;
- this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle23;
+ dataGridViewCellStyle13.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13;
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)))));
- dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle24.BackColor = System.Drawing.SystemColors.Control;
- dataGridViewCellStyle24.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle24.ForeColor = System.Drawing.SystemColors.WindowText;
- dataGridViewCellStyle24.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle24.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
- this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle24;
+ 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.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -1251,8 +1246,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colSupplierName
//
- dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle25;
+ dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle15;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
@@ -1340,8 +1335,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductName
//
- dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colProductName.DefaultCellStyle = dataGridViewCellStyle26;
+ dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colProductName.DefaultCellStyle = dataGridViewCellStyle16;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -1356,8 +1351,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductCat
//
- dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colProductCat.DefaultCellStyle = dataGridViewCellStyle27;
+ dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colProductCat.DefaultCellStyle = dataGridViewCellStyle17;
this.colProductCat.HeaderText = "商品类目";
this.colProductCat.Name = "colProductCat";
this.colProductCat.ReadOnly = true;
@@ -1379,8 +1374,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colPrice
//
- dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colPrice.DefaultCellStyle = dataGridViewCellStyle28;
+ dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colPrice.DefaultCellStyle = dataGridViewCellStyle18;
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
@@ -1395,8 +1390,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colMsg
//
- dataGridViewCellStyle29.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colMsg.DefaultCellStyle = dataGridViewCellStyle29;
+ dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colMsg.DefaultCellStyle = dataGridViewCellStyle19;
this.colMsg.HeaderText = "状态";
this.colMsg.Name = "colMsg";
this.colMsg.ReadOnly = true;
@@ -1434,8 +1429,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colAddTime
//
- dataGridViewCellStyle30.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colAddTime.DefaultCellStyle = dataGridViewCellStyle30;
+ dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colAddTime.DefaultCellStyle = dataGridViewCellStyle20;
this.colAddTime.HeaderText = "上架时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
@@ -1473,30 +1468,6 @@ namespace TemuKJD.WXForms.ProductForms
this.statusBar.Size = new System.Drawing.Size(1165, 26);
this.statusBar.TabIndex = 2;
//
- // pbLoading
- //
- this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
- this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
- this.pbLoading.Location = new System.Drawing.Point(471, 196);
- this.pbLoading.Name = "pbLoading";
- this.pbLoading.Size = new System.Drawing.Size(50, 50);
- this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.pbLoading.TabIndex = 781;
- this.pbLoading.TabStop = false;
- this.pbLoading.Visible = false;
- //
- // pbLoadingShop
- //
- this.pbLoadingShop.Anchor = System.Windows.Forms.AnchorStyles.None;
- this.pbLoadingShop.Image = global::TemuKJD.Properties.Resources.loading_blue;
- this.pbLoadingShop.Location = new System.Drawing.Point(150, 196);
- this.pbLoadingShop.Name = "pbLoadingShop";
- this.pbLoadingShop.Size = new System.Drawing.Size(50, 50);
- this.pbLoadingShop.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.pbLoadingShop.TabIndex = 996;
- this.pbLoadingShop.TabStop = false;
- this.pbLoadingShop.Visible = false;
- //
// WXProdNoCheckEditAddressForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1531,13 +1502,13 @@ namespace TemuKJD.WXForms.ProductForms
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.pbLoadingShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).EndInit();
this.splitContainer4.Panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.pbLoadingShop)).EndInit();
this.ResumeLayout(false);
}
@@ -1599,7 +1570,6 @@ namespace TemuKJD.WXForms.ProductForms
private System.Windows.Forms.TextBox txtNotDownCount;
private UserComponent.UcCheckBox chkNotDownCount;
private System.Windows.Forms.Label label6;
- private UserComponent.UcCheckBox chkSearchPromotionLink;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
@@ -1629,7 +1599,6 @@ namespace TemuKJD.WXForms.ProductForms
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private UserComponent.UcCheckBox chkProdTime;
private System.Windows.Forms.DateTimePicker dtpStartTime;
- private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label18;
private UserComponent.UcGroupBoxEx ucGroupBoxEx3;
private System.Windows.Forms.TextBox txtFilterProductName;
diff --git a/TEMUKJD/WXForms/ProductForms/WXProdNoCheckEditAddressForm.cs b/TEMUKJD/WXForms/ProductForms/WXProdNoCheckEditAddressForm.cs
index 4df59ab..89d3aa5 100644
--- a/TEMUKJD/WXForms/ProductForms/WXProdNoCheckEditAddressForm.cs
+++ b/TEMUKJD/WXForms/ProductForms/WXProdNoCheckEditAddressForm.cs
@@ -532,10 +532,10 @@ namespace TemuKJD.WXForms.ProductForms
try
{
string addressId = "";
- string setAddressRst = SetShanghaiReturnOrderAddress(shop);
+ string setAddressRst = WXProdNoCheckEditHelper.SetShanghaiReturnOrderAddress(shop);
if (setAddressRst.Contains("\"success\":true"))
{
- addressId = dicShopAddressId[shop.ShopId];
+ addressId = WXProdNoCheckEditHelper.dicShopAddressId[shop.ShopId];
}
else
{
@@ -609,7 +609,7 @@ namespace TemuKJD.WXForms.ProductForms
}
else
{
- var downProd = WXNoCheckEdit.DownProd(shop, prodId);
+ var downProd = WXProdNoCheckEditHelper.DownProd(shop, prodId);
System.Threading.Thread.Sleep(Randomx.GetId(50, 100));
if (downProd.Contains("\"code\":0"))
{
@@ -635,66 +635,6 @@ namespace TemuKJD.WXForms.ProductForms
}
}
- public static List LastName { get; set; } = new List()
- {
- "赵", "钱", "孙", "李", "周", "吴", "郑", "王", "冯", "陈", "沈", "杨", "朱", "许", "何", "张",
- };
-
- public static Dictionary dicShopAddressId { get; set; } = new Dictionary();
-
- ///
- /// 上海仓退货订单地址
- ///
- ///
- ///
- ///
- public string SetShanghaiReturnOrderAddress(ShopLoginInfo shop, string afterSaleDetail= "真如镇街道真北路2653弄Z区zt")
- {
- if (dicShopAddressId.ContainsKey(shop.ShopId))
- {
- return "{\"success\":true}";
- }
-
- //收件人:百家姓随机
- //手机号:13024622251(马老师手机号)
- //上海市普陀区真如镇街道真北路2653弄Z区zt
- var addressRst = WXUpload.getAddress(shop, afterSaleDetail);
- if (!addressRst.Contains("\"code\":0") && !addressRst.Contains("\"success\":true"))
- {
- var error = BaseRegex.GetStringJson(ref addressRst, "msg");
- if (string.IsNullOrEmpty(error))
- error = addressRst;
- return "{\"success\":false,\"errMsg\":\"售后地址获取失败 " + error + "\"}";
- }
- if (addressRst.Contains("\"totalNum\":0") && !string.IsNullOrEmpty(afterSaleDetail))
- {
- string provinceName = "上海市";
- string cityName = "上海市";
- string countyName = "普陀区";
- string detailInfo = afterSaleDetail;
- string userName = LastName[Randomx.GetId(LastName.Count)] + (Randomx.GetId(2) == 0 ? "先生" : "女士");
- string telNumber = "13024622251";
- var addAddRst = WXUpload.addAddress(shop, provinceName, cityName, countyName, detailInfo, userName, telNumber);
-
- Thread.Sleep(Randomx.GetId(500, 1000));
-
- addressRst = WXUpload.getAddress(shop, afterSaleDetail);
- if (!addressRst.Contains("\"code\":0") && !addressRst.Contains("\"success\":true"))
- {
- var error = BaseRegex.GetStringJson(ref addressRst, "msg");
- if (string.IsNullOrEmpty(error))
- error = addressRst;
- return "{\"success\":false,\"errMsg\":\"售后地址添加失败 " + error + "\"}";
- }
- }
- var addressId = BaseRegex.GetStringJson(ref addressRst, "addressId");
- if (!addressId.IsNullOrEmpty())
- {
- dicShopAddressId[shop.ShopId] = addressId;
- return "{\"success\":true}";
- }
- return "{\"success\":false,\"地址解析失败\"}";
- }
private void btnStop_Click(object sender, EventArgs e)
{
@@ -766,9 +706,9 @@ namespace TemuKJD.WXForms.ProductForms
onSaleStatusCode = 6;
if (string.IsNullOrEmpty(PreType))
- getProdOnSaleRst = WXNoCheckEdit.scanProductPreview(shop, page, nextKey, pageSize, onSaleStatusCode);
+ getProdOnSaleRst = WXProdNoCheckEditHelper.scanProductPreview(shop, page, nextKey, pageSize, onSaleStatusCode);
else
- getProdOnSaleRst = WXNoCheckEdit.searchProduct(shop, page, PreType == "预售" ? 1 : 0, pageSize, onSaleStatusCode);
+ getProdOnSaleRst = WXProdNoCheckEditHelper.searchProduct(shop, page, PreType == "预售" ? 1 : 0, pageSize, onSaleStatusCode);
Thread.Sleep(Randomx.GetId(50, 100));
if (!getProdOnSaleRst.Contains("\"success\":true"))
{
@@ -892,52 +832,6 @@ namespace TemuKJD.WXForms.ProductForms
dgvSelectProduct.Rows[rowIndex].Cells["colMsg"].Style.ForeColor = color;
dgvSelectProduct.Rows[rowIndex].Cells["colPreSale"].Style.ForeColor = dgvSelectProduct.Rows[rowIndex].Cells["colPreSale"].Value.ParseToString().Contains("预售") ? Color.Green : Color.Blue;
}));
-
- // 获取商品链接
- if (StatusStr.ParseToString().StartsWith("在售") && chkSearchPromotionLink.Checked == true)
- {
- var t = Task.Run(() =>
- {
- var PromotionRst = WXNoCheckEdit.GetPromotionLink(shop, prod["productId"].ParseToString(), page);
- Thread.Sleep(Randomx.GetId(50, 150));
- if (PromotionRst.ParseToString().Contains("\"code\":0"))
- {
- var shareUrl = BaseRegex.GetStringJson(ref PromotionRst, "shareUrl");
- var shortLink = BaseRegex.GetStringJson(ref PromotionRst, "shortLink");
- if (!string.IsNullOrEmpty(shareUrl))
- {
- Invoke(new Action(() =>
- {
- if (comboBox1.Text == "短链")
- dgvSelectProduct.Rows[rowIndex].Cells["colPromotionLink"].Value = shortLink;
- else
- dgvSelectProduct.Rows[rowIndex].Cells["colPromotionLink"].Value = shareUrl;
- }));
- }
- else
- {
- Invoke(new Action(() =>
- {
- dgvSelectProduct.Rows[rowIndex].Cells["colPromotionLink"].Value = "链接获取失败";
- }));
- }
- }
- else
- {
- var errMsg = BaseRegex.GetStringJsonByRegs(ref PromotionRst, PromotionRst, "errMsg", "errorMsg", "err_msg", "error_msg", "errormsg");
- Invoke(new Action(() =>
- {
- dgvSelectProduct.Rows[rowIndex].Cells["colPromotionLink"].Value = errMsg;
- }));
- }
- });
- tList.Add(t);
- while (tList.Count >= 5)
- {
- Thread.Sleep(200);
- tList.RemoveAll(ta => ta.IsFaulted || ta.IsCanceled || ta.IsCompleted);
- }
- }
}
while (tList.Count > 0)
{
@@ -1143,11 +1037,6 @@ namespace TemuKJD.WXForms.ProductForms
{
OnSaleStatus = cmbOnSaleStatus.Text;
}
-
- private void chkSearchPromotionLink_CheckedChanged(object sender, EventArgs e)
- {
- this.dgvSelectProduct.Columns["colPromotionLink"].Visible = chkSearchPromotionLink.Checked;
- }
private void chkProdTime_CheckedChanged(object sender, EventArgs e)
{
@@ -1181,120 +1070,4 @@ namespace TemuKJD.WXForms.ProductForms
txtFilterProductName.Text = txtFilterProductId.Text = "";
}
}
-
- public class WXNoCheckEdit
- {
- ///
- /// -1 全部 5 在售 11 下架
- ///
- /// -1 全部 5 在售 11 下架
- ///
- public static string searchProduct(ShopLoginInfo shop, int pageNum, int? presaleType = null, int pageSize = 50, int? sortType = null, int status = 5)
- {
- //https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/searchProduct?token=&lang=zh_CN&pageSize=20&productStatus[]=-1&productSource=[1,16,32]&searchSource=1&useNew=true&pageNum=44&status[]=5&presaleType[]=1
- string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/searchProduct?token=&lang=zh_CN&" +
- "pageSize=" + pageSize + "&productStatus[]=-1&productSource=[1,16,32]&searchSource=1&useNew=true&pageNum=" + pageNum + "&status[]=" + status;
- if (presaleType != null)
- url += "&presaleType[]=" + presaleType;
- if (sortType != null)
- url += "&sortType=" + sortType;
-
- string refere = "https://store.weixin.qq.com/shop/goods/list?currentTab=PRODUCT_STATUS_ON";
- var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, refere);
- return result;
- }
-
- ///
- /// -1全部 5在售 11下架 1草稿箱 3审核待处理 6回收站
- ///
- /// -1 全部 5在售 11下架 1草稿箱 3审核待处理 6回收站
- ///
- public static string scanProductPreview(ShopLoginInfo shop, int page, string nextKey = "", int pageSize = 50, int saleStatus = 5)
- {
- string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/scanProductPreview?token=&lang=zh_CN";
- string referer = "https://store.weixin.qq.com/shop/goods/list?currentTab=PRODUCT_STATUS_ON";
- if (page > 1)
- referer = "https://store.weixin.qq.com/shop/goods/list?currentTab=PRODUCT_STATUS_ON¤tPage=" + page;
- //string body = @"{""pageSize"":20,""productStatus"":[-1],""productSource"":""[1,16,32]"",""searchSource"":1,""useNew"":true,""pageNum"":1,""status"":[5]}";
- //string body = @"{""pageSize"":20,""productStatus"":[-1],""productSource"":""[1,16,32]"",""searchSource"":1,""useNew"":true,""pageNum"":2,""status"":[5],""nextKey"":""ChwItc+24YajAhCD14bMBhjqLiDoDCgAMITXhswGEhwIy8im34ajAhCa74XMBhiaXyDeBygAMJrvhcwGGAEgeiiIEw==""}";
-
- //string body = @"{""pageSize"":" + pageSize + @",""productStatus"":[-1],""productSource"":""[1,16,32]"",""searchSource"":1,""useNew"":true,""pageNum"":" + page + @",""status"":[" + saleStatus + @"],""nextKey"":""" + nextKey + @"""}";
- JObject bodyObj = new JObject();
- bodyObj["pageSize"] = pageSize;
- bodyObj["productStatus"] = new JArray() { -1 };
- bodyObj["productSource"] = "[1,16,32]";
- bodyObj["searchSource"] = 1;
- bodyObj["useNew"] = true;
- bodyObj["pageNum"] = page;
- bodyObj["status"] = new JArray() { saleStatus };
- if(!string.IsNullOrEmpty(nextKey))
- {
- bodyObj["nextKey"] = nextKey;
- }
- string body = JsonHelper.SerializeObject(bodyObj);
-
- var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
- return result;
- }
-
- ///
- /// 下架商品
- ///
- ///
- ///
- ///
- public static string DownProd(ShopLoginInfo shop, string prodIds)
- {
- string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductlist/cgi/goods/BatchUnListing?token=&lang=zh_CN";
- string referer = "https://store.weixin.qq.com/shop/goods/list";
- string body = @"{""ids"":[" + prodIds + @"],""uploadSource"":6}";
- var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
- return result;
- }
-
-
- ///
- /// 删除商品
- ///
- ///
- ///
- ///
- public static string DelProd(ShopLoginInfo shop, string prodIds)
- {
- string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductlist/cgi/goods/batchDel?token=&lang=zh_CN";
- string referer = "https://store.weixin.qq.com/shop/goods/list";
- string body = @"{""ids"":[" + prodIds + @"],""uploadSource"":6}";
- var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
- return result;
- }
-
- ///
- /// 彻底删除商品
- ///
- ///
- ///
- ///
- public static string RealDelProd(ShopLoginInfo shop, string prodIds)
- {
- string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductlist/cgi/goods/batchRealDel?token=&lang=zh_CN";
- string referer = "https://store.weixin.qq.com/shop/goods/list?currentTab=PRODUCT_RECYCLE_BIN";
- string body = @"{""ids"":[" + prodIds + @"],""uploadSource"":6}";
- var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
- return result;
- }
-
- ///
- /// 获取推广信息
- ///
- ///
- ///
- ///
- public static string GetPromotionLink(ShopLoginInfo shop, string prodId, int pageId)
- {
- string url = "https://store.weixin.qq.com/shop-faas/mmecnodematerial/product?token=&lang=zh_CN&productId=" + prodId;
- string referer = "https://store.weixin.qq.com/shop/goods/list?currentPage=" + pageId;
- var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer);
- return result;
- }
- }
}
diff --git a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs
index 18465ee..6618e50 100644
--- a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs
+++ b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs
@@ -606,7 +606,7 @@ namespace TemuKJD.WXForms.ProductForms
}
else
{
- var downProd = WXPreSale.DownProd(shop, prodId);
+ var downProd = WXProdNoCheckEditHelper.DownProd(shop, prodId);
System.Threading.Thread.Sleep(Randomx.GetId(50, 100));
if (downProd.Contains("\"code\":0"))
{
@@ -702,9 +702,9 @@ namespace TemuKJD.WXForms.ProductForms
onSaleStatusCode = 6;
if (string.IsNullOrEmpty(PreType))
- getProdOnSaleRst = WXPreSale.scanProductPreview(shop, page, nextKey, pageSize, onSaleStatusCode);
+ getProdOnSaleRst = WXProdNoCheckEditHelper.scanProductPreview(shop, page, nextKey, pageSize, onSaleStatusCode);
else
- getProdOnSaleRst = WXPreSale.searchProduct(shop, page, PreType == "预售" ? 1 : 0, pageSize, onSaleStatusCode);
+ getProdOnSaleRst = WXProdNoCheckEditHelper.searchProduct(shop, page, PreType == "预售" ? 1 : 0, pageSize, onSaleStatusCode);
Thread.Sleep(Randomx.GetId(50, 100));
if (!getProdOnSaleRst.Contains("\"success\":true"))
{
@@ -834,7 +834,7 @@ namespace TemuKJD.WXForms.ProductForms
{
var t = Task.Run(() =>
{
- var PromotionRst = WXPreSale.GetPromotionLink(shop, prod["productId"].ParseToString(), page);
+ var PromotionRst = WXProdNoCheckEditHelper.GetPromotionLink(shop, prod["productId"].ParseToString(), page);
Thread.Sleep(Randomx.GetId(50, 150));
if (PromotionRst.ParseToString().Contains("\"code\":0"))
{
@@ -1212,7 +1212,7 @@ namespace TemuKJD.WXForms.ProductForms
prodIdLst.Add(prodId);
}
- var downProdRst = WXPreSale.DownProd(shop, string.Join(",", prodIdLst));
+ var downProdRst = WXProdNoCheckEditHelper.DownProd(shop, string.Join(",", prodIdLst));
Thread.Sleep(Randomx.GetId(1000, 1500));
if (!downProdRst.Contains("\"code\":0"))
{
@@ -1411,7 +1411,7 @@ namespace TemuKJD.WXForms.ProductForms
prodIdLst.Add(prodId);
}
- var downProdRst = WXPreSale.DelProd(shop, string.Join(",", prodIdLst));
+ var downProdRst = WXProdNoCheckEditHelper.DelProd(shop, string.Join(",", prodIdLst));
Thread.Sleep(Randomx.GetId(1000, 1500));
if (!downProdRst.Contains("\"code\":0"))
{
@@ -1572,7 +1572,7 @@ namespace TemuKJD.WXForms.ProductForms
prodIdLst.Add(prodId);
}
- var downProdRst = WXPreSale.RealDelProd(shop, string.Join(",", prodIdLst));
+ var downProdRst = WXProdNoCheckEditHelper.RealDelProd(shop, string.Join(",", prodIdLst));
Thread.Sleep(Randomx.GetId(1000, 1500));
if (!downProdRst.Contains("\"code\":0"))
{
@@ -2090,8 +2090,70 @@ namespace TemuKJD.WXForms.ProductForms
}
}
- public class WXPreSale
+ public class WXProdNoCheckEditHelper
{
+ public static List LastName { get; set; } = new List()
+ {
+ "赵", "钱", "孙", "李", "周", "吴", "郑", "王", "冯", "陈", "沈", "杨", "朱", "许", "何", "张",
+ };
+
+ public static Dictionary dicShopAddressId { get; set; } = new Dictionary();
+
+ ///
+ /// 上海仓退货订单地址
+ ///
+ ///
+ ///
+ ///
+ public static string SetShanghaiReturnOrderAddress(ShopLoginInfo shop, string afterSaleDetail = "真如镇街道真北路2653弄F区808号楼")
+ {
+ if (dicShopAddressId.ContainsKey(shop.ShopId))
+ {
+ return "{\"success\":true}";
+ }
+
+ //收件人:百家姓随机
+ //手机号:13024622251(马老师手机号)
+ //上海市普陀区真如镇街道真北路2653弄Z区zt
+ //上海上海市普陀区真如镇街道真北路2653弄F区808号楼
+ var addressRst = WXUpload.getAddress(shop, afterSaleDetail);
+ if (!addressRst.Contains("\"code\":0") && !addressRst.Contains("\"success\":true"))
+ {
+ var error = BaseRegex.GetStringJson(ref addressRst, "msg");
+ if (string.IsNullOrEmpty(error))
+ error = addressRst;
+ return "{\"success\":false,\"errMsg\":\"售后地址获取失败 " + error + "\"}";
+ }
+ if (addressRst.Contains("\"totalNum\":0") && !string.IsNullOrEmpty(afterSaleDetail))
+ {
+ string provinceName = "上海市";
+ string cityName = "上海市";
+ string countyName = "普陀区";
+ string detailInfo = afterSaleDetail;
+ string userName = "29供货商"; //LastName[Randomx.GetId(LastName.Count)] + (Randomx.GetId(2) == 0 ? "先生" : "女士");
+ string telNumber = "13024622251";
+ var addAddRst = WXUpload.addAddress(shop, provinceName, cityName, countyName, detailInfo, userName, telNumber);
+
+ Thread.Sleep(Randomx.GetId(500, 1000));
+
+ addressRst = WXUpload.getAddress(shop, afterSaleDetail);
+ if (!addressRst.Contains("\"code\":0") && !addressRst.Contains("\"success\":true"))
+ {
+ var error = BaseRegex.GetStringJson(ref addressRst, "msg");
+ if (string.IsNullOrEmpty(error))
+ error = addressRst;
+ return "{\"success\":false,\"errMsg\":\"售后地址添加失败 " + error + "\"}";
+ }
+ }
+ var addressId = BaseRegex.GetStringJson(ref addressRst, "addressId");
+ if (!addressId.IsNullOrEmpty())
+ {
+ dicShopAddressId[shop.ShopId] = addressId;
+ return "{\"success\":true}";
+ }
+ return "{\"success\":false,\"地址解析失败\"}";
+ }
+
///
/// -1 全部 5 在售 11 下架
///
@@ -2204,5 +2266,7 @@ namespace TemuKJD.WXForms.ProductForms
var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer);
return result;
}
+
+
}
}
diff --git a/TEMUKJD/WXForms/ProductForms/WXProdSyncForm.cs b/TEMUKJD/WXForms/ProductForms/WXProdSyncForm.cs
index c6a7167..3adf81a 100644
--- a/TEMUKJD/WXForms/ProductForms/WXProdSyncForm.cs
+++ b/TEMUKJD/WXForms/ProductForms/WXProdSyncForm.cs
@@ -457,9 +457,9 @@ namespace TemuKJD.WXForms.ProductForms
string getProdOnSaleRst = "";
if (string.IsNullOrEmpty(PreType) && sortType == null)
- getProdOnSaleRst = WXPreSale.scanProductPreview(shop, page, nextKey, pageSize);
+ getProdOnSaleRst = WXProdNoCheckEditHelper.scanProductPreview(shop, page, nextKey, pageSize);
else
- getProdOnSaleRst = WXPreSale.searchProduct(shop, page, null, pageSize, sortType);
+ getProdOnSaleRst = WXProdNoCheckEditHelper.searchProduct(shop, page, null, pageSize, sortType);
Thread.Sleep(Randomx.GetId(50, 100));
if (!getProdOnSaleRst.Contains("\"success\":true"))
{
@@ -1197,7 +1197,7 @@ namespace TemuKJD.WXForms.ProductForms
if (chkFailDownProd.Checked)
{
- var downProd = WXPreSale.DownProd(shop, prodId);
+ var downProd = WXProdNoCheckEditHelper.DownProd(shop, prodId);
System.Threading.Thread.Sleep(Randomx.GetId(50, 100));
if (downProd.Contains("\"code\":0"))
{
diff --git a/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.cs b/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.cs
index 3946953..57b159a 100644
--- a/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.cs
+++ b/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.cs
@@ -414,7 +414,7 @@ namespace TemuKJD.WXForms.ShopForms
return;
}
- var prodLstRst = WXPreSale.scanProductPreview(shop, 1, "", 20);
+ var prodLstRst = WXProdNoCheckEditHelper.scanProductPreview(shop, 1, "", 20);
System.Threading.Thread.Sleep(Randomx.GetId(50, 100));
if (prodLstRst.Contains("\"success\":true"))
{