diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index 44d07a6..d4d3c0d 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -27,7 +27,7 @@ namespace AllBase
///
/// 版本ID
///
- public static int VersionCount = 1002;
+ public static int VersionCount = 1006;
//public static int VersionCount = 613;
///
diff --git a/AllBase/Model/Result/PDDResult/PDDActivityResult/ActivityListProdInfo.cs b/AllBase/Model/Result/PDDResult/PDDActivityResult/ActivityListProdInfo.cs
index d8fad47..89573a8 100644
--- a/AllBase/Model/Result/PDDResult/PDDActivityResult/ActivityListProdInfo.cs
+++ b/AllBase/Model/Result/PDDResult/PDDActivityResult/ActivityListProdInfo.cs
@@ -36,8 +36,11 @@ namespace AllBase.Model.Result.PDDResult.PDDActivityResult
public string shopId { get; set; }
public string shopName { get; set; }
+ // 从商品列表获取的商品信息
public PDDShopListProductInfo lstPInfo { get; set; }
+ // 数据库商品原始信息
public KJDDBProduct dbProduct { get; set; }
+ // 数据库商品转换为拼多多格式的商品信息
public PDDProductInfo productInfo { get; set; }
}
}
diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
index 486f7bb..16ab8a0 100644
--- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
+++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
@@ -552,7 +552,12 @@ namespace KJD_Web.BLL.BXX
where += " and (" + multi_search_prod_name.Substring(4) + ")";
}
if (!string.IsNullOrWhiteSpace(search_group))
- where += " and p.group like '%" + search_group + "%'";
+ {
+ if (search_group == "无分组")
+ where += " and (p.group is null or p.group = '')";
+ else
+ where += " and p.group like '%" + search_group + "%'";
+ }
if (!string.IsNullOrWhiteSpace(search_notes))
where += " and p.notes like '%" + search_notes + "%'";
diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.Designer.cs b/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.Designer.cs
index 162f580..c4c76b5 100644
--- a/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.Designer.cs
+++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.Designer.cs
@@ -74,6 +74,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.shopCountColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSaLevel = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSaLevelName = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.colAddShop = new System.Windows.Forms.DataGridViewLinkColumn();
this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn();
this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit();
@@ -131,7 +132,7 @@ namespace TemuKJD.PDDForms.AdminForms
//
this.splitContainer5.Panel2.Controls.Add(this.splitContainer1);
this.splitContainer5.Panel2.Padding = new System.Windows.Forms.Padding(0, 5, 5, 5);
- this.splitContainer5.Size = new System.Drawing.Size(800, 527);
+ this.splitContainer5.Size = new System.Drawing.Size(1270, 527);
this.splitContainer5.SplitterDistance = 357;
this.splitContainer5.SplitterWidth = 1;
this.splitContainer5.TabIndex = 3;
@@ -464,7 +465,7 @@ namespace TemuKJD.PDDForms.AdminForms
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.dgvUser);
- this.splitContainer1.Size = new System.Drawing.Size(437, 517);
+ this.splitContainer1.Size = new System.Drawing.Size(907, 517);
this.splitContainer1.SplitterDistance = 486;
this.splitContainer1.TabIndex = 2;
//
@@ -474,6 +475,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.dgvUser.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+ this.dgvUser.AutoRowNumber = true;
this.dgvUser.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvUser.BackgroundColor = System.Drawing.Color.White;
this.dgvUser.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -496,6 +498,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.shopCountColumn,
this.colSaLevel,
this.colSaLevelName,
+ this.colAddShop,
this.editColumn,
this.deleteColumn});
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
@@ -509,10 +512,11 @@ namespace TemuKJD.PDDForms.AdminForms
this.dgvUser.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvUser.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229)))));
this.dgvUser.Location = new System.Drawing.Point(0, 0);
+ this.dgvUser.MultiSelectCheckBox = true;
this.dgvUser.Name = "dgvUser";
this.dgvUser.ReadOnly = true;
this.dgvUser.RowTemplate.Height = 23;
- this.dgvUser.Size = new System.Drawing.Size(437, 486);
+ this.dgvUser.Size = new System.Drawing.Size(907, 486);
this.dgvUser.TabIndex = 1;
this.dgvUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellContentClick);
//
@@ -574,8 +578,18 @@ namespace TemuKJD.PDDForms.AdminForms
this.colSaLevelName.Name = "colSaLevelName";
this.colSaLevelName.ReadOnly = true;
//
+ // colAddShop
+ //
+ this.colAddShop.FillWeight = 60F;
+ this.colAddShop.HeaderText = "添加店铺";
+ this.colAddShop.Name = "colAddShop";
+ this.colAddShop.ReadOnly = true;
+ this.colAddShop.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+ this.colAddShop.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+ //
// editColumn
//
+ this.editColumn.FillWeight = 60F;
this.editColumn.HeaderText = "编辑";
this.editColumn.Name = "editColumn";
this.editColumn.ReadOnly = true;
@@ -584,17 +598,19 @@ namespace TemuKJD.PDDForms.AdminForms
//
// deleteColumn
//
+ this.deleteColumn.FillWeight = 60F;
this.deleteColumn.HeaderText = "删除";
this.deleteColumn.Name = "deleteColumn";
this.deleteColumn.ReadOnly = true;
//
- // AdminAccountForm
+ // PDDAdminAccountForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
- this.ClientSize = new System.Drawing.Size(800, 527);
+ this.ClientSize = new System.Drawing.Size(1270, 527);
this.Controls.Add(this.splitContainer5);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.Name = "AdminAccountForm";
+ this.KeyPreview = true;
+ this.Name = "PDDAdminAccountForm";
this.Text = "AccountForm";
this.Load += new System.EventHandler(this.MainAccountForm_Load);
this.VisibleChanged += new System.EventHandler(this.MainAccountForm_VisibleChanged);
@@ -655,6 +671,7 @@ namespace TemuKJD.PDDForms.AdminForms
private System.Windows.Forms.DataGridViewTextBoxColumn shopCountColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn colSaLevel;
private System.Windows.Forms.DataGridViewTextBoxColumn colSaLevelName;
+ private System.Windows.Forms.DataGridViewLinkColumn colAddShop;
private System.Windows.Forms.DataGridViewLinkColumn editColumn;
private System.Windows.Forms.DataGridViewLinkColumn deleteColumn;
}
diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.cs b/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.cs
index ae6c7ef..8d05bc0 100644
--- a/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.cs
+++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.cs
@@ -147,6 +147,7 @@ namespace TemuKJD.PDDForms.AdminForms
user.shop_count,
user.sa_level,
user.sa_level_name,
+ "添加店铺",
"编辑",
"删除");
}
@@ -208,6 +209,14 @@ namespace TemuKJD.PDDForms.AdminForms
Delete(uid);
}
}
+ if (columname == "添加店铺")
+ {
+ PDDAdminShopListForm shopListForm = new PDDAdminShopListForm();
+ shopListForm.UserAccountInfo = AllUsers.FirstOrDefault(u => u.user_name == mobile);
+ shopListForm.lblAddToAccount.Visible = true;
+ shopListForm.btnAddToAccount.Visible = true;
+ shopListForm.ShowDialog();
+ }
}
public void Delete(string uid)
diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.resx b/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.resx
index c3a4499..6ba5435 100644
--- a/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.resx
+++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.resx
@@ -144,6 +144,9 @@
True
+
+ True
+
True
diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminShopListForm.Designer.cs b/TEMUKJD/PDDForms/AdminForms/PDDAdminShopListForm.Designer.cs
index 73a03ef..8c7732c 100644
--- a/TEMUKJD/PDDForms/AdminForms/PDDAdminShopListForm.Designer.cs
+++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminShopListForm.Designer.cs
@@ -29,11 +29,11 @@ namespace TemuKJD.PDDForms.AdminForms
///
private void InitializeComponent()
{
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.panel5 = new System.Windows.Forms.Panel();
@@ -67,6 +67,8 @@ namespace TemuKJD.PDDForms.AdminForms
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
+ this.lblAddToAccount = new System.Windows.Forms.Label();
+ this.btnAddToAccount = new DevComponents.DotNetBar.PanelEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -132,7 +134,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Panel2.Margin = new System.Windows.Forms.Padding(4);
this.splitContainer1.Size = new System.Drawing.Size(1273, 610);
- this.splitContainer1.SplitterDistance = 46;
+ this.splitContainer1.SplitterDistance = 81;
this.splitContainer1.TabIndex = 34;
//
// tableLayoutPanel2
@@ -147,7 +149,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel2.Size = new System.Drawing.Size(1273, 46);
+ this.tableLayoutPanel2.Size = new System.Drawing.Size(1273, 81);
this.tableLayoutPanel2.TabIndex = 37;
//
// panel5
@@ -157,12 +159,12 @@ namespace TemuKJD.PDDForms.AdminForms
this.panel5.Controls.Add(this.btnCheck);
this.panel5.Location = new System.Drawing.Point(1010, 3);
this.panel5.Name = "panel5";
- this.panel5.Size = new System.Drawing.Size(260, 40);
+ this.panel5.Size = new System.Drawing.Size(260, 75);
this.panel5.TabIndex = 1;
//
// chkShowDelete
//
- this.chkShowDelete.Anchor = System.Windows.Forms.AnchorStyles.Right;
+ this.chkShowDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkShowDelete.AutoSize = true;
this.chkShowDelete.BackColor = System.Drawing.Color.White;
this.chkShowDelete.Location = new System.Drawing.Point(29, 12);
@@ -207,6 +209,8 @@ namespace TemuKJD.PDDForms.AdminForms
//
// panel4
//
+ this.panel4.Controls.Add(this.lblAddToAccount);
+ this.panel4.Controls.Add(this.btnAddToAccount);
this.panel4.Controls.Add(this.btnSetSubSa);
this.panel4.Controls.Add(this.txtUserName);
this.panel4.Controls.Add(this.label5);
@@ -223,7 +227,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(3, 3);
this.panel4.Name = "panel4";
- this.panel4.Size = new System.Drawing.Size(1001, 40);
+ this.panel4.Size = new System.Drawing.Size(1001, 75);
this.panel4.TabIndex = 0;
//
// btnSetSubSa
@@ -234,18 +238,19 @@ namespace TemuKJD.PDDForms.AdminForms
this.btnSetSubSa.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSetSubSa.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSetSubSa.ForeColor = System.Drawing.Color.White;
- this.btnSetSubSa.Location = new System.Drawing.Point(895, 9);
+ this.btnSetSubSa.Location = new System.Drawing.Point(906, 46);
this.btnSetSubSa.Margin = new System.Windows.Forms.Padding(2);
this.btnSetSubSa.Name = "btnSetSubSa";
this.btnSetSubSa.Size = new System.Drawing.Size(93, 26);
this.btnSetSubSa.TabIndex = 424;
this.btnSetSubSa.Text = "分配二级超管";
this.btnSetSubSa.UseVisualStyleBackColor = false;
+ this.btnSetSubSa.Visible = false;
this.btnSetSubSa.Click += new System.EventHandler(this.btnSetSubSa_Click);
//
// txtUserName
//
- this.txtUserName.Location = new System.Drawing.Point(34, 11);
+ this.txtUserName.Location = new System.Drawing.Point(57, 11);
this.txtUserName.Name = "txtUserName";
this.txtUserName.Size = new System.Drawing.Size(90, 23);
this.txtUserName.TabIndex = 419;
@@ -253,7 +258,7 @@ namespace TemuKJD.PDDForms.AdminForms
// label5
//
this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(1, 14);
+ this.label5.Location = new System.Drawing.Point(24, 14);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(44, 17);
this.label5.TabIndex = 420;
@@ -261,7 +266,7 @@ namespace TemuKJD.PDDForms.AdminForms
//
// txtLoginName
//
- this.txtLoginName.Location = new System.Drawing.Point(185, 11);
+ this.txtLoginName.Location = new System.Drawing.Point(208, 11);
this.txtLoginName.Name = "txtLoginName";
this.txtLoginName.Size = new System.Drawing.Size(90, 23);
this.txtLoginName.TabIndex = 417;
@@ -269,7 +274,7 @@ namespace TemuKJD.PDDForms.AdminForms
// label1
//
this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(128, 14);
+ this.label1.Location = new System.Drawing.Point(151, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(68, 17);
this.label1.TabIndex = 418;
@@ -280,7 +285,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control;
this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty;
- this.pnlEmpty.Location = new System.Drawing.Point(749, 9);
+ this.pnlEmpty.Location = new System.Drawing.Point(507, 10);
this.pnlEmpty.Name = "pnlEmpty";
this.pnlEmpty.Size = new System.Drawing.Size(56, 26);
this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -306,7 +311,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.ForeColor = System.Drawing.Color.White;
- this.btnSearch.Location = new System.Drawing.Point(688, 9);
+ this.btnSearch.Location = new System.Drawing.Point(446, 10);
this.btnSearch.Margin = new System.Windows.Forms.Padding(2);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(56, 26);
@@ -317,7 +322,7 @@ namespace TemuKJD.PDDForms.AdminForms
//
// txtNotes
//
- this.txtNotes.Location = new System.Drawing.Point(589, 11);
+ this.txtNotes.Location = new System.Drawing.Point(207, 43);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(90, 23);
this.txtNotes.TabIndex = 376;
@@ -325,7 +330,7 @@ namespace TemuKJD.PDDForms.AdminForms
// label4
//
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(556, 14);
+ this.label4.Location = new System.Drawing.Point(174, 46);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 17);
this.label4.TabIndex = 377;
@@ -333,7 +338,7 @@ namespace TemuKJD.PDDForms.AdminForms
//
// txtShopName
//
- this.txtShopName.Location = new System.Drawing.Point(462, 11);
+ this.txtShopName.Location = new System.Drawing.Point(57, 43);
this.txtShopName.Name = "txtShopName";
this.txtShopName.Size = new System.Drawing.Size(90, 23);
this.txtShopName.TabIndex = 374;
@@ -341,7 +346,7 @@ namespace TemuKJD.PDDForms.AdminForms
// label3
//
this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(417, 14);
+ this.label3.Location = new System.Drawing.Point(12, 46);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 17);
this.label3.TabIndex = 375;
@@ -349,7 +354,7 @@ namespace TemuKJD.PDDForms.AdminForms
//
// txtShopId
//
- this.txtShopId.Location = new System.Drawing.Point(323, 11);
+ this.txtShopId.Location = new System.Drawing.Point(346, 11);
this.txtShopId.Name = "txtShopId";
this.txtShopId.Size = new System.Drawing.Size(90, 23);
this.txtShopId.TabIndex = 372;
@@ -357,7 +362,7 @@ namespace TemuKJD.PDDForms.AdminForms
// label2
//
this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(279, 14);
+ this.label2.Location = new System.Drawing.Point(302, 14);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(55, 17);
this.label2.TabIndex = 373;
@@ -385,15 +390,15 @@ namespace TemuKJD.PDDForms.AdminForms
this.splitContainer2.Panel2.Controls.Add(this.chkAutoDrag);
this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
- this.splitContainer2.Size = new System.Drawing.Size(1273, 560);
- this.splitContainer2.SplitterDistance = 531;
+ this.splitContainer2.Size = new System.Drawing.Size(1273, 525);
+ this.splitContainer2.SplitterDistance = 496;
this.splitContainer2.TabIndex = 0;
//
// 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(611, 240);
+ this.pbLoading.Location = new System.Drawing.Point(611, 223);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -407,7 +412,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.pnlAddProdRemaining.Controls.Add(this.lblShopId);
this.pnlAddProdRemaining.Controls.Add(this.panel2);
this.pnlAddProdRemaining.Controls.Add(this.lblAddProdRemaining);
- this.pnlAddProdRemaining.Location = new System.Drawing.Point(399, 70);
+ this.pnlAddProdRemaining.Location = new System.Drawing.Point(399, 53);
this.pnlAddProdRemaining.Name = "pnlAddProdRemaining";
this.pnlAddProdRemaining.Size = new System.Drawing.Size(474, 146);
this.pnlAddProdRemaining.TabIndex = 7;
@@ -507,19 +512,20 @@ namespace TemuKJD.PDDForms.AdminForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
- dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
- this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+ dataGridViewCellStyle6.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
+ this.dgvShop.AutoRowNumber = true;
this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
- dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
- dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
- dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
- this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+ dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
+ dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
+ dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -553,11 +559,12 @@ namespace TemuKJD.PDDForms.AdminForms
this.colDelete});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(4, 0);
+ this.dgvShop.MultiSelectCheckBox = true;
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.ShowCellErrors = false;
- this.dgvShop.Size = new System.Drawing.Size(1265, 531);
+ this.dgvShop.Size = new System.Drawing.Size(1265, 496);
this.dgvShop.TabIndex = 5;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
this.dgvShop.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvShop_CellMouseDown);
@@ -599,6 +606,41 @@ namespace TemuKJD.PDDForms.AdminForms
this.statusBar.Size = new System.Drawing.Size(1273, 25);
this.statusBar.TabIndex = 1;
//
+ // lblAddToAccount
+ //
+ this.lblAddToAccount.AutoSize = true;
+ this.lblAddToAccount.Location = new System.Drawing.Point(755, 15);
+ this.lblAddToAccount.Name = "lblAddToAccount";
+ this.lblAddToAccount.Size = new System.Drawing.Size(68, 17);
+ this.lblAddToAccount.TabIndex = 461;
+ this.lblAddToAccount.Text = "指定账号:";
+ this.lblAddToAccount.Visible = false;
+ //
+ // btnAddToAccount
+ //
+ this.btnAddToAccount.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAddToAccount.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.btnAddToAccount.DisabledBackColor = System.Drawing.Color.Empty;
+ this.btnAddToAccount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btnAddToAccount.Location = new System.Drawing.Point(598, 12);
+ this.btnAddToAccount.Name = "btnAddToAccount";
+ this.btnAddToAccount.Size = new System.Drawing.Size(153, 23);
+ this.btnAddToAccount.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnAddToAccount.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnAddToAccount.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnAddToAccount.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.btnAddToAccount.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+ this.btnAddToAccount.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
+ this.btnAddToAccount.Style.ForeColor.Color = System.Drawing.Color.White;
+ this.btnAddToAccount.Style.GradientAngle = 90;
+ this.btnAddToAccount.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnAddToAccount.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnAddToAccount.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnAddToAccount.TabIndex = 460;
+ this.btnAddToAccount.Text = "选中店铺添加到指定账号";
+ this.btnAddToAccount.Visible = false;
+ this.btnAddToAccount.Click += new System.EventHandler(this.btnAddToAccount_Click);
+ //
// colSelect
//
this.colSelect.FillWeight = 26F;
@@ -636,8 +678,8 @@ namespace TemuKJD.PDDForms.AdminForms
//
// colMinus
//
- dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
- this.colMinus.DefaultCellStyle = dataGridViewCellStyle3;
+ dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+ this.colMinus.DefaultCellStyle = dataGridViewCellStyle8;
this.colMinus.FillWeight = 15F;
this.colMinus.HeaderText = "-";
this.colMinus.Name = "colMinus";
@@ -646,21 +688,23 @@ namespace TemuKJD.PDDForms.AdminForms
//
// colProductRemaining
//
- dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
- this.colProductRemaining.DefaultCellStyle = dataGridViewCellStyle4;
+ dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+ this.colProductRemaining.DefaultCellStyle = dataGridViewCellStyle9;
this.colProductRemaining.FillWeight = 30F;
this.colProductRemaining.HeaderText = "选品限额";
this.colProductRemaining.Name = "colProductRemaining";
this.colProductRemaining.ReadOnly = true;
+ this.colProductRemaining.Visible = false;
//
// colPlus
//
- dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
- this.colPlus.DefaultCellStyle = dataGridViewCellStyle5;
+ dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+ this.colPlus.DefaultCellStyle = dataGridViewCellStyle10;
this.colPlus.FillWeight = 15F;
this.colPlus.HeaderText = "+";
this.colPlus.Name = "colPlus";
this.colPlus.ReadOnly = true;
+ this.colPlus.Visible = false;
//
// colCookie
//
@@ -848,6 +892,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.ClientSize = new System.Drawing.Size(1273, 610);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.KeyPreview = true;
this.Name = "PDDAdminShopListForm";
this.Text = "AdminShopForm";
this.Load += new System.EventHandler(this.AdminShopForm_Load);
@@ -911,6 +956,8 @@ namespace TemuKJD.PDDForms.AdminForms
private DevComponents.DotNetBar.PanelEx btnRemainOK;
private DevComponents.DotNetBar.PanelEx pnlCancel;
private System.Windows.Forms.Label lblShopId;
+ public System.Windows.Forms.Label lblAddToAccount;
+ public DevComponents.DotNetBar.PanelEx btnAddToAccount;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminShopListForm.cs b/TEMUKJD/PDDForms/AdminForms/PDDAdminShopListForm.cs
index 37c3a34..d596d2f 100644
--- a/TEMUKJD/PDDForms/AdminForms/PDDAdminShopListForm.cs
+++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminShopListForm.cs
@@ -27,6 +27,7 @@ namespace TemuKJD.PDDForms.AdminForms
public partial class PDDAdminShopListForm : BaseForm
{
static PDDAdminShopListForm inst = null;
+ public SubAccountInfo UserAccountInfo { get; set; } = null;
public static PDDAdminShopListForm Instance
{
get { if (inst == null) inst = new PDDAdminShopListForm(); return inst; }
@@ -61,6 +62,11 @@ namespace TemuKJD.PDDForms.AdminForms
dgvShop.Columns["colSubSa"].Visible = false;
btnSetSubSa.Visible = false;
}
+
+ if (UserAccountInfo != null)
+ {
+ this.lblAddToAccount.Text = "当前指定账号:" + UserAccountInfo.user_name + "(" + UserAccountInfo.nick_name + ")";
+ }
}
bool firstLoad = true;
@@ -648,5 +654,73 @@ namespace TemuKJD.PDDForms.AdminForms
{
this.pnlAddProdRemaining.Visible = false;
}
+
+ private void btnAddToAccount_Click(object sender, EventArgs e)
+ {
+ if (UserAccountInfo != null)
+ {
+ List shopLoginNameList = GetCheckedList().Distinct().ToList();
+ if (!shopLoginNameList.Any())
+ {
+ BaseMsgForm.ShowError("请选择需要添加的店铺");
+ IsOperate = false;
+ return;
+ }
+
+ this.pbLoading.Visible = true;
+ this.statusBar.lblTaskStatus.Text = "正在添加...";
+ this.statusBar.pgbTaskProgress.Maximum = shopLoginNameList.Count;
+ this.statusBar.UpdateProgressBar(0);
+
+ Task.Run(() =>
+ {
+ int successCount = 0;
+ int failCount = 0;
+ int totalCount = shopLoginNameList.Count;
+ foreach (var shopLoginName in shopLoginNameList)
+ {
+ var shop = lstAdminShopInfo.FirstOrDefault(s => s.LoginName == shopLoginName);
+ if (shop == null)
+ continue;
+
+ var url = BaseClass.BuildObjString("shop/admin_add_shop");
+ var data = UserLogin.GetSignaturex() +
+ "&shop_user_name=" + UserAccountInfo.user_name +
+ "&login_name=" + shop.LoginName +
+ "&login_pass=" + shop.Password +
+ "&cookie=" + shop.Cookies +
+ "&cookie2=" + shop.Cookies2 +
+ "&shop_id=" + shop.ShopId +
+ "&shop_account=" + shop.ShopAccount;
+ var html = "";
+ for (int i = 0; i < 3 && !html.Contains("\"code\":200"); i++)
+ {
+ html = GetHtml.PostUtf8(url, data);
+ if (html.Contains("已存在"))
+ break;
+ }
+
+ if (html.Contains("\"code\":200") || html.Contains("已存在"))
+ successCount++;
+ else
+ failCount++;
+ Thread.Sleep(100);
+
+ Invoke(new Action(() =>
+ {
+ this.statusBar.UpdateProgressBar(statusBar.pgbTaskProgress.Value + 1);
+ this.statusBar.UpdateProgressBarStatus("正在添加... 总计:" + totalCount + " 成功:" + successCount + " 失败:" + failCount);
+ }));
+ }
+
+ Invoke(new Action(() =>
+ {
+ this.pbLoading.Visible = false;
+ BaseMsgForm.ShowInfo("添加完成!");
+ this.statusBar.FinishProgressBar("添加完成 总计:" + totalCount + " 成功:" + successCount + " 失败:" + failCount);
+ }));
+ });
+ }
+ }
}
}
diff --git a/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs b/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs
index d64f72a..41ec8fe 100644
--- a/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs
+++ b/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs
@@ -208,7 +208,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms
}
else
{
- row.Cells["colSelect"].Value = !isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse);
+ row.Cells["colSelect"].Value = selectShopId.Contains(shopEntity.ShopId) && canUse;
row.Cells["colShopLoginName"].Value = shopEntity.LoginName;
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
row.Cells["colShopNotes"].Value = shopEntity.Notes;
@@ -2427,7 +2427,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms
List out_goods_sn_list = null;
List skuSns = null;
long? minPrice = null, maxPrice = null;
- string jsonStr = PDDProductUpDownForm.shop_goods_search(shop, goods_id_list, goods_name, out_goods_sn_list, skuSns, isOnsale, minPrice, maxPrice, 1, pageSize);
+ string jsonStr = PDDProductUpDownForm.shop_goods_search(shop, goods_id_list, goods_name, out_goods_sn_list, skuSns, isOnsale, null, minPrice, maxPrice, 1, pageSize);
if (jsonStr.Contains("繁忙") && tryCount < 5)
{
tryCount++;
@@ -2991,7 +2991,9 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms
if (skuInfo.quantity != 0)
skuInfo.quantity = txtStockNum.Text.Trim().ParseToInt();
+ // 聚水潭商品 加邮费×倍率 放前面
var new_multi_price = sku.multi_price + (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
+
// 使用货号价格做基础价
if (chkUseExtCodePrice.Checked && dbProd.ext_code_price > 0)
{
@@ -2999,7 +3001,6 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms
}
skuInfo.multi_price = (new_multi_price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt();
- //skuInfo.price = (sku.price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt();
if (defaultAddPriceRule.AddMorePriceFirst) // 先加后乘
skuInfo.multi_price = ((new_multi_price + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100) * this.txtAddTimes.Text.Trim().ParseToDecimal()).ParseToInt();
skuInfo.price = skuInfo.multi_price + Math.Max(100, this.txtSinglePriceAdd.Text.Trim().ParseToDecimal() * 100).ParseToInt();
@@ -3020,16 +3021,11 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms
}
}
}
- // 聚水潭商品 加邮费×倍率 放前面
- //skuInfo.multi_price += (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
- //skuInfo.price += (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
- if (marketPrice < skuInfo.price + 1000)
+ if (marketPrice < skuInfo.price * 2)
{
- marketPrice = skuInfo.price.ParseToInt() + 1000;
- //pddApi.Data["market_price"] = marketPrice;
+ marketPrice = skuInfo.price.ParseToInt() * 2;
}
-
addPriceSkuInfoLst.Add(skuInfo);
}
}
@@ -3252,18 +3248,21 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms
foreach (var prodParam in prodParamLst)
{
var rws = rowOperateLst.Where(r => prodParam.goods_id == r.Cells["colSpuId"].Value.ParseToLong()).ToList();
+
+ var lowPrice = prodParam.skus.Where(s => s.sku69_code != "yes" && s.quantity_delta != 0).ToList().Min(s => s.multi_price);
+ var highPrice = prodParam.skus.Where(s => s.sku69_code != "yes" && s.quantity_delta != 0).ToList().Max(s => s.multi_price);
+ // sku全部同价不设置低价sku
+ if (lowPrice == highPrice)
+ continue;
+
Invoke(new Action(() =>
{
foreach (var rw in rws) rw.Cells["colOpResult"].Value += " 正在设置低价Sku";
}));
- var lowPrice = prodParam.skus.Where(s => s.sku69_code != "yes" && s.quantity_delta != 0).ToList().Min(s => s.multi_price);
- //var skuTmp = prodParam.skus.Where(s => s.sku69_code != "yes" && s.quantity_delta != 0).ToList().FirstOrDefault(s => s.multi_price == lowPrice);
- //var skuTmpLst = prodParam.skus.Where(s => s.spec[0].spec_id == skuTmp.spec[0].spec_id && s.multi_price == lowPrice).ToList();
var skuTmpLst = prodParam.skus.Where(s => s.multi_price == lowPrice).ToList();
var prodInfo = lstActListProdInfo.FirstOrDefault(a => a.goods_id == prodParam.goods_id).productInfo;
var skuInfos = prodInfo.detail.sku.Where(s => skuTmpLst.Any(st => st.out_sku_sn == s.out_sku_sn)).ToList();
- //var newMultiPrice = skuInfos.Max(s => s.multi_price) + (prodInfo.ship_price * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
var newMultiPrice = skuInfos.Max(s => s.multi_price) + prodInfo.ship_price;
PddEditProdStockQuantity prodQuantity = new PddEditProdStockQuantity();
@@ -3288,7 +3287,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms
}
var mdyQuantityRst = increase_prod_stock_quantity(shop, prodQuantity);
- for (int i = 0; i < 5 && !mdyQuantityRst.Contains("\"success\":true"); i++)
+ for (int i = 0; i < 3 && !mdyQuantityRst.Contains("\"success\":true"); i++)
{
Thread.Sleep(Randomx.GetId(500, 1500));
mdyQuantityRst = increase_prod_stock_quantity(shop, prodQuantity);
@@ -3298,6 +3297,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms
if (!mdyQuantityRst.Contains("\"success\":true") && !mdyQuantityRst.Contains("\"errorMsg\":\"库存未修改\""))
{
goodsIds.Add(prodParam.goods_id);
+
var error = BaseRegex.GetStringJson(ref mdyQuantityRst, "error_msg");
if (string.IsNullOrEmpty(error))
error = mdyQuantityRst;
@@ -3305,13 +3305,14 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms
Invoke(new Action(() =>
{
foreach (var rw in rws)
- rw.Cells["colOpResult"].Value = rw.Cells["colOpResult"].Value.ParseToString().Replace("正在优化商品以报名活动", "商品优化失败 " + error);
+ rw.Cells["colOpResult"].Value = rw.Cells["colOpResult"].Value.ParseToString().Replace("正在设置低价Sku", "设置低价Sku失败 " + error);
}));
continue;
}
}
// 移除修改库存失败的商品
prodParamLst.RemoveAll(p => goodsIds.Contains(p.goods_id));
+ rowOperateLst = rowOperateLst.Where(r => prodParamLst.Any(p => p.goods_id == r.Cells["colSpuId"].Value.ParseToLong())).ToList();
}
string activityRsts = SignActivity(shop, prodParamLst, sign22347, sign20981, sign21365, sign15996, sign23513, sign23730, sign23456);
diff --git a/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.Designer.cs b/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.Designer.cs
index 49eccc4..6d0e68a 100644
--- a/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.Designer.cs
+++ b/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.Designer.cs
@@ -35,8 +35,15 @@ namespace TemuKJD.PDDForms.ProductForms
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
+ this.label10 = new System.Windows.Forms.Label();
+ this.txtLowStock = new System.Windows.Forms.TextBox();
+ this.btnSelectLowStock = new DevComponents.DotNetBar.PanelEx();
+ this.btnSelectNotActivity = new DevComponents.DotNetBar.PanelEx();
this.txtMinPrice = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtMaxPrice = new System.Windows.Forms.TextBox();
@@ -57,10 +64,26 @@ namespace TemuKJD.PDDForms.ProductForms
this.label2 = new System.Windows.Forms.Label();
this.btnDelSelect = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
+ this.btnClearShopFilter = new DevComponents.DotNetBar.PanelEx();
+ this.btnFilter = new DevComponents.DotNetBar.PanelEx();
+ this.txtShopGroupFilter = new System.Windows.Forms.TextBox();
+ this.txtShopNameFilter = new System.Windows.Forms.TextBox();
+ this.label23 = new System.Windows.Forms.Label();
+ this.label22 = new System.Windows.Forms.Label();
this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
+ this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+ 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.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn();
+ this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
+ this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+ this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.panel1 = new System.Windows.Forms.Panel();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
@@ -78,6 +101,7 @@ namespace TemuKJD.PDDForms.ProductForms
this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn();
this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.colResource = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colFavorites = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -91,16 +115,6 @@ namespace TemuKJD.PDDForms.ProductForms
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
- this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
- 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.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn();
- this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
- this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
- this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -152,6 +166,10 @@ namespace TemuKJD.PDDForms.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.label10);
+ this.ucGroupBoxEx2.Controls.Add(this.txtLowStock);
+ this.ucGroupBoxEx2.Controls.Add(this.btnSelectLowStock);
+ this.ucGroupBoxEx2.Controls.Add(this.btnSelectNotActivity);
this.ucGroupBoxEx2.Controls.Add(this.txtMinPrice);
this.ucGroupBoxEx2.Controls.Add(this.label4);
this.ucGroupBoxEx2.Controls.Add(this.txtMaxPrice);
@@ -171,13 +189,81 @@ namespace TemuKJD.PDDForms.ProductForms
this.ucGroupBoxEx2.Controls.Add(this.txtExtCode);
this.ucGroupBoxEx2.Controls.Add(this.label2);
this.ucGroupBoxEx2.Controls.Add(this.btnDelSelect);
- this.ucGroupBoxEx2.Location = new System.Drawing.Point(147, 2);
+ this.ucGroupBoxEx2.Location = new System.Drawing.Point(145, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
- this.ucGroupBoxEx2.Size = new System.Drawing.Size(1212, 140);
+ this.ucGroupBoxEx2.Size = new System.Drawing.Size(1215, 140);
this.ucGroupBoxEx2.TabIndex = 667;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "商品查询";
//
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(829, 35);
+ this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(41, 17);
+ this.label10.TabIndex = 686;
+ this.label10.Text = "库存≤";
+ this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ //
+ // txtLowStock
+ //
+ this.txtLowStock.Location = new System.Drawing.Point(870, 32);
+ this.txtLowStock.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
+ this.txtLowStock.Name = "txtLowStock";
+ this.txtLowStock.Size = new System.Drawing.Size(38, 23);
+ this.txtLowStock.TabIndex = 685;
+ this.txtLowStock.Text = "1";
+ //
+ // btnSelectLowStock
+ //
+ this.btnSelectLowStock.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnSelectLowStock.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.btnSelectLowStock.DisabledBackColor = System.Drawing.Color.Empty;
+ this.btnSelectLowStock.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btnSelectLowStock.Location = new System.Drawing.Point(913, 32);
+ this.btnSelectLowStock.Name = "btnSelectLowStock";
+ this.btnSelectLowStock.Size = new System.Drawing.Size(107, 23);
+ this.btnSelectLowStock.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnSelectLowStock.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnSelectLowStock.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnSelectLowStock.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.btnSelectLowStock.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+ this.btnSelectLowStock.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
+ this.btnSelectLowStock.Style.ForeColor.Color = System.Drawing.Color.White;
+ this.btnSelectLowStock.Style.GradientAngle = 90;
+ this.btnSelectLowStock.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnSelectLowStock.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnSelectLowStock.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnSelectLowStock.TabIndex = 684;
+ this.btnSelectLowStock.Text = "选中低库存商品";
+ this.btnSelectLowStock.Click += new System.EventHandler(this.btnSelectLowStock_Click);
+ //
+ // btnSelectNotActivity
+ //
+ this.btnSelectNotActivity.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnSelectNotActivity.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.btnSelectNotActivity.DisabledBackColor = System.Drawing.Color.Empty;
+ this.btnSelectNotActivity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btnSelectNotActivity.Location = new System.Drawing.Point(706, 32);
+ this.btnSelectNotActivity.Name = "btnSelectNotActivity";
+ this.btnSelectNotActivity.Size = new System.Drawing.Size(107, 23);
+ this.btnSelectNotActivity.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnSelectNotActivity.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnSelectNotActivity.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnSelectNotActivity.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.btnSelectNotActivity.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+ this.btnSelectNotActivity.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
+ this.btnSelectNotActivity.Style.ForeColor.Color = System.Drawing.Color.White;
+ this.btnSelectNotActivity.Style.GradientAngle = 90;
+ this.btnSelectNotActivity.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnSelectNotActivity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnSelectNotActivity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnSelectNotActivity.TabIndex = 680;
+ this.btnSelectNotActivity.Text = "选中非大促商品";
+ this.btnSelectNotActivity.Click += new System.EventHandler(this.btnSelectNotActivity_Click);
+ //
// txtMinPrice
//
this.txtMinPrice.Location = new System.Drawing.Point(383, 73);
@@ -223,7 +309,7 @@ namespace TemuKJD.PDDForms.ProductForms
this.btnUp.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnUp.DisabledBackColor = System.Drawing.Color.Empty;
this.btnUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnUp.Location = new System.Drawing.Point(926, 32);
+ this.btnUp.Location = new System.Drawing.Point(929, 93);
this.btnUp.Name = "btnUp";
this.btnUp.Size = new System.Drawing.Size(124, 23);
this.btnUp.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -248,7 +334,7 @@ namespace TemuKJD.PDDForms.ProductForms
this.btnDown.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnDown.DisabledBackColor = System.Drawing.Color.Empty;
this.btnDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnDown.Location = new System.Drawing.Point(796, 32);
+ this.btnDown.Location = new System.Drawing.Point(799, 93);
this.btnDown.Name = "btnDown";
this.btnDown.Size = new System.Drawing.Size(124, 23);
this.btnDown.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -367,6 +453,7 @@ namespace TemuKJD.PDDForms.ProductForms
this.cmbStatus.Items.AddRange(new object[] {
"下架",
"在售",
+ "售罄",
"全部"});
this.cmbStatus.Location = new System.Drawing.Point(91, 32);
this.cmbStatus.Name = "cmbStatus";
@@ -416,7 +503,7 @@ namespace TemuKJD.PDDForms.ProductForms
this.btnDelSelect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnDelSelect.DisabledBackColor = System.Drawing.Color.Empty;
this.btnDelSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnDelSelect.Location = new System.Drawing.Point(1056, 32);
+ this.btnDelSelect.Location = new System.Drawing.Point(1059, 93);
this.btnDelSelect.Name = "btnDelSelect";
this.btnDelSelect.Size = new System.Drawing.Size(124, 23);
this.btnDelSelect.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -440,14 +527,106 @@ namespace TemuKJD.PDDForms.ProductForms
| System.Windows.Forms.AnchorStyles.Left)));
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
+ this.ucGroupBoxEx1.Controls.Add(this.btnClearShopFilter);
+ this.ucGroupBoxEx1.Controls.Add(this.btnFilter);
+ this.ucGroupBoxEx1.Controls.Add(this.txtShopGroupFilter);
+ this.ucGroupBoxEx1.Controls.Add(this.txtShopNameFilter);
+ this.ucGroupBoxEx1.Controls.Add(this.label23);
+ this.ucGroupBoxEx1.Controls.Add(this.label22);
this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop);
- this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
+ this.ucGroupBoxEx1.Location = new System.Drawing.Point(2, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(144, 140);
this.ucGroupBoxEx1.TabIndex = 399;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "基础";
//
+ // btnClearShopFilter
+ //
+ this.btnClearShopFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnClearShopFilter.CanvasColor = System.Drawing.SystemColors.Control;
+ this.btnClearShopFilter.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnClearShopFilter.DisabledBackColor = System.Drawing.Color.Empty;
+ this.btnClearShopFilter.Location = new System.Drawing.Point(59, 102);
+ this.btnClearShopFilter.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
+ this.btnClearShopFilter.Name = "btnClearShopFilter";
+ this.btnClearShopFilter.Size = new System.Drawing.Size(38, 23);
+ this.btnClearShopFilter.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnClearShopFilter.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
+ this.btnClearShopFilter.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
+ this.btnClearShopFilter.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
+ this.btnClearShopFilter.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnClearShopFilter.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.btnClearShopFilter.Style.GradientAngle = 90;
+ this.btnClearShopFilter.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnClearShopFilter.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnClearShopFilter.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnClearShopFilter.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnClearShopFilter.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
+ this.btnClearShopFilter.TabIndex = 577;
+ this.btnClearShopFilter.Text = "清空\r\n";
+ this.btnClearShopFilter.Click += new System.EventHandler(this.btnClearShopFilter_Click);
+ //
+ // btnFilter
+ //
+ this.btnFilter.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnFilter.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.btnFilter.DisabledBackColor = System.Drawing.Color.Empty;
+ this.btnFilter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btnFilter.Location = new System.Drawing.Point(100, 102);
+ this.btnFilter.Name = "btnFilter";
+ this.btnFilter.Size = new System.Drawing.Size(38, 23);
+ this.btnFilter.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnFilter.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnFilter.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnFilter.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.btnFilter.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+ this.btnFilter.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
+ this.btnFilter.Style.ForeColor.Color = System.Drawing.Color.White;
+ this.btnFilter.Style.GradientAngle = 90;
+ this.btnFilter.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnFilter.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnFilter.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnFilter.TabIndex = 576;
+ this.btnFilter.Text = "筛选";
+ this.btnFilter.Click += new System.EventHandler(this.btnFilter_Click);
+ //
+ // txtShopGroupFilter
+ //
+ this.txtShopGroupFilter.Location = new System.Drawing.Point(37, 74);
+ this.txtShopGroupFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
+ this.txtShopGroupFilter.Name = "txtShopGroupFilter";
+ this.txtShopGroupFilter.Size = new System.Drawing.Size(101, 23);
+ this.txtShopGroupFilter.TabIndex = 575;
+ //
+ // txtShopNameFilter
+ //
+ this.txtShopNameFilter.Location = new System.Drawing.Point(37, 47);
+ this.txtShopNameFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
+ this.txtShopNameFilter.Name = "txtShopNameFilter";
+ this.txtShopNameFilter.Size = new System.Drawing.Size(101, 23);
+ this.txtShopNameFilter.TabIndex = 574;
+ //
+ // label23
+ //
+ this.label23.AutoSize = true;
+ this.label23.Location = new System.Drawing.Point(5, 76);
+ this.label23.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
+ this.label23.Name = "label23";
+ this.label23.Size = new System.Drawing.Size(32, 17);
+ this.label23.TabIndex = 573;
+ this.label23.Text = "备注";
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.Location = new System.Drawing.Point(5, 50);
+ this.label22.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(32, 17);
+ this.label22.TabIndex = 572;
+ this.label22.Text = "店名";
+ //
// btnRefreshShop
//
this.btnRefreshShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -455,7 +634,7 @@ namespace TemuKJD.PDDForms.ProductForms
this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnRefreshShop.Location = new System.Drawing.Point(17, 31);
+ this.btnRefreshShop.Location = new System.Drawing.Point(17, 18);
this.btnRefreshShop.Name = "btnRefreshShop";
this.btnRefreshShop.Size = new System.Drawing.Size(110, 24);
this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -554,6 +733,88 @@ namespace TemuKJD.PDDForms.ProductForms
this.dgvShop.TabIndex = 6;
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;
+ //
+ // colSelectProduct
+ //
+ this.colSelectProduct.HeaderText = "选择商品";
+ this.colSelectProduct.Name = "colSelectProduct";
+ this.colSelectProduct.ReadOnly = true;
+ this.colSelectProduct.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+ this.colSelectProduct.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+ this.colSelectProduct.Visible = false;
+ this.colSelectProduct.Width = 62;
+ //
+ // 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 = 40;
+ //
+ // 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;
+ //
+ // colRemaining
+ //
+ this.colRemaining.HeaderText = "月限额";
+ this.colRemaining.Name = "colRemaining";
+ this.colRemaining.ReadOnly = true;
+ this.colRemaining.Visible = false;
+ //
+ // colMessage
+ //
+ this.colMessage.HeaderText = "消息";
+ this.colMessage.Name = "colMessage";
+ this.colMessage.ReadOnly = true;
+ //
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
@@ -690,6 +951,7 @@ namespace TemuKJD.PDDForms.ProductForms
this.colSpuId,
this.colExtCode,
this.colProductName,
+ this.colResource,
this.colPrice,
this.colStock,
this.colFavorites,
@@ -769,14 +1031,25 @@ namespace TemuKJD.PDDForms.ProductForms
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
- this.colProductName.Width = 180;
+ this.colProductName.Width = 150;
+ //
+ // colResource
+ //
+ dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colResource.DefaultCellStyle = dataGridViewCellStyle6;
+ this.colResource.HeaderText = "资源位";
+ this.colResource.Name = "colResource";
+ this.colResource.ReadOnly = true;
+ this.colResource.Width = 70;
//
// colPrice
//
+ dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colPrice.DefaultCellStyle = dataGridViewCellStyle7;
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
- this.colPrice.Width = 80;
+ this.colPrice.Width = 105;
//
// colStock
//
@@ -808,10 +1081,12 @@ namespace TemuKJD.PDDForms.ProductForms
//
// colAddTime
//
- this.colAddTime.FillWeight = 110F;
+ dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colAddTime.DefaultCellStyle = dataGridViewCellStyle8;
this.colAddTime.HeaderText = "创建时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
+ this.colAddTime.Width = 80;
//
// colIsOnSale
//
@@ -913,88 +1188,6 @@ namespace TemuKJD.PDDForms.ProductForms
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Click += new System.EventHandler(this.btnCancel_Click);
//
- // 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;
- //
- // colSelectProduct
- //
- this.colSelectProduct.HeaderText = "选择商品";
- this.colSelectProduct.Name = "colSelectProduct";
- this.colSelectProduct.ReadOnly = true;
- this.colSelectProduct.Resizable = System.Windows.Forms.DataGridViewTriState.True;
- this.colSelectProduct.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
- this.colSelectProduct.Visible = false;
- this.colSelectProduct.Width = 62;
- //
- // 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 = 40;
- //
- // 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;
- //
- // colRemaining
- //
- this.colRemaining.HeaderText = "月限额";
- this.colRemaining.Name = "colRemaining";
- this.colRemaining.ReadOnly = true;
- this.colRemaining.Visible = false;
- //
- // colMessage
- //
- this.colMessage.HeaderText = "消息";
- this.colMessage.Name = "colMessage";
- this.colMessage.ReadOnly = true;
- //
// PDDProductUpDownForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1014,6 +1207,7 @@ namespace TemuKJD.PDDForms.ProductForms
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.ucGroupBoxEx1.ResumeLayout(false);
+ this.ucGroupBoxEx1.PerformLayout();
this.splitContainer3.Panel1.ResumeLayout(false);
this.splitContainer3.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
@@ -1072,23 +1266,6 @@ namespace TemuKJD.PDDForms.ProductForms
private System.Windows.Forms.TextBox txtGoodsName;
private DevComponents.DotNetBar.PanelEx btnDown;
private DevComponents.DotNetBar.PanelEx btnUp;
- private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
- private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
- private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName;
- private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl;
- private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic;
- private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
- private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode;
- private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
- private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
- private System.Windows.Forms.DataGridViewTextBoxColumn colStock;
- private System.Windows.Forms.DataGridViewTextBoxColumn colFavorites;
- private System.Windows.Forms.DataGridViewTextBoxColumn colSales;
- private System.Windows.Forms.DataGridViewTextBoxColumn colSalesThirtyDays;
- private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime;
- private System.Windows.Forms.DataGridViewTextBoxColumn colIsOnSale;
- private System.Windows.Forms.DataGridViewTextBoxColumn colStatus;
- private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private System.Windows.Forms.TextBox txtMinPrice;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtMaxPrice;
@@ -1103,5 +1280,33 @@ namespace TemuKJD.PDDForms.ProductForms
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
+ private DevComponents.DotNetBar.PanelEx btnSelectNotActivity;
+ private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl;
+ private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic;
+ private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colResource;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colStock;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colFavorites;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colSales;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colSalesThirtyDays;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colIsOnSale;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colStatus;
+ private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.TextBox txtLowStock;
+ private DevComponents.DotNetBar.PanelEx btnSelectLowStock;
+ private DevComponents.DotNetBar.PanelEx btnClearShopFilter;
+ private DevComponents.DotNetBar.PanelEx btnFilter;
+ private System.Windows.Forms.TextBox txtShopGroupFilter;
+ private System.Windows.Forms.TextBox txtShopNameFilter;
+ private System.Windows.Forms.Label label23;
+ private System.Windows.Forms.Label label22;
}
}
\ No newline at end of file
diff --git a/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.cs b/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.cs
index 5d25d72..1fd217e 100644
--- a/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.cs
+++ b/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.cs
@@ -88,7 +88,7 @@ namespace TemuKJD.PDDForms.ProductForms
if (row == null)
{
this.dgvShop.Rows.Add(
- !isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse),
+ false, // !isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse),
shopEntity.LoginName,
shopEntity.ShopId,
shopEntity.ShopAccount,
@@ -102,7 +102,7 @@ namespace TemuKJD.PDDForms.ProductForms
}
else
{
- row.Cells["colSelect"].Value = !isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse);
+ row.Cells["colSelect"].Value = selectShopId.Contains(shopEntity.ShopId) && canUse;
row.Cells["colShopLoginName"].Value = shopEntity.LoginName;
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
row.Cells["colShopNotes"].Value = shopEntity.Notes;
@@ -111,6 +111,24 @@ namespace TemuKJD.PDDForms.ProductForms
row.Cells["colCanUse"].Value = canUse;
row.Cells["colRemaining"].Value = shopEntity.AddProductRemaining;
}
+ displayShopStatus(shopEntity);
+ }
+
+ void displayShopStatus(ShopLoginInfo shop)
+ {
+ bool canUse = shop.LoginStatus == "登录成功";
+ //bool apiAuth = shop.AuthExpiresTime > DateTime.Now;
+ var rows = this.dgvShop.Rows.Cast().Where(r => r.Cells["colShopId"].Value.ParseToString() == shop?.ShopId);
+ foreach (var row in rows)
+ {
+ row.Cells["colCanUse"].Value = canUse;
+ row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线";
+ (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Blue : Color.Red;
+ (row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Blue : Color.Red;
+ (row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightBlue : Color.OrangeRed;
+ (row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkBlue : Color.DarkRed;
+ //row.Cells["colApiStatus"].Style.ForeColor = apiAuth ? Color.Green : Color.OrangeRed;
+ }
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
@@ -279,6 +297,12 @@ namespace TemuKJD.PDDForms.ProductForms
else if (cmbStatus.Text == "下架")
isOnsale = 0;
}));
+ int? isSoldOut = null;
+ Invoke(new Action(() =>
+ {
+ if (cmbStatus.Text == "售罄")
+ isSoldOut = 1;
+ }));
//,"goods_id_list":["819969337632","819963304053"],"
List goods_id_list = null;
if (!string.IsNullOrWhiteSpace(txtSPU.Text))
@@ -294,7 +318,7 @@ namespace TemuKJD.PDDForms.ProductForms
minPrice = (txtMinPrice.Text.Trim().ParseToDecimal() * 100).ParseToLong();
if (!string.IsNullOrWhiteSpace(txtMaxPrice.Text))
maxPrice = (txtMaxPrice.Text.Trim().ParseToDecimal() * 100).ParseToLong();
- string jsonStr = shop_goods_search(shop, goods_id_list, txtGoodsName.Text.Trim(), out_goods_sn_list, skuSns, isOnsale, minPrice, maxPrice, page, pageSize);
+ string jsonStr = shop_goods_search(shop, goods_id_list, txtGoodsName.Text.Trim(), out_goods_sn_list, skuSns, isOnsale, isSoldOut, minPrice, maxPrice, page, pageSize);
if (jsonStr.Contains("繁忙") && tryCount < 5)
{
tryCount++;
@@ -343,29 +367,38 @@ namespace TemuKJD.PDDForms.ProductForms
url = pInfo.hd_thumb_url;
if (string.IsNullOrEmpty(url))
url = pInfo.thumb_url;
+ var activityPrice = pInfo.sku_group_price;
+ string activityPriceStr = "";
+ if (pInfo.sku_group_price.FirstOrDefault() != pInfo.origin_sku_group_price.FirstOrDefault())
+ activityPriceStr = "\r\n活动价:\r\n" + string.Join("~", pInfo.sku_group_price.Select(s => s / 100m));
Invoke(new Action(() =>
{
int rowId = this.dgvProduct.Rows.Add(
- true,
+ false,
shop.ShopId,
shop.ShopAccount,
url.Replace("https", "http"),
- null, // 列表图片
+ Extension.DataGridViewExtension.defaultBitmap, // 列表图片
pInfo.id,
pInfo.out_goods_sn,
pInfo.goods_name,
- string.Join("~", pInfo.sku_group_price.Select(s => s / 100m)),
+ pInfo.resource.Replace(",", " "),
+ string.Join("~", pInfo.origin_sku_group_price.Select(s => s / 100m)) + activityPriceStr,
pInfo.quantity,
"", //收藏
"", //总销量
"", //30日销量
- BaseClass.StampToDateTime(pInfo.created_at.ParseToInt()),
+ BaseClass.StampToDateTime(pInfo.created_at.ParseToInt()).ToString("yy-MM-dd HH:mm:ss"),
pInfo.is_onsale == true ? "在售" : "下架",
(pInfo.edit_check == null || pInfo.edit_check.check_status != 3)? "" : "商品修改被驳回",
"" // 操作结果,状态
);
dgvProduct.Rows[rowId].Height = 60;
+ if (!string.IsNullOrEmpty(activityPriceStr))
+ {
+ dgvProduct.Rows[rowId].Cells["colPrice"].Style.ForeColor = Color.DarkOrange;
+ }
}));
}
}
@@ -416,13 +449,16 @@ namespace TemuKJD.PDDForms.ProductForms
public static string shop_goods_search(ShopLoginInfo shop, List goods_id_list, string goods_name,
- List out_goods_sn_list = null, List out_sku_sns = null, int? isOnsale = null, long? minPrice=null, long? maxPrice=null, int page=1, int pageSize = 100)
+ List out_goods_sn_list = null, List out_sku_sns = null, int? isOnsale = null, int? isSoldOut = null, long? minPrice = null, long? maxPrice = null, int page = 1, int pageSize = 100)
{
var anti = shop.AntiContents.LastOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
string url = "https://mms.pinduoduo.com/vodka/v2/mms/query/display/mall/goodsList";
Dictionary dicParam = new Dictionary();
+ // 查询售罄商品
+ // {"page":1,"order_by":"sold_out_time:desc,id:desc","out_goods_sn_gray_flag":true,"pre_sale_type":4,"shipment_time_type":3,"sold_out":1,"size":10}
+
dicParam["out_goods_sn_gray_flag"] = true;
dicParam["pre_sale_type"] = 4;
dicParam["page"] = page;
@@ -437,8 +473,15 @@ namespace TemuKJD.PDDForms.ProductForms
dicParam["goods_name"] = goods_name;
if (out_sku_sns != null)
dicParam["out_sku_sns"] = out_sku_sns;
- dicParam["sold_out"] = 0;
+ if (isOnsale != null)
+ dicParam["sold_out"] = 0;
+ else if (isSoldOut == 1)
+ {
+ dicParam["order_by"] = "sold_out_time:desc,id:desc";
+ dicParam["sold_out"] = 1;
+ }
dicParam["size"] = pageSize;
+
if (minPrice != null || maxPrice != null)
{
long[] nArr = new long[] { 0, 1000000000 };
@@ -997,5 +1040,53 @@ namespace TemuKJD.PDDForms.ProductForms
cmbStatus.Text = "在售";
txtSPU.Text = txtGoodsName.Text = txtExtCode.Text = txtSkuSns.Text = txtMinPrice.Text = txtMaxPrice.Text = "";
}
+
+ private void btnSelectNotActivity_Click(object sender, EventArgs e)
+ {
+ foreach (DataGridViewRow r in dgvProduct.Rows)
+ {
+ if (r.Cells["colResource"].Value.ParseToString().Contains("大促活动"))
+ r.Cells["colCheck"].Value = false;
+ else
+
+ r.Cells["colCheck"].Value = true;
+ }
+ }
+
+ private void btnSelectLowStock_Click(object sender, EventArgs e)
+ {
+ foreach (DataGridViewRow r in dgvProduct.Rows)
+ {
+ if (r.Cells["colStock"].Value.ParseToInt() > txtLowStock.Text.ParseToInt())
+ r.Cells["colCheck"].Value = false;
+ else
+
+ r.Cells["colCheck"].Value = true;
+ }
+ }
+
+ private void btnFilter_Click(object sender, EventArgs e)
+ {
+ foreach (DataGridViewRow r in dgvShop.Rows)
+ {
+ r.Visible = true;
+ if (!string.IsNullOrWhiteSpace(txtShopNameFilter.Text))
+ {
+ if (!r.Cells["colShopName"].Value.ParseToString().Contains(txtShopNameFilter.Text.Trim()))
+ r.Visible = false;
+ }
+ if (!string.IsNullOrWhiteSpace(txtShopGroupFilter.Text))
+ {
+ if (!r.Cells["colShopNotes"].Value.ParseToString().Contains(txtShopGroupFilter.Text.Trim()))
+ r.Visible = false;
+ }
+ }
+ }
+
+ private void btnClearShopFilter_Click(object sender, EventArgs e)
+ {
+ txtShopGroupFilter.Text = "";
+ txtShopNameFilter.Text = "";
+ }
}
}
diff --git a/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.resx b/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.resx
index 36d3f53..51b1744 100644
--- a/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.resx
+++ b/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.resx
@@ -168,6 +168,9 @@
True
+
+ True
+
True
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs
index d59a893..ccfd99b 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs
@@ -772,7 +772,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"",
"是",
"否"});
- this.cmbPddRelation.Location = new System.Drawing.Point(743, 7);
+ this.cmbPddRelation.Location = new System.Drawing.Point(743, 5);
this.cmbPddRelation.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbPddRelation.Name = "cmbPddRelation";
this.cmbPddRelation.Size = new System.Drawing.Size(47, 25);
@@ -827,7 +827,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.cmbCat2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbCat2.FormattingEnabled = true;
- this.cmbCat2.Location = new System.Drawing.Point(278, 75);
+ this.cmbCat2.Location = new System.Drawing.Point(278, 77);
this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat2.Name = "cmbCat2";
this.cmbCat2.Size = new System.Drawing.Size(46, 25);
@@ -912,7 +912,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"机会商品",
"以图搜品",
"外部数据"});
- this.cmbSourceType.Location = new System.Drawing.Point(278, 40);
+ this.cmbSourceType.Location = new System.Drawing.Point(278, 42);
this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbSourceType.Name = "cmbSourceType";
this.cmbSourceType.Size = new System.Drawing.Size(46, 25);
@@ -958,7 +958,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"",
"是",
"否"});
- this.cmbWxCat.Location = new System.Drawing.Point(622, 5);
+ this.cmbWxCat.Location = new System.Drawing.Point(622, 7);
this.cmbWxCat.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbWxCat.Name = "cmbWxCat";
this.cmbWxCat.Size = new System.Drawing.Size(47, 25);
@@ -980,7 +980,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.cmbSort.Items.AddRange(new object[] {
"入库时间",
"认领总数"});
- this.cmbSort.Location = new System.Drawing.Point(381, 40);
+ this.cmbSort.Location = new System.Drawing.Point(381, 42);
this.cmbSort.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbSort.Name = "cmbSort";
this.cmbSort.Size = new System.Drawing.Size(46, 25);
@@ -1056,7 +1056,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbGroupFilter.FormattingEnabled = true;
- this.cmbGroupFilter.Location = new System.Drawing.Point(175, 40);
+ this.cmbGroupFilter.Location = new System.Drawing.Point(175, 42);
this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbGroupFilter.Name = "cmbGroupFilter";
this.cmbGroupFilter.Size = new System.Drawing.Size(46, 25);
@@ -1071,7 +1071,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"是",
"否",
"导出未拉回"});
- this.cmbExportToOutServer.Location = new System.Drawing.Point(622, 40);
+ this.cmbExportToOutServer.Location = new System.Drawing.Point(622, 42);
this.cmbExportToOutServer.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbExportToOutServer.Name = "cmbExportToOutServer";
this.cmbExportToOutServer.Size = new System.Drawing.Size(47, 25);
@@ -1107,7 +1107,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"安全商品",
"违规商品",
"未校验"});
- this.cmbWxSafe.Location = new System.Drawing.Point(501, 40);
+ this.cmbWxSafe.Location = new System.Drawing.Point(501, 42);
this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbWxSafe.Name = "cmbWxSafe";
this.cmbWxSafe.Size = new System.Drawing.Size(47, 25);
@@ -1149,7 +1149,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.cmbCat1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbCat1.FormattingEnabled = true;
- this.cmbCat1.Location = new System.Drawing.Point(175, 75);
+ this.cmbCat1.Location = new System.Drawing.Point(175, 77);
this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat1.Name = "cmbCat1";
this.cmbCat1.Size = new System.Drawing.Size(46, 25);
@@ -1171,7 +1171,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.cmbCat3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbCat3.FormattingEnabled = true;
- this.cmbCat3.Location = new System.Drawing.Point(381, 75);
+ this.cmbCat3.Location = new System.Drawing.Point(381, 77);
this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat3.Name = "cmbCat3";
this.cmbCat3.Size = new System.Drawing.Size(46, 25);
@@ -1268,7 +1268,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"是",
"否",
"修复回传未拉回"});
- this.cmbHasReturn.Location = new System.Drawing.Point(743, 40);
+ this.cmbHasReturn.Location = new System.Drawing.Point(743, 42);
this.cmbHasReturn.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbHasReturn.Name = "cmbHasReturn";
this.cmbHasReturn.Size = new System.Drawing.Size(47, 25);
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs
index c18382e..78a7ff5 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs
@@ -74,7 +74,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
Task.Run(() =>
{
- GetPDDProductGroup(new List { cmbGroup, cmbGroupFilter, });
+ GetPDDProductGroup(new List { cmbGroup });
+ GetPDDProductGroup(new List { cmbGroupFilter }, "", "无分组");
GetPddProductCate();
});
}
@@ -774,15 +775,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
}
- GetPDDProductGroup(new List { cmbGroup, cmbGroupFilter, });
+ GetPDDProductGroup(new List { cmbGroup });
+ GetPDDProductGroup(new List { cmbGroupFilter }, "", "无分组");
}
- public static void GetPDDProductGroup(ComboBox box, string get_type = "")
+ public static void GetPDDProductGroup(ComboBox box, string get_type = "", string addItems = "")
{
- GetPDDProductGroup(new List { box }, get_type);
+ GetPDDProductGroup(new List { box }, get_type, addItems);
}
- public static void GetPDDProductGroup(List boxs, string get_type = "")
+ public static void GetPDDProductGroup(List boxs, string get_type = "", string addItems = "")
{
var url = BaseClass.BuildPDDObjString("product/get_product_groups");
var data = UserLogin.GetSignaturex();
@@ -805,11 +807,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
{
box.Items.Clear();
var groups = BaseRegex.GetStringJson(ref html, "data");
+ box.Items.Add("");
+ if (!string.IsNullOrEmpty(addItems))
+ {
+ foreach (var item in addItems.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries))
+ {
+ box.Items.Add(item);
+ }
+ }
foreach (var item in groups.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries))
{
box.Items.Add(item);
}
- box.Items.Add("");
}
}));
}
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs
index ae30847..bf8029a 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs
@@ -41,6 +41,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnSeachPicUp = new DevComponents.DotNetBar.PanelEx();
+ this.btnApiUpload = new DevComponents.DotNetBar.PanelEx();
+ this.btnUpload = new DevComponents.DotNetBar.PanelEx();
this.txtMultiPcsSku4 = new System.Windows.Forms.TextBox();
this.label27 = new System.Windows.Forms.Label();
this.txtMultiPcsSku3 = new System.Windows.Forms.TextBox();
@@ -57,8 +59,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.label13 = new System.Windows.Forms.Label();
this.txtAddShippingFeeTimes = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
- this.btnApiUpload = new DevComponents.DotNetBar.PanelEx();
- this.btnUpload = new DevComponents.DotNetBar.PanelEx();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.chkUseExtCodePrice = new TemuKJD.UserComponent.UcCheckBox(this.components);
@@ -146,6 +146,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.chkImgChanceTest = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.txtLowPriceSkuPrice = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel();
this.txtLowPriceSkuName = new System.Windows.Forms.TextBox();
@@ -250,6 +251,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
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.btnSeachPicUp);
+ this.ucGroupBoxEx2.Controls.Add(this.btnApiUpload);
+ this.ucGroupBoxEx2.Controls.Add(this.btnUpload);
this.ucGroupBoxEx2.Controls.Add(this.txtMultiPcsSku4);
this.ucGroupBoxEx2.Controls.Add(this.label27);
this.ucGroupBoxEx2.Controls.Add(this.txtMultiPcsSku3);
@@ -266,8 +269,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucGroupBoxEx2.Controls.Add(this.label13);
this.ucGroupBoxEx2.Controls.Add(this.txtAddShippingFeeTimes);
this.ucGroupBoxEx2.Controls.Add(this.label12);
- this.ucGroupBoxEx2.Controls.Add(this.btnApiUpload);
- this.ucGroupBoxEx2.Controls.Add(this.btnUpload);
this.ucGroupBoxEx2.Controls.Add(this.label7);
this.ucGroupBoxEx2.Controls.Add(this.label6);
this.ucGroupBoxEx2.Controls.Add(this.chkUseExtCodePrice);
@@ -316,7 +317,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnSeachPicUp.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSeachPicUp.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSeachPicUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnSeachPicUp.Location = new System.Drawing.Point(967, 15);
+ this.btnSeachPicUp.Location = new System.Drawing.Point(967, 74);
this.btnSeachPicUp.Name = "btnSeachPicUp";
this.btnSeachPicUp.Size = new System.Drawing.Size(66, 23);
this.btnSeachPicUp.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -331,10 +332,60 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnSeachPicUp.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSeachPicUp.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSeachPicUp.TabIndex = 845;
- this.btnSeachPicUp.Text = "以图搜款";
- this.btnSeachPicUp.Visible = false;
+ this.btnSeachPicUp.Text = "模拟传款";
this.btnSeachPicUp.Click += new System.EventHandler(this.btnSeachPicUp_Click);
//
+ // btnApiUpload
+ //
+ this.btnApiUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnApiUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnApiUpload.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.btnApiUpload.DisabledBackColor = System.Drawing.Color.Empty;
+ this.btnApiUpload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btnApiUpload.Location = new System.Drawing.Point(967, 46);
+ this.btnApiUpload.Name = "btnApiUpload";
+ this.btnApiUpload.Size = new System.Drawing.Size(66, 23);
+ this.btnApiUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnApiUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnApiUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnApiUpload.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.btnApiUpload.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+ this.btnApiUpload.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
+ this.btnApiUpload.Style.ForeColor.Color = System.Drawing.Color.White;
+ this.btnApiUpload.Style.GradientAngle = 90;
+ this.btnApiUpload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnApiUpload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnApiUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnApiUpload.TabIndex = 742;
+ this.btnApiUpload.Text = "批量上传";
+ this.btnApiUpload.Click += new System.EventHandler(this.btnApiUpload_Click);
+ //
+ // btnUpload
+ //
+ this.btnUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ 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(967, 18);
+ this.btnUpload.Name = "btnUpload";
+ this.btnUpload.Size = new System.Drawing.Size(66, 23);
+ this.btnUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnUpload.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.btnUpload.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+ this.btnUpload.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
+ this.btnUpload.Style.ForeColor.Color = System.Drawing.Color.White;
+ this.btnUpload.Style.GradientAngle = 90;
+ this.btnUpload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnUpload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnUpload.TabIndex = 517;
+ this.btnUpload.Text = "模拟上传";
+ this.btnUpload.Visible = false;
+ this.btnUpload.Click += new System.EventHandler(this.btnUpload_Click);
+ //
// txtMultiPcsSku4
//
this.txtMultiPcsSku4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@@ -500,56 +551,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.label12.TabIndex = 755;
this.label12.Text = "运费×";
//
- // btnApiUpload
- //
- this.btnApiUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnApiUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.btnApiUpload.Cursor = System.Windows.Forms.Cursors.Hand;
- this.btnApiUpload.DisabledBackColor = System.Drawing.Color.Empty;
- this.btnApiUpload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnApiUpload.Location = new System.Drawing.Point(967, 44);
- this.btnApiUpload.Name = "btnApiUpload";
- this.btnApiUpload.Size = new System.Drawing.Size(66, 23);
- this.btnApiUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
- this.btnApiUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
- this.btnApiUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
- this.btnApiUpload.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
- this.btnApiUpload.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
- this.btnApiUpload.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
- this.btnApiUpload.Style.ForeColor.Color = System.Drawing.Color.White;
- this.btnApiUpload.Style.GradientAngle = 90;
- this.btnApiUpload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
- this.btnApiUpload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
- this.btnApiUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
- this.btnApiUpload.TabIndex = 742;
- this.btnApiUpload.Text = "批量上传";
- this.btnApiUpload.Click += new System.EventHandler(this.btnApiUpload_Click);
- //
- // btnUpload
- //
- this.btnUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- 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(967, 73);
- this.btnUpload.Name = "btnUpload";
- this.btnUpload.Size = new System.Drawing.Size(66, 23);
- this.btnUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
- this.btnUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
- this.btnUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
- this.btnUpload.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
- this.btnUpload.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
- this.btnUpload.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
- this.btnUpload.Style.ForeColor.Color = System.Drawing.Color.White;
- this.btnUpload.Style.GradientAngle = 90;
- this.btnUpload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
- this.btnUpload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
- this.btnUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
- this.btnUpload.TabIndex = 517;
- this.btnUpload.Text = "模拟上传";
- this.btnUpload.Click += new System.EventHandler(this.btnUpload_Click);
- //
// label7
//
this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -1616,6 +1617,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// splitContainer2.Panel2
//
+ this.splitContainer2.Panel2.Controls.Add(this.chkImgChanceTest);
this.splitContainer2.Panel2.Controls.Add(this.txtLowPriceSkuPrice);
this.splitContainer2.Panel2.Controls.Add(this.panel2);
this.splitContainer2.Panel2.Controls.Add(this.txtLowPriceSkuName);
@@ -1781,6 +1783,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
//
+ // chkImgChanceTest
+ //
+ this.chkImgChanceTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.chkImgChanceTest.AutoSize = true;
+ this.chkImgChanceTest.Location = new System.Drawing.Point(4, 348);
+ this.chkImgChanceTest.Name = "chkImgChanceTest";
+ this.chkImgChanceTest.Size = new System.Drawing.Size(99, 21);
+ this.chkImgChanceTest.TabIndex = 846;
+ this.chkImgChanceTest.Text = "模拟传款调试";
+ this.chkImgChanceTest.UseVisualStyleBackColor = true;
+ this.chkImgChanceTest.Visible = false;
+ //
// txtLowPriceSkuPrice
//
this.txtLowPriceSkuPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@@ -2531,5 +2545,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private UserComponent.UcCheckBox chkRelation;
private DevComponents.DotNetBar.PanelEx btnSeachPicUp;
private System.Windows.Forms.Panel panel2;
+ private UserComponent.UcCheckBox chkImgChanceTest;
}
}
\ No newline at end of file
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs
index ab38fd0..f88057a 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs
@@ -73,6 +73,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void UserSelectDbProductForm_Load(object sender, EventArgs e)
{
+ if (BaseClass.UserName == "15288888888")
+ {
+ chkImgChanceTest.Visible = true;
+ }
+
//Task.Run(() => { InitPddToken(); });
//RefreshApi();
@@ -366,7 +371,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
else
{
- row.Cells["colSelect"].Value = !isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse);
+ //pdd95132615765 // pdd95132615765 // pdd95132615765
+ row.Cells["colSelect"].Value = selectShopId.Contains(shopEntity.ShopId) && canUse;
row.Cells["colShopLoginName"].Value = shopEntity.LoginName;
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
row.Cells["colShopNotes"].Value = shopEntity.Notes;
@@ -6662,114 +6668,6 @@ Content-Type: image/jpeg
var prodRstObj = JsonHelper.JObjectParse(rst)["goods_detail_get_response"] as JObject;
ChangeAndUpdateProd(shop, prodRstObj);
-
- #region
- //pddApi = new PddApi(shop);
- //pddApi.Data["page"] = 1;
- //var rst1 = pddApi.PddGoodsLogisticsTemplateGet();
-
- //rst = rst.Replace("\"shelf_life\":null", "\"shelf_life\":0");
- //rst = rst.Replace("\"start_production_date\":null", "\"start_production_date\":0");
- //rst = rst.Replace("\"end_production_date\":null", "\"end_production_date\":0");
- //ProductDetailBasex tp = JsonHelper.DeserializeJsonToObject(rst);
- //var r = tp.goods_detail_get_response;
-
-
- //var api = new PddApi(shop);
- //api.Data.Add("goods_id", r.goods_id.ToString());
- //api.Data.Add("goods_name", r.goods_name);
- //api.Data.Add("goods_type", r.goods_type.ToString());
- //api.Data.Add("cat_id", r.cat_id.ToString());
- ////api.Data.Add("tiny_name", r.tiny_name);
- //api.Data.Add("country_id", r.country_id.ToString());
- //api.Data.Add("is_pre_sale", r.is_pre_sale == 1 ? "true" : "false");
- //api.Data.Add("shipment_limit_second", r.shipment_limit_second.ToString());
- //api.Data.Add("cost_template_id", r.cost_template_id.ToString());
- //api.Data.Add("customer_num", r.customer_num.ToString());
- //api.Data.Add("is_refundable", r.is_refundable == 1 ? "true" : "false");
- //api.Data.Add("second_hand", r.second_hand == 1 ? "true" : "false");
- //api.Data.Add("is_folt", r.is_folt == 1 ? "true" : "false");
- //api.Data.Add("out_goods_id", r.outer_goods_id);
- //api.Data.Add("hd_thumb_url", r.hd_thumb_url);
- //api.Data.Add("thumb_url", r.thumb_url);
- //api.Data.Add("image_url", r.image_url);
- //api.Data.Add("goods_desc", r.goods_desc);
- //api.Data.Add("buy_limit", r.buy_limit.ToString());
- //api.Data.Add("order_limit", r.order_limit.ToString());
- //api.Data.Add("pre_sale_time", r.pre_sale_time.ToString());
- //if (r.shelf_life > 0)
- //{
- // api.Data.Add("start_production_date", r.start_production_date.ToString());
- // api.Data.Add("end_production_date", r.end_production_date.ToString());
- // api.Data.Add("shelf_life", r.shelf_life.ToString());
- //}
- //api.Data.Add("market_price", r.market_price.ToString());
- //api.Data.Add("warehouse", r.warehouse);
- //api.Data.Add("is_customs", r.is_customs == 1 ? "true" : "false");
- //api.Data.Add("customs", r.customs);
- //api.Data.Add("warm_tips", r.warm_tips);
- //api.Data.Add("fabric", r.fabricx.ToString());
- //api.Data.Add("fabric_content", r.fabric_contentx.ToString());
- //api.Data.Add("mall_id", r.mall_id.ToString());
- ////api.FromWeiDian = true;
- //// 构造sku属性,计算最高价格和最低价格
- //var skuApiString = "";
- //long? minPrice = null;
- //long? maxPrice = null;
- //if (r.sku_list.Count > 0)
- // maxPrice = minPrice = r.sku_list[0].multi_price;
- //for (int i = 0; i < r.sku_list.Count; i++)
- //{
- // string spec = "";
- // for (int j = 0; j < r.sku_list[i].spec.Count; j++)
- // spec += "," + r.sku_list[i].spec[j].spec_id;
- // spec = spec.Trim(',');
- // skuApiString += ",{\"is_onsale\":" + r.sku_list[i].is_onsale + ",\"limit_quantity\":" + r.sku_list[i].limit_quantity +
- // ",\"price\":\"" + r.sku_list[i].price + "\",\"weight\":1000,\"multi_price\":\"" + r.sku_list[i].multi_price +
- // "\",\"thumb_url\":\"" + r.sku_list[i].thumb_url + "\",\"out_sku_sn\":\"" + r.sku_list[i].out_sku_sn +
- // "\",\"quantity\":" + r.sku_list[i].quantity + ",\"spec_id_list\":\"[" + spec + "]\"}";
- // if (r.sku_list[i].multi_price > maxPrice)
- // maxPrice = r.sku_list[i].multi_price;
- // if (r.sku_list[i].multi_price < minPrice)
- // minPrice = r.sku_list[i].multi_price;
- //}
- //skuApiString = skuApiString.Trim(',');
- //api.Data.Add("sku_list", "[" + skuApiString + "]");
- //api.Data.Add("carousel_gallery", JsonHelper.SerializeObject(r.carousel_gallery_list));
- //api.Data.Add("detail_gallery", JsonHelper.SerializeObject(r.detail_gallery_list));
- //api.Data.Add("list_desc", JsonHelper.SerializeObject(r.list_desc));
- //api.Data.Add("galleries", JsonHelper.SerializeObject(r.galleries));
- //api.Data.Add("goods_property", JsonHelper.SerializeObject(r.goods_property_list));
- //#region 更新属性
- ////int Cat1 = 0;
- //// 获取拼多多商品属性
- ////ProductCollectBase pb = new ProductCollectBase();
- ////if (PinduoduoCatList.CatIds.ContainsKey(r.cat_id))
- //// Cat1 = PinduoduoCatList.CatIds[r.cat_id].cat1;
- ////string mustCode = "";
- ////string goods_properties = UploadPinduoduoProperties.GetNew(r.cat_id, Cat1, ref pb, ref shop, out mustCode); // 获取商品属性信息
- //string goods_properties = "";
- //for (int i = 0; i < r.goods_property_list.Count; i++)
- //{
- // var p = r.goods_property_list[i];
- // var str = ",{\"template_pid\":" + p.template_pid + ",\"vid\":" + p.vid + ",\"value\":\"" + p.vvalue + "\",\"value_unit\":\"" + p.punit + "\"}";
- // string temp = BaseRegex.GetMatchRegexString(ref str, @"(\d{2,4}-\d{1,2}-\d{1,2})");
- // if (!string.IsNullOrEmpty(temp))
- // str = ",{\"template_pid\":" + p.template_pid + ",\"vid\":" + p.vid + ",\"value\":\"" + DateTime.Now.ToString("yyyy-MM-dd") + "\",\"value_unit\":\"" + p.punit + "\"}";
- // goods_properties += str;
- //}
- //if (!string.IsNullOrEmpty(goods_properties))
- //{
- // api.Data.Remove("goods_properties");
- // api.Data.Add("goods_properties", "[" + goods_properties.Substring(1) + "]");
- //}
- //#endregion
- ////api.Data["sync_goods_operate"] = "1"; // 下架商品编辑后保持原样不上架
- //api.Data["sync_goods_operate"] = "0"; // 下架商品编辑后更改为上架状态
-
- //rst = api.PddGoodsInformationUpdate();
- //return;
- #endregion
}
string ChangeAndUpdateProd(ShopLoginInfo shop, JObject prodRstObj)
@@ -7682,7 +7580,6 @@ Content-Type: image/jpeg
List addPriceFakeSkuInfoLst = new List();
Dictionary skuFakeSpecNameDic1 = new Dictionary();
Dictionary skuFakeSpecNameDic2 = new Dictionary();
- int marketPriceFake = 0; // prodInfo.detail.market_price.ParseToInt();
{
var maxPrice1 = 0;
foreach (var sku in prodInfo.detail.sku)
@@ -7708,12 +7605,6 @@ Content-Type: image/jpeg
skuInfo.multi_price = ((new_multi_price + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100) * this.txtAddTimesFake.Text.Trim().ParseToDecimal()).ParseToInt();
skuInfo.price = skuInfo.multi_price + Math.Max(100, this.txtSinglePriceAdd.Text.Trim().ParseToDecimal() * 100).ParseToInt();
- if (marketPriceFake < skuInfo.price.ParseToInt() * 2)
- {
- marketPriceFake = skuInfo.price.ParseToInt() * 2;
- //pddApi.Data["market_price"] = marketPriceFake;
- }
-
//skuInfo.spec[0].spec_name = "黑色" + Randomx.GetId(1000);
//if (Randomx.GetId(3) == 1)
// skuInfo.spec[0].spec_name = "白色" + Randomx.GetId(1000);
@@ -7778,7 +7669,6 @@ Content-Type: image/jpeg
#region 生成一组正常加价后的sku
List addPriceSkuInfoLst = new List();
- int marketPrice = 0; // prodInfo.detail.market_price.ParseToInt();
{
foreach (var sku in prodInfo.detail.sku)
{
@@ -7823,12 +7713,6 @@ Content-Type: image/jpeg
//skuInfo.multi_price += (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
//skuInfo.price += (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
- if (marketPrice < skuInfo.price * 2)
- {
- marketPrice = skuInfo.price.ParseToInt() * 2;
- //pddApi.Data["market_price"] = marketPrice;
- }
-
addPriceSkuInfoLst.Add(skuInfo);
}
}
@@ -7837,7 +7721,6 @@ Content-Type: image/jpeg
#region 报活动加价
if (chkActivity.Checked)
{
- marketPrice = marketPriceFake;
addPriceSkuInfoLst = addPriceFakeSkuInfoLst;
}
#endregion
@@ -7845,252 +7728,30 @@ Content-Type: image/jpeg
#region 生成属性规格id
if (dbProd.product_get_type_text == "厂商直采")
{
- PddApi PddGoodsSpecGetApi = new PddApi(shop);
- PddGoodsSpecGetApi.Data["cat_id"] = prodInfo.detail.cat_id;
- var PddGoodsSpecGetApiRst = PddGoodsSpecGetApi.PddGoodsSpecGet();
- if (!PddGoodsSpecGetApiRst.Contains("\"goods_spec_get_response\""))
- {
- var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecGetApiRst, "error_msg");
- if (string.IsNullOrEmpty(errMsg))
- errMsg = PddGoodsSpecGetApiRst;
- return "初始化Sku属性失败 " + errMsg;
- }
-
- Dictionary specNameDic = new Dictionary();
- foreach (var jObj in JsonHelper.JObjectParse(PddGoodsSpecGetApiRst)["goods_spec_get_response"]["goods_spec_list"])
- {
- string specStr = JsonHelper.SerializeObject(jObj);
- var parent_spec_id = BaseRegex.GetLongJson(ref specStr, "parent_spec_id");
- var parent_spec_name = BaseRegex.GetStringJson(ref specStr, "parent_spec_name");
- specNameDic[parent_spec_id] = parent_spec_name;
- }
-
- Dictionary specNameIdMapDic = new Dictionary();
-
- for (int i = 0; i < addPriceSkuInfoLst.Count; i++)
- {
- Invoke(new Action(() =>
- {
- if (cell != null)
- cell.Value = "正在生成Sku规格 " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
- }));
-
- for (int j = 0; j < addPriceSkuInfoLst[i].spec.Count; j++)
- {
- var specInfo = addPriceSkuInfoLst[i].spec[j];
- long parent_id = 0;
- try
- {
- parent_id = specNameDic.FirstOrDefault(s => s.Value == specInfo.parent_name).Key;
- }
- catch
- {
- }
- if (parent_id == 0)
- {
- parent_id = specNameDic.ToList()[j].Key;
- specInfo.parent_name = specNameDic.ToList()[j].Value;
- }
- specInfo.parent_id = parent_id;
-
- if (specNameIdMapDic.Keys.Contains(specInfo.spec_name + specInfo.parent_name))
- {
- specInfo.spec_id = specNameIdMapDic[specInfo.spec_name + specInfo.parent_name];
- }
- else
- {
- PddApi PddGoodsSpecIdGetApi = new PddApi(shop);
- PddGoodsSpecIdGetApi.Data["parent_spec_id"] = parent_id;
- PddGoodsSpecIdGetApi.Data["spec_name"] = specInfo.spec_name;
- var PddGoodsSpecIdGetApiRst = PddGoodsSpecIdGetApi.PddGoodsSpecIdGet();
- if (!PddGoodsSpecIdGetApiRst.Contains("\"goods_spec_id_get_response\""))
- {
- var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecIdGetApiRst, "error_msg");
- if (string.IsNullOrEmpty(errMsg))
- errMsg = PddGoodsSpecIdGetApiRst;
- return "Sku属性生成失败 " + errMsg;
- }
- specInfo.spec_id = BaseRegex.GetLongJson(ref PddGoodsSpecIdGetApiRst, "spec_id");
- specNameIdMapDic[specInfo.spec_name + specInfo.parent_name] = specInfo.spec_id;
- }
- }
- }
+ var apiGetPddSpecIdRst = ApiGetPddSpecId(shop, prodInfo, addPriceSkuInfoLst, cell);
+ if (!apiGetPddSpecIdRst.IsNullOrEmpty() && apiGetPddSpecIdRst != "success")
+ return apiGetPddSpecIdRst;
}
#endregion
-
- //spec_item multiPcsSkuSpec = null; // multiPcsSkuSpec
+ #region // 添加一个多件sku,库存设置为0
if (chkMultiPcsSku.Checked)
{
- #region // 添加一个多件sku
- // 申请skuSpec
- var multiPcsSku = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(addPriceSkuInfoLst.OrderByDescending(s => s.multi_price).FirstOrDefault()));
- // 双规格有多个sku
- var multiPcsSkus = JsonHelper.DeserializeJsonToList(JsonHelper.SerializeObject(addPriceSkuInfoLst.Where(s => s.spec[0].spec_name == multiPcsSku.spec[0].spec_name).ToList()));
-
- int min = txtMultiPcsSku1.Text.Trim().ParseToInt();
- int max = txtMultiPcsSku2.Text.Trim().ParseToInt() + 1;
- if (max <= min)
- max = min + 1;
- var multiPcsSpec1 = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(multiPcsSku.spec[0]));
- var oldSpecName1 = multiPcsSpec1.spec_name;
- if (skuFakeSpecNameDic1.Values.Contains(oldSpecName1))
- oldSpecName1 = skuFakeSpecNameDic1.FirstOrDefault(s => s.Value == oldSpecName1).Key;
- var newSpecName1 = oldSpecName1 + Randomx.GetId(min, max) + txtMultiPcsSku3.Text.Trim();
- multiPcsSku.spec[0].spec_name = newSpecName1;
-
- if (1 == 1)
- {
- PddApi PddGoodsSpecIdGetApi = new PddApi(shop);
- PddGoodsSpecIdGetApi.Data["parent_spec_id"] = multiPcsSku.spec[0].parent_id;
- PddGoodsSpecIdGetApi.Data["spec_name"] = multiPcsSku.spec[0].spec_name;
- var PddGoodsSpecIdGetApiRst = PddGoodsSpecIdGetApi.PddGoodsSpecIdGet();
- if (!PddGoodsSpecIdGetApiRst.Contains("\"goods_spec_id_get_response\""))
- {
- var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecIdGetApiRst, "error_msg");
- if (string.IsNullOrEmpty(errMsg))
- errMsg = PddGoodsSpecIdGetApiRst;
- return "设置多件Sku失败 " + errMsg;
- }
- multiPcsSku.spec[0].spec_id = BaseRegex.GetLongJson(ref PddGoodsSpecIdGetApiRst, "spec_id");
-
- //List first_spec_lst = new List();
- //List second_spec_lst = new List();
- //List new_sku_lst = new List();
- //foreach (var sku in addPriceSkuInfoLst)
- //{
- // if (sku.spec.Count > 0)
- // {
- // if (sku.spec[0].parent_id != multiPcsSkuSpec.parent_id && !first_spec_lst.Any(s => s.spec_id == sku.spec[0].spec_id))
- // {
- // first_spec_lst.Add(sku.spec[0]);
- // new_sku_lst.Add(JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(sku)));
- // }
- // }
- // if (sku.spec.Count > 1)
- // {
- // if (sku.spec[1].parent_id != multiPcsSkuSpec.parent_id && !second_spec_lst.Any(s => s.spec_id == sku.spec[1].spec_id))
- // {
- // second_spec_lst.Add(sku.spec[1]);
- // new_sku_lst.Add(JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(sku)));
- // }
- // }
- //}
- //if (new_sku_lst.Count == 0)
- //{
- // new_sku_lst.Add(JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(addPriceSkuInfoLst.LastOrDefault())));
- //}
- //var maxMultiPcsSkuBasePrice = addPriceSkuInfoLst.Max(s => s.multi_price);
- foreach (var sku in multiPcsSkus)
- {
- //if (sku.spec.Count > 0 && sku.spec[0].parent_id == multiPcsSkuSpec.parent_id)
- //{
- // sku.spec[0] = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(multiPcsSkuSpec));
- //}
- //else if (sku.spec.Count > 1 && sku.spec[1].parent_id == multiPcsSkuSpec.parent_id)
- //{
- // sku.spec[1] = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(multiPcsSkuSpec));
- //}
- //sku.thumb_url = multiPcsSku.thumb_url; // 反序列化时已获得
- //sku.thumb_url_file_id = null;
- sku.spec[0].spec_id = multiPcsSku.spec[0].spec_id;
- sku.spec[0].spec_name = multiPcsSku.spec[0].spec_name;
- sku.multi_price = (sku.multi_price * txtMultiPcsSku4.Text.ParseToDecimal()).ParseToInt();
- sku.price = sku.multi_price + Math.Max(100, this.txtSinglePriceAdd.Text.Trim().ParseToDecimal() * 100).ParseToInt();
- sku.quantity_delta = 0; // 库存设置为0防止出单
- sku.quantity = 0;
- addPriceSkuInfoLst.Add(sku);
-
- if (marketPrice < sku.price * 2)
- {
- marketPrice = sku.price.ParseToInt() * 2;
- }
- }
- }
- #endregion
+ var addMulitPcsSkuRst = AddMulitPcsSku(shop, addPriceSkuInfoLst, skuFakeSpecNameDic1);
+ if (!addMulitPcsSkuRst.IsNullOrEmpty() && addMulitPcsSkuRst != "success")
+ return addMulitPcsSkuRst;
}
+ #endregion
#region 市场价
- pddApi.Data["market_price"] = marketPrice;
+ pddApi.Data["market_price"] = addPriceSkuInfoLst.Max(s => s.multi_price) * 2;
#endregion
#region 拼接sku,计算最高价格和最低价格
var skuApiString = "";
- long? minPrice = 99999999;
- long? maxPrice = 0;
- Dictionary skuImgDic = new Dictionary();
- // 拼接sku,计算最高价格和最低价格
- for (int i = 0; i < addPriceSkuInfoLst.Count; i++)
- {
- Invoke(new Action(() =>
- {
- if (cell != null)
- cell.Value = "正在拼接Sku " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
- }));
-
- string spec = string.Join(",", addPriceSkuInfoLst[i].spec.Select(s => s.spec_id));
-
- string thumb_url = "";
- if (!chkActivity.Checked && skuImgDic.ContainsKey(addPriceSkuInfoLst[i].thumb_url)) // 高价加商品每个sku规格写在图片上,各不相同
- {
- thumb_url = skuImgDic[addPriceSkuInfoLst[i].thumb_url];
- }
- else
- {
- string errMsg = "";
- var imgBase64 = "";
- float alpha = Math.Min(100, Math.Max(1, txtAlpha.Text.ParseToInt())) / 100f;
- if (chkActivity.Checked)
- {
- //skuFakeSpecNameDic1
- var text1 = skuFakeSpecNameDic1.FirstOrDefault(s => s.Value == addPriceSkuInfoLst[i].spec[0].spec_name).Key;
- if (string.IsNullOrEmpty(text1))
- text1 = addPriceSkuInfoLst[i].spec[0].spec_name;
- var text2 = skuFakeSpecNameDic2.FirstOrDefault(s => s.Value == addPriceSkuInfoLst[i].spec[1].spec_name).Key.Replace("无规格", "").Replace("默认规格", "");
- //if (dbProd.cat_name.Contains("鞋"))
- // text1 = "阿迪代工" + text1;
- //if (text1.Length + text2.Length <= 6)
- // text1 = "专柜产品" + text1;
- //if (text1.Length + text2.Length <= 6)
- // text2 = "专柜品质 " + text2; // 专柜正品
- //imgBase64 = PddGetImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url, fakeImg, pbUpgradeVersion.Image, alpha, "到手 " + text1 + " " + text2);
- imgBase64 = PddGetActivitySkuImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url, fakeImg, pbUpgradeVersion.Image, alpha, text1 + " " + text2, pddUploadRule);
- //imgBase64 = PddGetImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url, fakeImg, pbUpgradeVersion.Image, alpha);
- }
- else
- imgBase64 = PddGetActivitySkuImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url);
- if (!string.IsNullOrEmpty(errMsg))
- {
- return "初始化Sku图片错误 " + errMsg;
- }
-
- var pddUpImgApi = new PddApi(shop);
- pddUpImgApi.Data["image"] = "data:image/jpeg;base64," + imgBase64;
- var pddUpImgApiRst = pddUpImgApi.PddGoodsImageUpload();
- if (!pddUpImgApiRst.Contains("\"goods_image_upload_response\""))
- {
- errMsg = BaseRegex.GetStringJson(ref pddUpImgApiRst, "error_msg");
- if (string.IsNullOrEmpty(errMsg))
- errMsg = pddUpImgApiRst;
- return "生成Sku图片错误 " + errMsg;
- }
- thumb_url = BaseRegex.GetStringJson(ref pddUpImgApiRst, "image_url");
- skuImgDic[addPriceSkuInfoLst[i].thumb_url] = thumb_url;
- }
-
- int weight = addPriceSkuInfoLst[i].weight.IsNullOrZero() ? 1000 : addPriceSkuInfoLst[i].weight.ParseToInt();
-
- if (addPriceSkuInfoLst[i].multi_price > maxPrice)
- maxPrice = addPriceSkuInfoLst[i].multi_price;
- if (addPriceSkuInfoLst[i].multi_price < minPrice)
- minPrice = addPriceSkuInfoLst[i].multi_price;
-
- skuApiString += ",{\"is_onsale\":" + addPriceSkuInfoLst[i].is_onsale + ",\"limit_quantity\":" + addPriceSkuInfoLst[i].limit_quantity +
- ",\"price\":\"" + addPriceSkuInfoLst[i].price + "\",\"weight\":" + weight + ",\"multi_price\":\"" + addPriceSkuInfoLst[i].multi_price +
- "\",\"thumb_url\":\"" + thumb_url + "\",\"out_sku_sn\":\"" + addPriceSkuInfoLst[i].out_sku_sn +
- "\",\"quantity\":" + addPriceSkuInfoLst[i].quantity + ",\"spec_id_list\":\"[" + spec + "]\"}";
-
- }
+ var apiGetSkuRst = ApiGetPddSku(ref skuApiString, shop, addPriceSkuInfoLst, fakeImg, skuFakeSpecNameDic1, skuFakeSpecNameDic2, cell);
+ if (!apiGetSkuRst.IsNullOrEmpty() && apiGetSkuRst != "success")
+ return apiGetSkuRst;
pddApi.Data["sku_list"] = "[" + skuApiString.Trim(',') + "]";
#endregion
@@ -9007,12 +8668,12 @@ Content-Type: image/jpeg
while (lstTemuDBProductSelect.Count > 0)
{
if (cancellationTokenSource.IsCancellationRequested)
- return;
+ break;
while (true)
{
if (cancellationTokenSource.IsCancellationRequested)
- return;
+ break;
Thread.Sleep(500);
@@ -9037,12 +8698,16 @@ Content-Type: image/jpeg
{
Thread.Sleep(500);
if (cancellationTokenSource.IsCancellationRequested)
- return;
+ break;
}
+ if (cancellationTokenSource.IsCancellationRequested)
+ break;
ShopLoginInfo randomShop = null; //randomShopLst[Randomx.GetId(randomShopLst.Count)];
while (randomShop == null)
{
+ if (cancellationTokenSource.IsCancellationRequested)
+ break;
Thread.Sleep(500);
if (randomShopLst.Where(s => !currentShopList.Contains(s)).ToList().Count == 0)
continue;
@@ -9140,6 +8805,9 @@ Content-Type: image/jpeg
DateTime startTime = DateTime.Now;
for (int j = 0; j < 1; j++)
{
+ if (cancellationTokenSource.IsCancellationRequested)
+ break;
+
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == prod.shop_id);
if (shop == null)
continue;
@@ -9287,7 +8955,7 @@ Content-Type: image/jpeg
prod.status = BaseRegex.GetStringJson(ref result, "status");
if (string.IsNullOrWhiteSpace(prod.status))
prod.status = "待上传";
- var productDraftId = BaseRegex.GetStringJson(ref result, "draftId");
+ var productDraftId = BaseRegex.GetStringJson(ref result, "goods_id");
Invoke(new Action(() =>
{
@@ -9322,7 +8990,7 @@ Content-Type: image/jpeg
Invoke(new Action(() =>
{
if (cancellationTokenSource.IsCancellationRequested)
- BaseMsgForm.ShowInfo("上传停止!");
+ BaseMsgForm.ShowInfo("上传停止!正在上传的商品将继续上传!");
else
BaseMsgForm.ShowInfo("上传完成!");
}));
@@ -9342,15 +9010,15 @@ Content-Type: image/jpeg
{
// 初始化cef
var cefWebBrowser = shop.Chat;
- if (cefWebBrowser != null)
- {
- Invoke(new Action(() =>
- {
- panel2.Controls.Remove(cefWebBrowser);
- cefWebBrowser.Dispose();
- }));
- }
- cefWebBrowser = null;
+ //if (cefWebBrowser != null)
+ //{
+ // Invoke(new Action(() =>
+ // {
+ // panel2.Controls.Remove(cefWebBrowser);
+ // cefWebBrowser.Dispose();
+ // }));
+ // cefWebBrowser = null;
+ //}
if (cefWebBrowser == null)
{
Invoke(new Action(() =>
@@ -9453,8 +9121,9 @@ Content-Type: image/jpeg
Invoke(new Action(() =>
{
- //panel2.BringToFront();
- //cefWebBrowser.BringToFront();
+ if (chkImgChanceTest.Checked)
+ panel2.BringToFront();
+ cefWebBrowser.BringToFront();
}));
Thread.Sleep(Randomx.GetId(1000, 1500));
@@ -9473,7 +9142,8 @@ Content-Type: image/jpeg
Invoke(new Action(() =>
{
if (cell != null)
- cell.Value = "正在查询以图搜款商品";
+ //cell.Value = "正在查询以图搜款商品";
+ cell.Value = "正在初始化模拟页面";
}));
// 加载机会商品页面
cefWebBrowser.Load("https://mms.pinduoduo.com/goods/goods_list/chance?sourcePage=goodsListTopButton");
@@ -9485,7 +9155,8 @@ Content-Type: image/jpeg
var client = cefWebBrowser.GetDevToolsClient();
if (host == null || client == null)
{
- return "商品发布失败 设置图片页面打开失败";
+ //return "商品发布失败 设置图片页面打开失败";
+ return "商品发布失败 模拟页面打开失败";
}
// 点击图片搜索图标
@@ -9515,7 +9186,8 @@ Content-Type: image/jpeg
if (!string.IsNullOrEmpty(getImgError) || image == null)
{
isCopyImage = false;
- return "商品发布失败 上传图片获取失败";
+ //return "商品发布失败 上传图片获取失败";
+ return "商品发布失败 模拟页面获取失败";
}
var bitMap = new Bitmap(image.Width, image.Height);
using (Graphics g = Graphics.FromImage(bitMap))
@@ -9548,14 +9220,20 @@ Content-Type: image/jpeg
ts2.Wait(5000);
if ((ts2.Result?.Result?.Value).ParseToString().IsNullOrEmpty())
{
- return "商品发布失败 图片查询失败";
+ //return "商品发布失败 图片查询失败";
+ Invoke(new Action(() => {
+ panel2.Controls.Remove(cefWebBrowser);
+ shop.Chat = null;
+ }));
+ return "商品发布失败 模拟页面查询失败";
}
Thread.Sleep(Randomx.GetId(7000, 10000));
Invoke(new Action(() =>
{
if (cell != null)
- cell.Value = "正在初始化以图搜款商品信息";
+ //cell.Value = "正在初始化以图搜款商品信息";
+ cell.Value = "正在初始化模拟上传商品信息";
}));
// 点击发布同款
var jsStr3 = @"(function() {
@@ -9575,14 +9253,16 @@ Content-Type: image/jpeg
ts3.Wait(5000);
if ((ts3.Result?.Result?.Value).ParseToString().IsNullOrEmpty())
{
- return "商品发布失败 同款发布失败";
+ //return "商品发布失败 同款发布失败";
+ return "商品发布失败 模拟商品发布失败";
}
Thread.Sleep(Randomx.GetId(7000, 10000));
Invoke(new Action(() =>
{
if (cell != null)
- cell.Value = "正在设置以图搜款商品详情";
+ //cell.Value = "正在设置以图搜款商品详情";
+ cell.Value = "正在设置模拟商品详情";
}));
// 点一下获取焦点
int randomX = Randomx.GetId(50, 500);
@@ -9723,7 +9403,8 @@ Content-Type: image/jpeg
Invoke(new Action(() =>
{
if (cell != null)
- cell.Value = "正在提交以图搜款商品";
+ //cell.Value = "正在提交以图搜款商品";
+ cell.Value = "正在提交模拟商品";
}));
// 提交并上架
var jsStr7 = @"(function() {
@@ -9742,7 +9423,7 @@ Content-Type: image/jpeg
Thread.Sleep(Randomx.GetId(4000, 7000));
// 等待获取到商品id
- for (int i = 0; i < 50; i++)
+ for (int i = 0; i < 25; i++)
{
Thread.Sleep(1000);
if (!shop.CurrentProdId.IsNullOrEmpty())
@@ -9757,6 +9438,10 @@ Content-Type: image/jpeg
if (shop.CurrentProdId.IsNullOrEmpty())
{
+ Invoke(new Action(() => {
+ panel2.Controls.Remove(cefWebBrowser);
+ shop.Chat = null;
+ }));
return "商品发布失败 商品提交失败";
}
@@ -9932,7 +9617,6 @@ Content-Type: image/jpeg
//pddApi.Data["medical_device_certificate_gallery"] = "";
//pddApi.Data["medical_device_confirm"] = "";
-
#region 厂商直采获取推单运费模板,计算运费加价。
//Invoke(new Action(() =>
//{
@@ -10079,7 +9763,6 @@ Content-Type: image/jpeg
List addPriceFakeSkuInfoLst = new List();
Dictionary skuFakeSpecNameDic1 = new Dictionary();
Dictionary skuFakeSpecNameDic2 = new Dictionary();
- int marketPriceFake = 0; // prodInfo.detail.market_price.ParseToInt();
{
var maxPrice1 = 0;
var spec0ParentName = "颜色";
@@ -10120,12 +9803,6 @@ Content-Type: image/jpeg
skuInfo.multi_price = ((new_multi_price + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100) * this.txtAddTimesFake.Text.Trim().ParseToDecimal()).ParseToInt();
skuInfo.price = skuInfo.multi_price + Math.Max(100, this.txtSinglePriceAdd.Text.Trim().ParseToDecimal() * 100).ParseToInt();
- if (marketPriceFake < skuInfo.price.ParseToInt() * 2)
- {
- marketPriceFake = skuInfo.price.ParseToInt() * 2;
- //pddApi.Data["market_price"] = marketPriceFake;
- }
-
//skuInfo.spec[0].spec_name = "黑色" + Randomx.GetId(1000);
//if (Randomx.GetId(3) == 1)
// skuInfo.spec[0].spec_name = "白色" + Randomx.GetId(1000);
@@ -10190,7 +9867,6 @@ Content-Type: image/jpeg
#region 生成一组正常加价后的sku
List addPriceSkuInfoLst = new List();
- int marketPrice = 0; // prodInfo.detail.market_price.ParseToInt();
{
foreach (var sku in prodInfo.detail.sku)
{
@@ -10202,7 +9878,9 @@ Content-Type: image/jpeg
if (skuInfo.quantity != 0)
skuInfo.quantity = txtStockNum.Text.Trim().ParseToInt();
+ // 聚水潭商品 加邮费×倍率
var new_multi_price = sku.multi_price + (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
+
// 使用货号价格做基础价
if (chkUseExtCodePrice.Checked && dbProd.ext_code_price > 0)
{
@@ -10210,7 +9888,6 @@ Content-Type: image/jpeg
}
skuInfo.multi_price = (new_multi_price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt();
- //skuInfo.price = (sku.price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt();
if (isAddMorePriceFirst) // 先加后乘
skuInfo.multi_price = ((new_multi_price + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100) * this.txtAddTimes.Text.Trim().ParseToDecimal()).ParseToInt();
skuInfo.price = skuInfo.multi_price + Math.Max(100, this.txtSinglePriceAdd.Text.Trim().ParseToDecimal() * 100).ParseToInt();
@@ -10231,15 +9908,6 @@ Content-Type: image/jpeg
}
}
}
- // 聚水潭商品 加邮费×倍率 放前面
- //skuInfo.multi_price += (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
- //skuInfo.price += (shipPrice * defaultAddPriceRule.AddShippingFeeTimes).ParseToInt();
-
- if (marketPrice < skuInfo.price * 2)
- {
- marketPrice = skuInfo.price.ParseToInt() * 2;
- //pddApi.Data["market_price"] = marketPrice;
- }
addPriceSkuInfoLst.Add(skuInfo);
}
@@ -10249,166 +9917,37 @@ Content-Type: image/jpeg
#region 报活动加价
if (chkActivity.Checked)
{
- marketPrice = marketPriceFake;
addPriceSkuInfoLst = addPriceFakeSkuInfoLst;
}
#endregion
#region 市场价
- pddApi.Data["market_price"] = marketPrice;
+ pddApi.Data["market_price"] = addPriceSkuInfoLst.Max(s => s.multi_price) * 2;
#endregion
#region 生成属性规格id
if (dbProd.product_get_type_text == "厂商直采")
{
- PddApi PddGoodsSpecGetApi = new PddApi(shop);
- PddGoodsSpecGetApi.Data["cat_id"] = prodInfo.detail.cat_id;
- var PddGoodsSpecGetApiRst = PddGoodsSpecGetApi.PddGoodsSpecGet();
- if (!PddGoodsSpecGetApiRst.Contains("\"goods_spec_get_response\""))
- {
- var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecGetApiRst, "error_msg");
- if (string.IsNullOrEmpty(errMsg))
- errMsg = PddGoodsSpecGetApiRst;
- return "初始化Sku属性失败 " + errMsg;
- }
+ var apiGetPddSpecIdRst = ApiGetPddSpecId(shop, prodInfo, addPriceSkuInfoLst, cell);
+ if (!apiGetPddSpecIdRst.IsNullOrEmpty() && apiGetPddSpecIdRst != "success")
+ return apiGetPddSpecIdRst;
+ }
+ #endregion
- Dictionary specNameDic = new Dictionary();
- foreach (var jObj in JsonHelper.JObjectParse(PddGoodsSpecGetApiRst)["goods_spec_get_response"]["goods_spec_list"])
- {
- string specStr = JsonHelper.SerializeObject(jObj);
- var parent_spec_id = BaseRegex.GetLongJson(ref specStr, "parent_spec_id");
- var parent_spec_name = BaseRegex.GetStringJson(ref specStr, "parent_spec_name");
- specNameDic[parent_spec_id] = parent_spec_name;
- }
-
- Dictionary specNameIdMapDic = new Dictionary();
-
- for (int i = 0; i < addPriceSkuInfoLst.Count; i++)
- {
- Invoke(new Action(() =>
- {
- if (cell != null)
- cell.Value = "正在生成Sku规格 " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
- }));
-
- for (int j = 0; j < addPriceSkuInfoLst[i].spec.Count; j++)
- {
- var specInfo = addPriceSkuInfoLst[i].spec[j];
- long parent_id = 0;
- try
- {
- parent_id = specNameDic.FirstOrDefault(s => s.Value == specInfo.parent_name).Key;
- }
- catch
- {
- }
- if (parent_id == 0)
- {
- parent_id = specNameDic.ToList().FirstOrDefault(s => !addPriceSkuInfoLst[i].spec.Any(s1 => s1.parent_name == s.Value)).Key; // specNameDic.ToList()[j].Key;
- specInfo.parent_name = specNameDic.ToList().FirstOrDefault(s => !addPriceSkuInfoLst[i].spec.Any(s1 => s1.parent_name == s.Value)).Value; // specNameDic.ToList()[j].Value;
- }
- specInfo.parent_id = parent_id;
-
- if (specNameIdMapDic.Keys.Contains(specInfo.spec_name + specInfo.parent_name))
- {
- specInfo.spec_id = specNameIdMapDic[specInfo.spec_name + specInfo.parent_name];
- }
- else
- {
- PddApi PddGoodsSpecIdGetApi = new PddApi(shop);
- PddGoodsSpecIdGetApi.Data["parent_spec_id"] = parent_id;
- PddGoodsSpecIdGetApi.Data["spec_name"] = specInfo.spec_name;
- var PddGoodsSpecIdGetApiRst = PddGoodsSpecIdGetApi.PddGoodsSpecIdGet();
- if (!PddGoodsSpecIdGetApiRst.Contains("\"goods_spec_id_get_response\""))
- {
- var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecIdGetApiRst, "error_msg");
- if (string.IsNullOrEmpty(errMsg))
- errMsg = PddGoodsSpecIdGetApiRst;
- return "Sku属性生成失败 " + errMsg;
- }
- specInfo.spec_id = BaseRegex.GetLongJson(ref PddGoodsSpecIdGetApiRst, "spec_id");
- specNameIdMapDic[specInfo.spec_name + specInfo.parent_name] = specInfo.spec_id;
- }
- }
- }
+ #region // 添加一个多件sku,库存设置为0
+ if (chkMultiPcsSku.Checked)
+ {
+ var addMulitPcsSkuRst = AddMulitPcsSku(shop, addPriceSkuInfoLst, skuFakeSpecNameDic1);
+ if (!addMulitPcsSkuRst.IsNullOrEmpty() && addMulitPcsSkuRst != "success")
+ return addMulitPcsSkuRst;
}
#endregion
#region 拼接sku,计算最高价格和最低价格
var skuApiString = "";
- long? minPrice = 99999999;
- long? maxPrice = 0;
- Dictionary skuImgDic = new Dictionary();
- // 拼接sku,计算最高价格和最低价格
- for (int i = 0; i < addPriceSkuInfoLst.Count; i++)
- {
- Invoke(new Action(() =>
- {
- if (cell != null)
- cell.Value = "正在拼接Sku " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
- }));
-
- string spec = string.Join(",", addPriceSkuInfoLst[i].spec.Select(s => s.spec_id));
-
- string thumb_url = "";
- if (!chkActivity.Checked && skuImgDic.ContainsKey(addPriceSkuInfoLst[i].thumb_url)) // 高价加商品每个sku规格写在图片上,各不相同
- {
- thumb_url = skuImgDic[addPriceSkuInfoLst[i].thumb_url];
- }
- else
- {
- string errMsg = "";
- var imgBase64 = "";
- float alpha = Math.Min(100, Math.Max(1, txtAlpha.Text.ParseToInt())) / 100f;
- if (chkActivity.Checked)
- {
- //skuFakeSpecNameDic1
- var text1 = skuFakeSpecNameDic1.FirstOrDefault(s => s.Value == addPriceSkuInfoLst[i].spec[0].spec_name).Key;
- var text2 = skuFakeSpecNameDic2.FirstOrDefault(s => s.Value == addPriceSkuInfoLst[i].spec[1].spec_name).Key.Replace("无规格", "").Replace("默认规格", "");
- //if (dbProd.cat_name.Contains("鞋"))
- // text1 = "阿迪代工" + text1;
- //if (text1.Length + text2.Length <= 6)
- // text1 = "专柜产品" + text1;
- //if (text1.Length + text2.Length <= 6)
- // text2 = "专柜品质 " + text2; // 专柜正品
- //imgBase64 = PddGetImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url, fakeImg, pbUpgradeVersion.Image, alpha, "到手 " + text1 + " " + text2);
- imgBase64 = PddGetActivitySkuImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url, fakeImg, pbUpgradeVersion.Image, alpha, text1 + " " + text2, pddUploadRule);
- //imgBase64 = PddGetImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url, fakeImg, pbUpgradeVersion.Image, alpha);
- }
- else
- imgBase64 = PddGetActivitySkuImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url);
- if (!string.IsNullOrEmpty(errMsg))
- {
- return "初始化Sku图片错误 " + errMsg;
- }
-
- var pddUpImgApi = new PddApi(shop);
- pddUpImgApi.Data["image"] = "data:image/jpeg;base64," + imgBase64;
- var pddUpImgApiRst = pddUpImgApi.PddGoodsImageUpload();
- if (!pddUpImgApiRst.Contains("\"goods_image_upload_response\""))
- {
- errMsg = BaseRegex.GetStringJson(ref pddUpImgApiRst, "error_msg");
- if (string.IsNullOrEmpty(errMsg))
- errMsg = pddUpImgApiRst;
- return "生成Sku图片错误 " + errMsg;
- }
- thumb_url = BaseRegex.GetStringJson(ref pddUpImgApiRst, "image_url");
- skuImgDic[addPriceSkuInfoLst[i].thumb_url] = thumb_url;
- }
-
- int weight = addPriceSkuInfoLst[i].weight.IsNullOrZero() ? 1000 : addPriceSkuInfoLst[i].weight.ParseToInt();
-
- if (addPriceSkuInfoLst[i].multi_price > maxPrice)
- maxPrice = addPriceSkuInfoLst[i].multi_price;
- if (addPriceSkuInfoLst[i].multi_price < minPrice)
- minPrice = addPriceSkuInfoLst[i].multi_price;
-
- skuApiString += ",{\"is_onsale\":" + addPriceSkuInfoLst[i].is_onsale + ",\"limit_quantity\":" + addPriceSkuInfoLst[i].limit_quantity +
- ",\"price\":\"" + addPriceSkuInfoLst[i].price + "\",\"weight\":" + weight + ",\"multi_price\":\"" + addPriceSkuInfoLst[i].multi_price +
- "\",\"thumb_url\":\"" + thumb_url + "\",\"out_sku_sn\":\"" + addPriceSkuInfoLst[i].out_sku_sn +
- "\",\"quantity\":" + addPriceSkuInfoLst[i].quantity + ",\"spec_id_list\":\"[" + spec + "]\"}";
-
- }
+ var apiGetSkuRst = ApiGetPddSku(ref skuApiString, shop, addPriceSkuInfoLst, fakeImg, skuFakeSpecNameDic1, skuFakeSpecNameDic2, cell);
+ if (!apiGetSkuRst.IsNullOrEmpty() && apiGetSkuRst != "success")
+ return apiGetSkuRst;
pddApi.Data["sku_list"] = "[" + skuApiString.Trim(',') + "]";
#endregion
@@ -10435,7 +9974,7 @@ Content-Type: image/jpeg
Invoke(new Action(() =>
{
if (cell != null)
- cell.Value = "正在提交更新过商品";
+ cell.Value = "正在提交更新商品";
}));
var rst = pddApi.PddGoodsInformationUpdate();
@@ -10445,7 +9984,7 @@ Content-Type: image/jpeg
var error = (BaseRegex.GetStringJson(ref rst, "error_msg") + " " + BaseRegex.GetStringJson(ref rst, "sub_msg")).Trim();
if (string.IsNullOrWhiteSpace(error))
error = rst;
- return "{\"success\":false,\"goods_id\":" + goods_id + ",\"status\":\"已上传\",\"msg\":\"商品上传修改失败 " + error + "\"}";
+ return "{\"success\":false,\"goods_id\":" + goods_id + ",\"status\":\"未上传\",\"msg\":\"商品上传修改失败 " + error + "\"}";
}
if (!string.IsNullOrEmpty(goods_id))
@@ -10472,6 +10011,257 @@ Content-Type: image/jpeg
}
}
+ ///
+ /// 根据类目获取拼多多parentSpecId,再根据parentSpecId和specName获取specId
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ private string ApiGetPddSpecId(ShopLoginInfo shop, PDDProductInfo prodInfo, List addPriceSkuInfoLst, DataGridViewCell cell)
+ {
+ PddApi PddGoodsSpecGetApi = new PddApi(shop);
+ PddGoodsSpecGetApi.Data["cat_id"] = prodInfo.detail.cat_id;
+ var PddGoodsSpecGetApiRst = PddGoodsSpecGetApi.PddGoodsSpecGet();
+ if (!PddGoodsSpecGetApiRst.Contains("\"goods_spec_get_response\""))
+ {
+ var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecGetApiRst, "error_msg");
+ if (string.IsNullOrEmpty(errMsg))
+ errMsg = PddGoodsSpecGetApiRst;
+ return "初始化Sku属性失败 " + errMsg;
+ }
+
+ Dictionary specNameDic = new Dictionary();
+ foreach (var jObj in JsonHelper.JObjectParse(PddGoodsSpecGetApiRst)["goods_spec_get_response"]["goods_spec_list"])
+ {
+ string specStr = JsonHelper.SerializeObject(jObj);
+ var parent_spec_id = BaseRegex.GetLongJson(ref specStr, "parent_spec_id");
+ var parent_spec_name = BaseRegex.GetStringJson(ref specStr, "parent_spec_name");
+ specNameDic[parent_spec_id] = parent_spec_name;
+ }
+
+ Dictionary specNameIdMapDic = new Dictionary();
+
+ for (int i = 0; i < addPriceSkuInfoLst.Count; i++)
+ {
+ Invoke(new Action(() =>
+ {
+ if (cell != null)
+ cell.Value = "正在生成Sku规格 " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
+ }));
+
+ for (int j = 0; j < addPriceSkuInfoLst[i].spec.Count; j++)
+ {
+ var specInfo = addPriceSkuInfoLst[i].spec[j];
+ long parent_id = 0;
+ try
+ {
+ parent_id = specNameDic.FirstOrDefault(s => s.Value == specInfo.parent_name).Key;
+ }
+ catch
+ {
+ }
+ if (parent_id == 0)
+ {
+ parent_id = specNameDic.ToList().FirstOrDefault(s => !addPriceSkuInfoLst[i].spec.Any(s1 => s1.parent_name == s.Value)).Key; // specNameDic.ToList()[j].Key;
+ specInfo.parent_name = specNameDic.ToList().FirstOrDefault(s => !addPriceSkuInfoLst[i].spec.Any(s1 => s1.parent_name == s.Value)).Value; // specNameDic.ToList()[j].Value;
+ }
+ specInfo.parent_id = parent_id;
+
+ if (specNameIdMapDic.Keys.Contains(specInfo.spec_name + specInfo.parent_name))
+ {
+ specInfo.spec_id = specNameIdMapDic[specInfo.spec_name + specInfo.parent_name];
+ }
+ else
+ {
+ PddApi PddGoodsSpecIdGetApi = new PddApi(shop);
+ PddGoodsSpecIdGetApi.Data["parent_spec_id"] = parent_id;
+ PddGoodsSpecIdGetApi.Data["spec_name"] = specInfo.spec_name;
+ var PddGoodsSpecIdGetApiRst = PddGoodsSpecIdGetApi.PddGoodsSpecIdGet();
+ if (!PddGoodsSpecIdGetApiRst.Contains("\"goods_spec_id_get_response\""))
+ {
+ var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecIdGetApiRst, "error_msg");
+ if (string.IsNullOrEmpty(errMsg))
+ errMsg = PddGoodsSpecIdGetApiRst;
+ return "Sku属性生成失败 " + errMsg;
+ }
+ specInfo.spec_id = BaseRegex.GetLongJson(ref PddGoodsSpecIdGetApiRst, "spec_id");
+ specNameIdMapDic[specInfo.spec_name + specInfo.parent_name] = specInfo.spec_id;
+ }
+ }
+ }
+ return "success";
+ }
+
+ ///
+ /// 生成多件sku并将库存设置为0
+ ///
+ ///
+ ///
+ ///
+ ///
+ private string AddMulitPcsSku(ShopLoginInfo shop, List addPriceSkuInfoLst, Dictionary skuFakeSpecNameDic1)
+ {
+ //spec_item multiPcsSkuSpec = null; // multiPcsSkuSpec
+
+ // 取一个最高价格的sku
+ var multiPcsSku = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(addPriceSkuInfoLst.OrderByDescending(s => s.multi_price).FirstOrDefault()));
+ // 双规格有一组sku
+ var multiPcsSkus = JsonHelper.DeserializeJsonToList(JsonHelper.SerializeObject(addPriceSkuInfoLst.Where(s => s.spec[0].spec_name == multiPcsSku.spec[0].spec_name).ToList()));
+
+ int min = txtMultiPcsSku1.Text.Trim().ParseToInt();
+ int max = txtMultiPcsSku2.Text.Trim().ParseToInt() + 1;
+ if (max <= min)
+ max = min + 1;
+ var multiPcsSpec1 = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(multiPcsSku.spec[0]));
+ var oldSpecName1 = multiPcsSpec1.spec_name;
+ if (skuFakeSpecNameDic1.Values.Contains(oldSpecName1))
+ oldSpecName1 = skuFakeSpecNameDic1.FirstOrDefault(s => s.Value == oldSpecName1).Key;
+ var newSpecName1 = oldSpecName1 + Randomx.GetId(min, max) + txtMultiPcsSku3.Text.Trim();
+ multiPcsSku.spec[0].spec_name = newSpecName1;
+
+ if (1 == 1)
+ {
+ PddApi PddGoodsSpecIdGetApi = new PddApi(shop);
+ PddGoodsSpecIdGetApi.Data["parent_spec_id"] = multiPcsSku.spec[0].parent_id;
+ PddGoodsSpecIdGetApi.Data["spec_name"] = multiPcsSku.spec[0].spec_name;
+ var PddGoodsSpecIdGetApiRst = PddGoodsSpecIdGetApi.PddGoodsSpecIdGet();
+ if (!PddGoodsSpecIdGetApiRst.Contains("\"goods_spec_id_get_response\""))
+ {
+ var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecIdGetApiRst, "error_msg");
+ if (string.IsNullOrEmpty(errMsg))
+ errMsg = PddGoodsSpecIdGetApiRst;
+ return "设置多件Sku失败 " + errMsg;
+ }
+ multiPcsSku.spec[0].spec_id = BaseRegex.GetLongJson(ref PddGoodsSpecIdGetApiRst, "spec_id");
+
+ //List first_spec_lst = new List();
+ //List second_spec_lst = new List();
+ //List new_sku_lst = new List();
+ //foreach (var sku in addPriceSkuInfoLst)
+ //{
+ // if (sku.spec.Count > 0)
+ // {
+ // if (sku.spec[0].parent_id != multiPcsSkuSpec.parent_id && !first_spec_lst.Any(s => s.spec_id == sku.spec[0].spec_id))
+ // {
+ // first_spec_lst.Add(sku.spec[0]);
+ // new_sku_lst.Add(JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(sku)));
+ // }
+ // }
+ // if (sku.spec.Count > 1)
+ // {
+ // if (sku.spec[1].parent_id != multiPcsSkuSpec.parent_id && !second_spec_lst.Any(s => s.spec_id == sku.spec[1].spec_id))
+ // {
+ // second_spec_lst.Add(sku.spec[1]);
+ // new_sku_lst.Add(JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(sku)));
+ // }
+ // }
+ //}
+ //if (new_sku_lst.Count == 0)
+ //{
+ // new_sku_lst.Add(JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(addPriceSkuInfoLst.LastOrDefault())));
+ //}
+ //var maxMultiPcsSkuBasePrice = addPriceSkuInfoLst.Max(s => s.multi_price);
+ foreach (var sku in multiPcsSkus)
+ {
+ //if (sku.spec.Count > 0 && sku.spec[0].parent_id == multiPcsSkuSpec.parent_id)
+ //{
+ // sku.spec[0] = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(multiPcsSkuSpec));
+ //}
+ //else if (sku.spec.Count > 1 && sku.spec[1].parent_id == multiPcsSkuSpec.parent_id)
+ //{
+ // sku.spec[1] = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(multiPcsSkuSpec));
+ //}
+ //sku.thumb_url = multiPcsSku.thumb_url; // 反序列化时已获得
+ sku.thumb_url_file_id = null;
+ sku.spec[0].spec_id = multiPcsSku.spec[0].spec_id;
+ sku.spec[0].spec_name = multiPcsSku.spec[0].spec_name;
+ sku.multi_price = (sku.multi_price * txtMultiPcsSku4.Text.ParseToDecimal()).ParseToInt();
+ sku.price = sku.multi_price + Math.Max(100, this.txtSinglePriceAdd.Text.Trim().ParseToDecimal() * 100).ParseToInt();
+ sku.quantity_delta = 0; // 库存设置为0防止出单
+ sku.quantity = 0;
+ addPriceSkuInfoLst.Add(sku);
+ }
+ }
+ return "success";
+ }
+
+ private string ApiGetPddSku(ref string skuApiString, ShopLoginInfo shop, List addPriceSkuInfoLst, Image fakeImg,
+ Dictionary skuFakeSpecNameDic1, Dictionary skuFakeSpecNameDic2, DataGridViewCell cell)
+ {
+ Dictionary skuImgDic = new Dictionary();
+ // 拼接sku,计算最高价格和最低价格
+ for (int i = 0; i < addPriceSkuInfoLst.Count; i++)
+ {
+ Invoke(new Action(() =>
+ {
+ if (cell != null)
+ cell.Value = "正在拼接Sku " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
+ }));
+
+ string spec = string.Join(",", addPriceSkuInfoLst[i].spec.Select(s => s.spec_id));
+
+ string thumb_url = "";
+ if (!chkActivity.Checked && skuImgDic.ContainsKey(addPriceSkuInfoLst[i].thumb_url)) // 高价加商品每个sku规格写在图片上,各不相同
+ {
+ thumb_url = skuImgDic[addPriceSkuInfoLst[i].thumb_url];
+ }
+ else
+ {
+ string errMsg = "";
+ var imgBase64 = "";
+ float alpha = Math.Min(100, Math.Max(1, txtAlpha.Text.ParseToInt())) / 100f;
+ if (chkActivity.Checked)
+ {
+ //skuFakeSpecNameDic1
+ var text1 = skuFakeSpecNameDic1.FirstOrDefault(s => s.Value == addPriceSkuInfoLst[i].spec[0].spec_name).Key;
+ if (string.IsNullOrEmpty(text1))
+ text1 = addPriceSkuInfoLst[i].spec[0].spec_name;
+ var text2 = skuFakeSpecNameDic2.FirstOrDefault(s => s.Value == addPriceSkuInfoLst[i].spec[1].spec_name).Key.Replace("无规格", "").Replace("默认规格", "");
+ //if (dbProd.cat_name.Contains("鞋"))
+ // text1 = "阿迪代工" + text1;
+ //if (text1.Length + text2.Length <= 6)
+ // text1 = "专柜产品" + text1;
+ //if (text1.Length + text2.Length <= 6)
+ // text2 = "专柜品质 " + text2; // 专柜正品
+ //imgBase64 = PddGetImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url, fakeImg, pbUpgradeVersion.Image, alpha, "到手 " + text1 + " " + text2);
+
+ // 高价sku把文字写在sku图片上
+ imgBase64 = PddGetActivitySkuImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url, fakeImg, pbUpgradeVersion.Image, alpha, text1 + " " + text2, pddUploadRule);
+ }
+ else
+ imgBase64 = PddGetActivitySkuImgBase64ForApi(out errMsg, addPriceSkuInfoLst[i].thumb_url);
+ if (!string.IsNullOrEmpty(errMsg))
+ {
+ return "初始化Sku图片错误 " + errMsg;
+ }
+
+ var pddUpImgApi = new PddApi(shop);
+ pddUpImgApi.Data["image"] = "data:image/jpeg;base64," + imgBase64;
+ var pddUpImgApiRst = pddUpImgApi.PddGoodsImageUpload();
+ if (!pddUpImgApiRst.Contains("\"goods_image_upload_response\""))
+ {
+ errMsg = BaseRegex.GetStringJson(ref pddUpImgApiRst, "error_msg");
+ if (string.IsNullOrEmpty(errMsg))
+ errMsg = pddUpImgApiRst;
+ return "生成Sku图片错误 " + errMsg;
+ }
+ thumb_url = BaseRegex.GetStringJson(ref pddUpImgApiRst, "image_url");
+ skuImgDic[addPriceSkuInfoLst[i].thumb_url] = thumb_url;
+ }
+
+ int weight = addPriceSkuInfoLst[i].weight.IsNullOrZero() ? 1000 : addPriceSkuInfoLst[i].weight.ParseToInt();
+
+ skuApiString += ",{\"is_onsale\":" + addPriceSkuInfoLst[i].is_onsale + ",\"limit_quantity\":" + addPriceSkuInfoLst[i].limit_quantity +
+ ",\"price\":\"" + addPriceSkuInfoLst[i].price + "\",\"weight\":" + weight + ",\"multi_price\":\"" + addPriceSkuInfoLst[i].multi_price +
+ "\",\"thumb_url\":\"" + thumb_url + "\",\"out_sku_sn\":\"" + addPriceSkuInfoLst[i].out_sku_sn +
+ "\",\"quantity\":" + addPriceSkuInfoLst[i].quantity + ",\"spec_id_list\":\"[" + spec + "]\"}";
+
+ }
+ return "success";
+ }
+
void GetToken(ShopLoginInfo shop)
{
diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.Designer.cs
index feedb70..c5d7e95 100644
--- a/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.Designer.cs
+++ b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.Designer.cs
@@ -68,10 +68,6 @@ namespace TemuKJD.WXForms.AdminForms
this.btnRemainOK = new DevComponents.DotNetBar.PanelEx();
this.lblAddProdRemaining = new System.Windows.Forms.Label();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
- this.chkAutoDrag = new System.Windows.Forms.CheckBox();
- this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
- this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
- this.panel3 = new System.Windows.Forms.Panel();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -103,6 +99,10 @@ namespace TemuKJD.WXForms.AdminForms
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.chkAutoDrag = new System.Windows.Forms.CheckBox();
+ this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
+ this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
+ this.panel3 = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -260,6 +260,7 @@ namespace TemuKJD.WXForms.AdminForms
this.lblAddToAccount.TabIndex = 456;
this.lblAddToAccount.Text = "指定账号:";
this.lblAddToAccount.Visible = false;
+ this.lblAddToAccount.Click += new System.EventHandler(this.lblAddToAccount_Click);
//
// btnAddToAccount
//
@@ -669,53 +670,6 @@ namespace TemuKJD.WXForms.AdminForms
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
this.dgvShop.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvShop_CellMouseDown);
//
- // chkAutoDrag
- //
- this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
- this.chkAutoDrag.AutoSize = true;
- this.chkAutoDrag.BackColor = System.Drawing.Color.White;
- this.chkAutoDrag.Location = new System.Drawing.Point(595, 0);
- this.chkAutoDrag.Name = "chkAutoDrag";
- this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
- this.chkAutoDrag.TabIndex = 3;
- this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
- this.chkAutoDrag.UseVisualStyleBackColor = false;
- this.chkAutoDrag.Visible = false;
- //
- // ucSplitPage1
- //
- this.ucSplitPage1.CurrentPage = 1;
- this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
- this.ucSplitPage1.IsShowPageSize = true;
- this.ucSplitPage1.Location = new System.Drawing.Point(882, 0);
- this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
- this.ucSplitPage1.Name = "ucSplitPage1";
- this.ucSplitPage1.PageSize = 50;
- this.ucSplitPage1.Size = new System.Drawing.Size(389, 25);
- this.ucSplitPage1.TabIndex = 4;
- this.ucSplitPage1.TotalPage = 1;
- //
- // statusBar
- //
- this.statusBar.BackColor = System.Drawing.Color.White;
- this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
- this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.statusBar.Location = new System.Drawing.Point(0, 0);
- this.statusBar.Margin = new System.Windows.Forms.Padding(0);
- this.statusBar.Name = "statusBar";
- this.statusBar.Size = new System.Drawing.Size(1271, 25);
- this.statusBar.TabIndex = 1;
- //
- // panel3
- //
- this.panel3.BackColor = System.Drawing.Color.White;
- this.panel3.Controls.Add(this.splitContainer1);
- this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel3.Location = new System.Drawing.Point(1, 33);
- this.panel3.Name = "panel3";
- this.panel3.Size = new System.Drawing.Size(1271, 576);
- this.panel3.TabIndex = 35;
- //
// colSelect
//
this.colSelect.FillWeight = 26F;
@@ -976,6 +930,53 @@ namespace TemuKJD.WXForms.AdminForms
this.colMsg.ReadOnly = true;
this.colMsg.Visible = false;
//
+ // chkAutoDrag
+ //
+ this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
+ this.chkAutoDrag.AutoSize = true;
+ this.chkAutoDrag.BackColor = System.Drawing.Color.White;
+ this.chkAutoDrag.Location = new System.Drawing.Point(595, 0);
+ this.chkAutoDrag.Name = "chkAutoDrag";
+ this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
+ this.chkAutoDrag.TabIndex = 3;
+ this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
+ this.chkAutoDrag.UseVisualStyleBackColor = false;
+ this.chkAutoDrag.Visible = false;
+ //
+ // ucSplitPage1
+ //
+ this.ucSplitPage1.CurrentPage = 1;
+ this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
+ this.ucSplitPage1.IsShowPageSize = true;
+ this.ucSplitPage1.Location = new System.Drawing.Point(882, 0);
+ this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
+ this.ucSplitPage1.Name = "ucSplitPage1";
+ this.ucSplitPage1.PageSize = 50;
+ this.ucSplitPage1.Size = new System.Drawing.Size(389, 25);
+ this.ucSplitPage1.TabIndex = 4;
+ this.ucSplitPage1.TotalPage = 1;
+ //
+ // statusBar
+ //
+ this.statusBar.BackColor = System.Drawing.Color.White;
+ this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.statusBar.Location = new System.Drawing.Point(0, 0);
+ this.statusBar.Margin = new System.Windows.Forms.Padding(0);
+ this.statusBar.Name = "statusBar";
+ this.statusBar.Size = new System.Drawing.Size(1271, 25);
+ this.statusBar.TabIndex = 1;
+ //
+ // panel3
+ //
+ this.panel3.BackColor = System.Drawing.Color.White;
+ this.panel3.Controls.Add(this.splitContainer1);
+ this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel3.Location = new System.Drawing.Point(1, 33);
+ this.panel3.Name = "panel3";
+ this.panel3.Size = new System.Drawing.Size(1271, 576);
+ this.panel3.TabIndex = 35;
+ //
// WXAdminShopListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.cs b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.cs
index edc7ded..5866a0a 100644
--- a/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.cs
+++ b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.cs
@@ -747,5 +747,10 @@ namespace TemuKJD.WXForms.AdminForms
});
}
}
+
+ private void lblAddToAccount_Click(object sender, EventArgs e)
+ {
+
+ }
}
}
diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs
index c76b4ef..05b53b9 100644
--- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs
+++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs
@@ -2939,8 +2939,12 @@ namespace TemuKJD.WXForms.ProductForms
// attrValue = "100 g";
//else if (attr.value == "cm")
// attrValue = "20 cm";
- //else if (attr.value.Contains("岁以上") && attr.value.Contains("个月以上"))
- // attrValue = "7 岁以上";
+ else if (attr.value.Contains("岁以上") && attr.value.Contains("个月以上"))
+ {
+ attrValue = "7 岁以上";
+ if (propInfo.values.FirstOrDefault().value.Contains("岁以上") || propInfo.values.FirstOrDefault().value.Contains("个月以上"))
+ attrValue = propInfo.values.FirstOrDefault().value;
+ }
else if (attr.value == "只;个")
{
if ((propInfo.values.FirstOrDefault()?.value).ParseToString().EndsWith("只") || (propInfo.values.FirstOrDefault()?.value).ParseToString().EndsWith("个"))
diff --git a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs
index 8fe73a0..fa314c7 100644
--- a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs
+++ b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs
@@ -420,7 +420,7 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbCat3.DropDownWidth = 1;
this.cmbCat3.FormattingEnabled = true;
this.cmbCat3.IntegralHeight = false;
- this.cmbCat3.Location = new System.Drawing.Point(718, 5);
+ this.cmbCat3.Location = new System.Drawing.Point(718, 7);
this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat3.Name = "cmbCat3";
this.cmbCat3.Size = new System.Drawing.Size(146, 25);
@@ -448,7 +448,7 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbCat2.DropDownWidth = 1;
this.cmbCat2.FormattingEnabled = true;
this.cmbCat2.IntegralHeight = false;
- this.cmbCat2.Location = new System.Drawing.Point(515, 5);
+ this.cmbCat2.Location = new System.Drawing.Point(515, 7);
this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat2.Name = "cmbCat2";
this.cmbCat2.Size = new System.Drawing.Size(146, 25);
@@ -476,7 +476,7 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbCat1.DropDownWidth = 1;
this.cmbCat1.FormattingEnabled = true;
this.cmbCat1.IntegralHeight = false;
- this.cmbCat1.Location = new System.Drawing.Point(293, 7);
+ this.cmbCat1.Location = new System.Drawing.Point(293, 5);
this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat1.Name = "cmbCat1";
this.cmbCat1.Size = new System.Drawing.Size(146, 25);
@@ -536,7 +536,7 @@ namespace TemuKJD.WXForms.ProductForms
"安全+未校验",
"安全商品",
"未校验"});
- this.cmbWxSafe.Location = new System.Drawing.Point(71, 42);
+ this.cmbWxSafe.Location = new System.Drawing.Point(71, 40);
this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbWxSafe.Name = "cmbWxSafe";
this.cmbWxSafe.Size = new System.Drawing.Size(146, 25);
@@ -559,7 +559,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbGroupFilter.FormattingEnabled = true;
- this.cmbGroupFilter.Location = new System.Drawing.Point(938, 5);
+ this.cmbGroupFilter.Location = new System.Drawing.Point(938, 7);
this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbGroupFilter.Name = "cmbGroupFilter";
this.cmbGroupFilter.Size = new System.Drawing.Size(146, 25);
@@ -580,7 +580,7 @@ namespace TemuKJD.WXForms.ProductForms
"机会商品",
"以图搜品",
"外部数据"});
- this.cmbSourceType.Location = new System.Drawing.Point(718, 40);
+ this.cmbSourceType.Location = new System.Drawing.Point(718, 42);
this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbSourceType.Name = "cmbSourceType";
this.cmbSourceType.Size = new System.Drawing.Size(146, 25);
@@ -610,7 +610,7 @@ namespace TemuKJD.WXForms.ProductForms
"",
"是",
"否"});
- this.cmbRelation.Location = new System.Drawing.Point(938, 40);
+ this.cmbRelation.Location = new System.Drawing.Point(938, 42);
this.cmbRelation.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbRelation.Name = "cmbRelation";
this.cmbRelation.Size = new System.Drawing.Size(146, 25);