研究微信免审上架,其他一些功能优化

This commit is contained in:
wule committed 2026-01-21 19:13:58 +08:00
1 parent 42be98616b
commit 6d7b9d7b56
13 files changed
+812 -209

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 793;
public static int VersionCount = 798;
//public static int VersionCount = 613;
/// <summary>
@@ -34,6 +34,13 @@ namespace AllBase.Model.Param.WXParam
public List<productSkuParam> productSkus { get; set; } = new List<productSkuParam>();
public int? categoryType { get; set; } = 2;
public bool? isGoodsSpecialCategory { get; set; } = true;
public productDeliverInfoParam deliverInfo { get; set; }
}
public class productDeliverInfoParam
{
public skuDeliverInfoParam skuDeliverInfo { get; set; }
public int? deliverType { get; set; }
}
public class productSkuParam
@@ -57,8 +64,52 @@ namespace AllBase.Model.Param.WXParam
public stockInfoParam stockInfo { get; set; } = new stockInfoParam();
public List<saleParamParam> saleParam { get; set; } = new List<saleParamParam>();
public skuDeliverInfoParam skuDeliverInfo { get; set; } = new skuDeliverInfoParam();
public realStockInfoParam realStockInfo { get; set; }
public stockDiffParam stockDiff { get; set; } = new stockDiffParam();
}
public class realStockInfoParam
{
public List<object> warehouseStocks { get; set; } = new List<object>();
public int? stockNum { get; set; } = 999;
public string lockStock { get; set; } = "0";
public string soldStock { get; set; } = "0";
public string limitedDiscountStockNum { get; set; } = "0";
public string groupbuyStockNum { get; set; } = "0";
public string overSoldNum { get; set; } = "0";
public int? totalNum { get; set; } = 999;
public string totalLock { get; set; } = "0";
public string totalSold { get; set; } = "0";
public int? finderTotalNum { get; set; } = 0;
public string finderTotalLock { get; set; } = "0";
public string finderTotalSold { get; set; } = "0";
public string exclusiveNum { get; set; } = "0";
public string exclusiveLock { get; set; } = "0";
public string exclusiveSold { get; set; } = "0";
public string lockedOver { get; set; } = "0";
public string soldOver { get; set; } = "0";
public string limitedDiscountLockedOver { get; set; } = "0";
public string limitedDiscountSoldOver { get; set; } = "0";
public string exclusiveLockOver { get; set; } = "0";
public string exclusiveSoldOver { get; set; } = "0";
public string mmecwxaNormalStockNum { get; set; } = "0";
public string mmecwxaNormalLockStock { get; set; } = "0";
public string mmecwxaNormalSoldStock { get; set; } = "0";
public string mmecwxaLimitedDiscountStockNum { get; set; } = "0";
public string mmecwxaLimitedDiscountLockStock { get; set; } = "0";
public string mmecwxaLimitedDiscountSoldStock { get; set; } = "0";
public string mmecwxaExclusiveStockNum { get; set; } = "0";
public string mmecwxaExclusiveLockStock { get; set; } = "0";
public string mmecwxaExclusiveSoldStock { get; set; } = "0";
public string giftTotalNum { get; set; } = "0";
public string giftTotalLocked { get; set; } = "0";
public string giftTotalSold { get; set; } = "0";
public string uniqueId { get; set; } = "";
public int? stockType { get; set; } = 0;
public int? zeroStockType { get; set; } = 0;
}
public class stockDiffParam
{
public int? diffType { get; set; } = 2;
@@ -75,7 +126,7 @@ namespace AllBase.Model.Param.WXParam
public int? spotDeliveryTime { get; set; } = 1;
public string fullPaymentPresaleDeliveryTime { get; set; } = "0";
public int? spotAfterPresaleEnd { get; set; } = 0;
public int? deliverType { get; set; }
}
public class saleParamParam
@@ -461,7 +512,7 @@ namespace AllBase.Model.Param.WXParam
public class skuListParam
{
public skuInfoParam skuInfo { get; set; }
public List<skuInfoParam> skuInfo { get; set; }
public int? minPrice { get; set; } // 10000,
public int? maxPrice { get; set; } // 10000,
public int? discountedPrice { get; set; } = 0;
@@ -1139,7 +1139,7 @@
this.cmbSearchYear.Items.AddRange(new object[] {
"2025",
"2026"});
this.cmbSearchYear.Location = new System.Drawing.Point(1017, 8);
this.cmbSearchYear.Location = new System.Drawing.Point(1017, 11);
this.cmbSearchYear.Margin = new System.Windows.Forms.Padding(0);
this.cmbSearchYear.Name = "cmbSearchYear";
this.cmbSearchYear.Size = new System.Drawing.Size(55, 25);
@@ -1154,7 +1154,7 @@
"全部",
"重上",
"已买"});
this.cmbUserNotes.Location = new System.Drawing.Point(927, 11);
this.cmbUserNotes.Location = new System.Drawing.Point(927, 8);
this.cmbUserNotes.Margin = new System.Windows.Forms.Padding(0);
this.cmbUserNotes.Name = "cmbUserNotes";
this.cmbUserNotes.Size = new System.Drawing.Size(52, 25);
@@ -1171,7 +1171,7 @@
"核价成功",
"核价成功(重复)",
"重复"});
this.cmbNotes.Location = new System.Drawing.Point(813, 11);
this.cmbNotes.Location = new System.Drawing.Point(813, 8);
this.cmbNotes.Margin = new System.Windows.Forms.Padding(0);
this.cmbNotes.Name = "cmbNotes";
this.cmbNotes.Size = new System.Drawing.Size(52, 25);
@@ -1198,7 +1198,7 @@
"已上传",
"草稿箱",
"全部"});
this.cmbStatus.Location = new System.Drawing.Point(723, 11);
this.cmbStatus.Location = new System.Drawing.Point(723, 8);
this.cmbStatus.Margin = new System.Windows.Forms.Padding(0);
this.cmbStatus.Name = "cmbStatus";
this.cmbStatus.Size = new System.Drawing.Size(52, 25);
+9 -2
View File
@@ -207,6 +207,13 @@ namespace TemuKJD
//settings.CefCommandLineArgs.Add("disable-features", "NetworkService,NetworkServiceInProcess");
settings.CefCommandLineArgs.Add("--disable-web-security", "1");
//settings.CefCommandLineArgs.Add("--disable-request-handling-for-testing", "1");
#if DEBUG
settings.LogFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "cef_log.txt");
// 设置日志级别为详细
settings.LogSeverity = LogSeverity.Verbose;
// 捕获JavaScript异常堆栈(最多32帧)
settings.UncaughtExceptionStackSize = 32;
#endif
Cef.Initialize(settings);
}
@@ -436,7 +443,7 @@ namespace TemuKJD
return true;
}
#region 内存回收
#region 内存回收
[DllImport("kernel32.dll", EntryPoint = "SetProcessWorkingSetSize")]
public static extern int SetProcessWorkingSetSize(IntPtr process, int minSize, int maxSize);
[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
@@ -454,7 +461,7 @@ namespace TemuKJD
SetProcessWorkingSetSize(System.Diagnostics.Process.GetCurrentProcess().Handle, -1, -1);
}
}
#endregion
#endregion
/// <summary>
/// 通过click事件初始化所有模块,避免首次用户点击一级模块时客户端出现卡顿现象
+18 -18
View File
@@ -37,7 +37,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.txtAddTimes = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.txtAddMorePrice = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.lblSinglePriceAdd = new System.Windows.Forms.Label();
this.txtSinglePriceAdd = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.lblClose = new System.Windows.Forms.Label();
@@ -54,14 +54,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.flowLayoutPanel1.Controls.Add(this.txtAddTimes);
this.flowLayoutPanel1.Controls.Add(this.label10);
this.flowLayoutPanel1.Controls.Add(this.txtAddMorePrice);
this.flowLayoutPanel1.Controls.Add(this.label11);
this.flowLayoutPanel1.Controls.Add(this.lblSinglePriceAdd);
this.flowLayoutPanel1.Controls.Add(this.txtSinglePriceAdd);
this.flowLayoutPanel1.Controls.Add(this.label1);
this.flowLayoutPanel1.Controls.Add(this.lblClose);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(336, 18);
this.flowLayoutPanel1.Size = new System.Drawing.Size(420, 23);
this.flowLayoutPanel1.TabIndex = 0;
//
// txtPriceStart
@@ -141,21 +141,21 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.txtAddMorePrice.Text = "5.0";
this.txtAddMorePrice.TextChanged += new System.EventHandler(this.Price_TextChanged);
//
// label11
// lblSinglePriceAdd
//
this.label11.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(0, 26);
this.label11.Margin = new System.Windows.Forms.Padding(0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(68, 17);
this.label11.TabIndex = 548;
this.label11.Text = "元,单买加";
this.lblSinglePriceAdd.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblSinglePriceAdd.AutoSize = true;
this.lblSinglePriceAdd.Location = new System.Drawing.Point(284, 3);
this.lblSinglePriceAdd.Margin = new System.Windows.Forms.Padding(0);
this.lblSinglePriceAdd.Name = "lblSinglePriceAdd";
this.lblSinglePriceAdd.Size = new System.Drawing.Size(68, 17);
this.lblSinglePriceAdd.TabIndex = 548;
this.lblSinglePriceAdd.Text = "元,单买加";
//
// txtSinglePriceAdd
//
this.txtSinglePriceAdd.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.txtSinglePriceAdd.Location = new System.Drawing.Point(68, 23);
this.txtSinglePriceAdd.Location = new System.Drawing.Point(352, 0);
this.txtSinglePriceAdd.Margin = new System.Windows.Forms.Padding(0);
this.txtSinglePriceAdd.Name = "txtSinglePriceAdd";
this.txtSinglePriceAdd.Size = new System.Drawing.Size(31, 23);
@@ -167,7 +167,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(99, 26);
this.label1.Location = new System.Drawing.Point(383, 3);
this.label1.Margin = new System.Windows.Forms.Padding(0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(20, 17);
@@ -180,7 +180,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.lblClose.AutoSize = true;
this.lblClose.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblClose.ForeColor = System.Drawing.SystemColors.HotTrack;
this.lblClose.Location = new System.Drawing.Point(119, 26);
this.lblClose.Location = new System.Drawing.Point(403, 3);
this.lblClose.Margin = new System.Windows.Forms.Padding(0);
this.lblClose.Name = "lblClose";
this.lblClose.Size = new System.Drawing.Size(17, 17);
@@ -196,7 +196,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.MinimumSize = new System.Drawing.Size(0, 20);
this.Name = "UcAddPrice";
this.Size = new System.Drawing.Size(336, 18);
this.Size = new System.Drawing.Size(420, 23);
this.Load += new System.EventHandler(this.UcAddPrice_Load);
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
@@ -209,7 +209,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.TextBox txtPriceEnd;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtAddMorePrice;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtAddTimes;
@@ -217,7 +216,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.Label lblPrice;
private System.Windows.Forms.TextBox txtPriceStart;
public System.Windows.Forms.Label lblClose;
private System.Windows.Forms.TextBox txtSinglePriceAdd;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.Label lblSinglePriceAdd;
public System.Windows.Forms.TextBox txtSinglePriceAdd;
}
}
+31 -5
View File
@@ -46,6 +46,8 @@
this.chkCloseAfterLogin = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.txtAddress = new System.Windows.Forms.TextBox();
this.btnNext = new System.Windows.Forms.Button();
this.btnPrev = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -85,7 +87,7 @@
this.splitContainer1.Panel2.Controls.Add(this.btnReload);
this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin);
this.splitContainer1.Size = new System.Drawing.Size(1438, 736);
this.splitContainer1.SplitterDistance = 669;
this.splitContainer1.SplitterDistance = 670;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4;
//
@@ -312,6 +314,8 @@
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.btnNext);
this.splitContainer2.Panel1.Controls.Add(this.btnPrev);
this.splitContainer2.Panel1.Controls.Add(this.txtAddress);
//
// splitContainer2.Panel2
@@ -325,21 +329,41 @@
//
this.txtAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtAddress.Location = new System.Drawing.Point(3, 3);
this.txtAddress.Location = new System.Drawing.Point(67, 3);
this.txtAddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtAddress.Name = "txtAddress";
this.txtAddress.Size = new System.Drawing.Size(1432, 23);
this.txtAddress.Size = new System.Drawing.Size(1368, 23);
this.txtAddress.TabIndex = 7;
this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown);
//
// PDDShopLoginForm
// btnNext
//
this.btnNext.Location = new System.Drawing.Point(34, 2);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(32, 23);
this.btnNext.TabIndex = 11;
this.btnNext.Text = "→";
this.btnNext.UseVisualStyleBackColor = true;
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
//
// btnPrev
//
this.btnPrev.Location = new System.Drawing.Point(2, 2);
this.btnPrev.Name = "btnPrev";
this.btnPrev.Size = new System.Drawing.Size(32, 23);
this.btnPrev.TabIndex = 10;
this.btnPrev.Text = "←";
this.btnPrev.UseVisualStyleBackColor = true;
this.btnPrev.Click += new System.EventHandler(this.btnPrev_Click);
//
// WXAdminShopLoginForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1440, 800);
this.Controls.Add(this.splitContainer2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "PDDShopLoginForm";
this.Name = "WXAdminShopLoginForm";
this.ShowMaximizeBox = true;
this.Text = "店铺登录";
this.TitleText = "店铺登录";
@@ -380,5 +404,7 @@
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbMultiCookieName;
private DevComponents.DotNetBar.PanelEx btnMultiLogin;
private DevComponents.DotNetBar.PanelEx btnDel;
private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.Button btnPrev;
}
}
@@ -899,5 +899,15 @@ function getElementWithText(sText)
//ReturnPackageDetailForm form = new ReturnPackageDetailForm(this.shop);
//form.ShowDialog();
}
private void btnPrev_Click(object sender, EventArgs e)
{
cefWebBrowser.Back();
}
private void btnNext_Click(object sender, EventArgs e)
{
cefWebBrowser.Forward();
}
}
}
+120 -59
View File
@@ -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;
}
}
+31 -5
View File
@@ -45,6 +45,8 @@
this.btnReload = new TemuKJD.UserControls.ButtonEx();
this.chkCloseAfterLogin = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.btnNext = new System.Windows.Forms.Button();
this.btnPrev = new System.Windows.Forms.Button();
this.txtAddress = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
@@ -85,7 +87,7 @@
this.splitContainer1.Panel2.Controls.Add(this.btnReload);
this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin);
this.splitContainer1.Size = new System.Drawing.Size(1438, 736);
this.splitContainer1.SplitterDistance = 669;
this.splitContainer1.SplitterDistance = 671;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4;
//
@@ -312,6 +314,8 @@
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.btnNext);
this.splitContainer2.Panel1.Controls.Add(this.btnPrev);
this.splitContainer2.Panel1.Controls.Add(this.txtAddress);
//
// splitContainer2.Panel2
@@ -321,25 +325,45 @@
this.splitContainer2.SplitterDistance = 26;
this.splitContainer2.TabIndex = 5;
//
// btnNext
//
this.btnNext.Location = new System.Drawing.Point(35, 3);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(32, 23);
this.btnNext.TabIndex = 9;
this.btnNext.Text = "→";
this.btnNext.UseVisualStyleBackColor = true;
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
//
// btnPrev
//
this.btnPrev.Location = new System.Drawing.Point(3, 3);
this.btnPrev.Name = "btnPrev";
this.btnPrev.Size = new System.Drawing.Size(32, 23);
this.btnPrev.TabIndex = 8;
this.btnPrev.Text = "←";
this.btnPrev.UseVisualStyleBackColor = true;
this.btnPrev.Click += new System.EventHandler(this.btnPrev_Click);
//
// txtAddress
//
this.txtAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtAddress.Location = new System.Drawing.Point(3, 3);
this.txtAddress.Location = new System.Drawing.Point(68, 3);
this.txtAddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtAddress.Name = "txtAddress";
this.txtAddress.Size = new System.Drawing.Size(1432, 23);
this.txtAddress.Size = new System.Drawing.Size(1367, 23);
this.txtAddress.TabIndex = 7;
this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown);
//
// PDDShopLoginForm
// WXShopLoginForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1440, 800);
this.Controls.Add(this.splitContainer2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "PDDShopLoginForm";
this.Name = "WXShopLoginForm";
this.ShowMaximizeBox = true;
this.Text = "店铺登录";
this.TitleText = "店铺登录";
@@ -380,5 +404,7 @@
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbMultiCookieName;
private DevComponents.DotNetBar.PanelEx btnMultiLogin;
private DevComponents.DotNetBar.PanelEx btnDel;
private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.Button btnPrev;
}
}
@@ -424,6 +424,44 @@ namespace TemuKJD.WXForms.ShopForms
//public Func<object, string, string, request, bool> BeforeResourceLoadEvent; // sender, requestUrl, postData, request, true(表示取消执行)
private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request)
{
if (url.Contains("listingAuditFree") /*|| url.Contains("uploadPartBinary")*/)
{
//////postData = JsonHelper.SerializeObject(jObj);
//////postData = postData.Replace("999", "1005");
//string elements1 = "";
//string elements2 = "";
//string elements3 = "";
//if (request.PostData.Elements.Count > 0)
//{
// elements1 = Encoding.UTF8.GetString(request.PostData.Elements[0].Bytes);
// JObject jData = JsonHelper.JObjectParse(postData);
// string prodInfo = jData["data"].ParseToString();
// JObject jProdInfo = JsonHelper.JObjectParse(prodInfo);
// var prodId = BaseRegex.GetStringJson(ref prodInfo, "productId");
// //prodId = "10000468999806";
// var getEditProd = ProductForms.WXUpload.getEditProductV2(shop, prodId);
// JObject jEditProd = JsonHelper.JObjectParse(getEditProd);
// jProdInfo["product"] = jEditProd["product"];
// jData["data"] = JsonHelper.SerializeObject(jProdInfo);
// var postJson = JsonHelper.SerializeObject(jData);
// //request.PostData.Elements[0].Bytes = System.Text.Encoding.UTF8.GetBytes(postJson.Replace("999", "333"));
// //request.PostData.Elements[0].Bytes = System.Text.Encoding.UTF8.GetBytes(postData.Replace("999", "333"));
// request.PostData.Elements[0].Bytes = System.Text.Encoding.UTF8.GetBytes(postJson);
// //request.PostData.Elements[0].Bytes = System.Text.Encoding.UTF8.GetBytes(getEditProd);
// //request.PostData.Elements[0].Bytes = System.Text.Encoding.UTF8.GetBytes(elements1.Replace("999", "1099"));
//}
//if (request.PostData.Elements.Count > 1 && request.PostData.Elements[1].Bytes != null)
//{
// elements2 = Encoding.UTF8.GetString(request.PostData.Elements[1].Bytes);
//}
//if (request.PostData.Elements.Count > 2 && request.PostData.Elements[2].Bytes != null)
//{
// elements3 = Encoding.UTF8.GetString(request.PostData.Elements[2].Bytes);
//}
}
return false;
}
@@ -915,5 +953,15 @@ function getElementWithText(sText)
//ReturnPackageDetailForm form = new ReturnPackageDetailForm(this.shop);
//form.ShowDialog();
}
private void btnPrev_Click(object sender, EventArgs e)
{
cefWebBrowser.Back();
}
private void btnNext_Click(object sender, EventArgs e)
{
cefWebBrowser.Forward();
}
}
}
+91 -73
View File
@@ -46,6 +46,14 @@ namespace TemuKJD.WXForms.TalkForms
this.chkIsAutoReply = new System.Windows.Forms.CheckBox();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new TemuKJD.UserComponent.UcDataGridViewCheckBoxColumn(this.components);
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pnlRefresh = new DevComponents.DotNetBar.PanelEx();
this.ucTabControl1 = new TemuKJD.UserComponent.UcTabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
@@ -61,14 +69,7 @@ namespace TemuKJD.WXForms.TalkForms
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewLinkColumn2 = new System.Windows.Forms.DataGridViewLinkColumn();
this.colSelect = new TemuKJD.UserComponent.UcDataGridViewCheckBoxColumn(this.components);
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pbLoading = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pbLogo)).BeginInit();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@@ -87,6 +88,7 @@ namespace TemuKJD.WXForms.TalkForms
this.ucTabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
this.SuspendLayout();
//
// pbLogo
@@ -96,7 +98,7 @@ namespace TemuKJD.WXForms.TalkForms
// lblVersionName
//
this.lblVersionName.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblVersionName.Location = new System.Drawing.Point(3927, 33);
this.lblVersionName.Location = new System.Drawing.Point(4995, 33);
//
// panel3
//
@@ -281,6 +283,7 @@ namespace TemuKJD.WXForms.TalkForms
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.pbLoading);
this.splitContainer4.Panel1.Controls.Add(this.dgvShop);
//
// splitContainer4.Panel2
@@ -328,6 +331,72 @@ namespace TemuKJD.WXForms.TalkForms
this.dgvShop.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellClick);
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
// colSelect
//
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 28;
//
// colShopLoginName
//
this.colShopLoginName.HeaderText = "店铺登录名";
this.colShopLoginName.Name = "colShopLoginName";
this.colShopLoginName.ReadOnly = true;
this.colShopLoginName.Visible = false;
//
// colShopId
//
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
this.colShopId.Visible = false;
this.colShopId.Width = 55;
//
// colShopName
//
this.colShopName.FillWeight = 150F;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 70;
//
// colShopNotes
//
this.colShopNotes.HeaderText = "分组";
this.colShopNotes.Name = "colShopNotes";
this.colShopNotes.ReadOnly = true;
this.colShopNotes.Width = 70;
//
// colLoginStatus
//
this.colLoginStatus.HeaderText = "状态";
this.colLoginStatus.Name = "colLoginStatus";
this.colLoginStatus.ReadOnly = true;
this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLoginStatus.Width = 38;
//
// colCanUse
//
this.colCanUse.HeaderText = "可用";
this.colCanUse.Name = "colCanUse";
this.colCanUse.ReadOnly = true;
this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCanUse.Visible = false;
this.colCanUse.Width = 28;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Width = 120;
//
// pnlRefresh
//
this.pnlRefresh.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -351,6 +420,7 @@ namespace TemuKJD.WXForms.TalkForms
this.pnlRefresh.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.pnlRefresh.TabIndex = 188;
this.pnlRefresh.Text = "刷 新 店 铺";
this.pnlRefresh.Click += new System.EventHandler(this.pnlRefresh_Click);
//
// ucTabControl1
//
@@ -478,71 +548,17 @@ namespace TemuKJD.WXForms.TalkForms
this.dataGridViewLinkColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.dataGridViewLinkColumn2.Width = 106;
//
// colSelect
// pbLoading
//
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 28;
//
// colShopLoginName
//
this.colShopLoginName.HeaderText = "店铺登录名";
this.colShopLoginName.Name = "colShopLoginName";
this.colShopLoginName.ReadOnly = true;
this.colShopLoginName.Visible = false;
//
// colShopId
//
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
this.colShopId.Visible = false;
this.colShopId.Width = 55;
//
// colShopName
//
this.colShopName.FillWeight = 150F;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 70;
//
// colShopNotes
//
this.colShopNotes.HeaderText = "分组";
this.colShopNotes.Name = "colShopNotes";
this.colShopNotes.ReadOnly = true;
this.colShopNotes.Width = 70;
//
// colLoginStatus
//
this.colLoginStatus.HeaderText = "状态";
this.colLoginStatus.Name = "colLoginStatus";
this.colLoginStatus.ReadOnly = true;
this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLoginStatus.Width = 38;
//
// colCanUse
//
this.colCanUse.HeaderText = "可用";
this.colCanUse.Name = "colCanUse";
this.colCanUse.ReadOnly = true;
this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCanUse.Visible = false;
this.colCanUse.Width = 28;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Width = 120;
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(108, 252);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 8;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// WxTalkForm
//
@@ -577,6 +593,7 @@ namespace TemuKJD.WXForms.TalkForms
this.ucTabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
this.ResumeLayout(false);
}
@@ -619,5 +636,6 @@ namespace TemuKJD.WXForms.TalkForms
private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
private System.Windows.Forms.PictureBox pbLoading;
}
}
+11
View File
@@ -799,5 +799,16 @@ namespace TemuKJD.WXForms.TalkForms
SetMainBrowserUrl(shop);
});
}
private void pnlRefresh_Click(object sender, EventArgs e)
{
pbLoading.Visible = true;
Task.Run(() =>
{
WXShopListForm.UpdateShop();
LoadShop();
Invoke(new Action(() => { pbLoading.Visible = false; }));
});
}
}
}