1temu用户选择商品三个表及数据库id映射draftid分表操作 2拼多多读取商品显示总数 3temu可以修改单店备注

This commit is contained in:
wule committed 2025-12-19 19:47:53 +08:00
1 parent a61b8786d1
commit 4fd2a4d579
47 files changed
+2146 -1042

No files matched your search

+7 -7
View File
@@ -65,7 +65,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.colExpires = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@@ -378,7 +378,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.colExpires,
this.colShopId,
this.colShopAccount,
this.conNotes,
this.colNotes,
this.colEdit,
this.colDelete});
this.dgvCardCode.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -480,11 +480,11 @@ namespace TemuKJD.KJDForms.AdminForms
this.colShopAccount.Name = "colShopAccount";
this.colShopAccount.ReadOnly = true;
//
// conNotes
// colNotes
//
this.conNotes.HeaderText = "备注";
this.conNotes.Name = "conNotes";
this.conNotes.ReadOnly = true;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colEdit
//
@@ -559,7 +559,7 @@ namespace TemuKJD.KJDForms.AdminForms
private System.Windows.Forms.DataGridViewTextBoxColumn colExpires;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
}
@@ -141,7 +141,7 @@
<metadata name="colShopAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="conNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colEdit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -41,6 +41,7 @@ namespace TemuKJD.KJDForms.AdminForms
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.txtReplaceText = new System.Windows.Forms.TextBox();
this.btnSearchPrice3 = new DevComponents.DotNetBar.PanelEx();
this.numSleep = new System.Windows.Forms.NumericUpDown();
this.lblSleep = new System.Windows.Forms.Label();
@@ -111,6 +112,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.label20 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.chkLessThan = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.label8 = new System.Windows.Forms.Label();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbShopLoading = new System.Windows.Forms.PictureBox();
@@ -156,6 +158,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.chkForceRestoreTitle = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
@@ -223,6 +226,7 @@ namespace TemuKJD.KJDForms.AdminForms
| System.Windows.Forms.AnchorStyles.Right)));
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.txtReplaceText);
this.ucGroupBoxEx1.Controls.Add(this.btnSearchPrice3);
this.ucGroupBoxEx1.Controls.Add(this.numSleep);
this.ucGroupBoxEx1.Controls.Add(this.lblSleep);
@@ -269,6 +273,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.ucGroupBoxEx1.Controls.Add(this.chkFilterSize);
this.ucGroupBoxEx1.Controls.Add(this.chkSearchTime);
this.ucGroupBoxEx1.Controls.Add(this.pnlRestoreSizeAndNumber);
this.ucGroupBoxEx1.Controls.Add(this.label8);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(2, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(1480, 140);
@@ -276,6 +281,13 @@ namespace TemuKJD.KJDForms.AdminForms
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "参数设置";
//
// txtReplaceText
//
this.txtReplaceText.Location = new System.Drawing.Point(964, 36);
this.txtReplaceText.Name = "txtReplaceText";
this.txtReplaceText.Size = new System.Drawing.Size(227, 23);
this.txtReplaceText.TabIndex = 1207;
//
// btnSearchPrice3
//
this.btnSearchPrice3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -412,7 +424,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.btnRestoreSizeAndNumber.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRestoreSizeAndNumber.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRestoreSizeAndNumber.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRestoreSizeAndNumber.Location = new System.Drawing.Point(1092, 51);
this.btnRestoreSizeAndNumber.Location = new System.Drawing.Point(1092, 62);
this.btnRestoreSizeAndNumber.Name = "btnRestoreSizeAndNumber";
this.btnRestoreSizeAndNumber.Size = new System.Drawing.Size(99, 23);
this.btnRestoreSizeAndNumber.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -616,7 +628,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numJudgeWeight
//
this.numJudgeWeight.Location = new System.Drawing.Point(1038, 51);
this.numJudgeWeight.Location = new System.Drawing.Point(1038, 62);
this.numJudgeWeight.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numJudgeWeight.Maximum = new decimal(new int[] {
10000,
@@ -658,7 +670,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numJudgeLen
//
this.numJudgeLen.Location = new System.Drawing.Point(964, 51);
this.numJudgeLen.Location = new System.Drawing.Point(964, 62);
this.numJudgeLen.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numJudgeLen.Maximum = new decimal(new int[] {
299,
@@ -677,7 +689,7 @@ namespace TemuKJD.KJDForms.AdminForms
// lblJudgeLen
//
this.lblJudgeLen.AutoSize = true;
this.lblJudgeLen.Location = new System.Drawing.Point(940, 54);
this.lblJudgeLen.Location = new System.Drawing.Point(940, 65);
this.lblJudgeLen.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblJudgeLen.Name = "lblJudgeLen";
this.lblJudgeLen.Size = new System.Drawing.Size(29, 17);
@@ -753,7 +765,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.btnRestoreProdName.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRestoreProdName.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRestoreProdName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRestoreProdName.Location = new System.Drawing.Point(1092, 17);
this.btnRestoreProdName.Location = new System.Drawing.Point(1092, 12);
this.btnRestoreProdName.Name = "btnRestoreProdName";
this.btnRestoreProdName.Size = new System.Drawing.Size(99, 23);
this.btnRestoreProdName.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -993,7 +1005,7 @@ namespace TemuKJD.KJDForms.AdminForms
// chkFilterTitle
//
this.chkFilterTitle.AutoSize = true;
this.chkFilterTitle.Location = new System.Drawing.Point(927, 18);
this.chkFilterTitle.Location = new System.Drawing.Point(927, 13);
this.chkFilterTitle.Name = "chkFilterTitle";
this.chkFilterTitle.Size = new System.Drawing.Size(171, 21);
this.chkFilterTitle.TabIndex = 857;
@@ -1004,7 +1016,7 @@ namespace TemuKJD.KJDForms.AdminForms
// lblJudgeWeight
//
this.lblJudgeWeight.AutoSize = true;
this.lblJudgeWeight.Location = new System.Drawing.Point(1002, 54);
this.lblJudgeWeight.Location = new System.Drawing.Point(1002, 65);
this.lblJudgeWeight.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblJudgeWeight.Name = "lblJudgeWeight";
this.lblJudgeWeight.Size = new System.Drawing.Size(41, 17);
@@ -1024,7 +1036,7 @@ namespace TemuKJD.KJDForms.AdminForms
// chkFilterSize
//
this.chkFilterSize.AutoSize = true;
this.chkFilterSize.Location = new System.Drawing.Point(927, 55);
this.chkFilterSize.Location = new System.Drawing.Point(927, 66);
this.chkFilterSize.Name = "chkFilterSize";
this.chkFilterSize.Size = new System.Drawing.Size(15, 14);
this.chkFilterSize.TabIndex = 1076;
@@ -1061,15 +1073,15 @@ namespace TemuKJD.KJDForms.AdminForms
this.pnlRestoreSizeAndNumber.Controls.Add(this.label20);
this.pnlRestoreSizeAndNumber.Controls.Add(this.label11);
this.pnlRestoreSizeAndNumber.Controls.Add(this.chkLessThan);
this.pnlRestoreSizeAndNumber.Location = new System.Drawing.Point(920, 76);
this.pnlRestoreSizeAndNumber.Location = new System.Drawing.Point(920, 85);
this.pnlRestoreSizeAndNumber.Name = "pnlRestoreSizeAndNumber";
this.pnlRestoreSizeAndNumber.Size = new System.Drawing.Size(278, 58);
this.pnlRestoreSizeAndNumber.Size = new System.Drawing.Size(278, 52);
this.pnlRestoreSizeAndNumber.TabIndex = 1160;
//
// numPieces
//
this.numPieces.Enabled = false;
this.numPieces.Location = new System.Drawing.Point(125, 3);
this.numPieces.Location = new System.Drawing.Point(125, 2);
this.numPieces.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numPieces.Maximum = new decimal(new int[] {
99999,
@@ -1089,7 +1101,7 @@ namespace TemuKJD.KJDForms.AdminForms
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(109, 6);
this.label17.Location = new System.Drawing.Point(109, 5);
this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(20, 17);
@@ -1098,7 +1110,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numHeight2
//
this.numHeight2.Location = new System.Drawing.Point(231, 31);
this.numHeight2.Location = new System.Drawing.Point(231, 27);
this.numHeight2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numHeight2.Maximum = new decimal(new int[] {
299,
@@ -1116,7 +1128,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numHeight1
//
this.numHeight1.Location = new System.Drawing.Point(197, 31);
this.numHeight1.Location = new System.Drawing.Point(197, 27);
this.numHeight1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numHeight1.Maximum = new decimal(new int[] {
299,
@@ -1134,7 +1146,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numWidth1
//
this.numWidth1.Location = new System.Drawing.Point(108, 31);
this.numWidth1.Location = new System.Drawing.Point(108, 27);
this.numWidth1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numWidth1.Maximum = new decimal(new int[] {
299,
@@ -1152,7 +1164,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numWidth2
//
this.numWidth2.Location = new System.Drawing.Point(142, 31);
this.numWidth2.Location = new System.Drawing.Point(142, 27);
this.numWidth2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numWidth2.Maximum = new decimal(new int[] {
299,
@@ -1170,7 +1182,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numLen1
//
this.numLen1.Location = new System.Drawing.Point(19, 31);
this.numLen1.Location = new System.Drawing.Point(19, 27);
this.numLen1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numLen1.Maximum = new decimal(new int[] {
299,
@@ -1188,7 +1200,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numWeight2
//
this.numWeight2.Location = new System.Drawing.Point(221, 3);
this.numWeight2.Location = new System.Drawing.Point(221, 2);
this.numWeight2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numWeight2.Maximum = new decimal(new int[] {
10000,
@@ -1206,7 +1218,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numWeight1
//
this.numWeight1.Location = new System.Drawing.Point(172, 3);
this.numWeight1.Location = new System.Drawing.Point(172, 2);
this.numWeight1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numWeight1.Maximum = new decimal(new int[] {
99999,
@@ -1224,7 +1236,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numLen2
//
this.numLen2.Location = new System.Drawing.Point(53, 31);
this.numLen2.Location = new System.Drawing.Point(53, 27);
this.numLen2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numLen2.Maximum = new decimal(new int[] {
299,
@@ -1243,7 +1255,7 @@ namespace TemuKJD.KJDForms.AdminForms
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(3, 34);
this.label15.Location = new System.Drawing.Point(3, 30);
this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(20, 17);
@@ -1253,7 +1265,7 @@ namespace TemuKJD.KJDForms.AdminForms
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(92, 34);
this.label18.Location = new System.Drawing.Point(92, 30);
this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(20, 17);
@@ -1263,7 +1275,7 @@ namespace TemuKJD.KJDForms.AdminForms
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(181, 34);
this.label19.Location = new System.Drawing.Point(181, 30);
this.label19.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(20, 17);
@@ -1273,7 +1285,7 @@ namespace TemuKJD.KJDForms.AdminForms
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(155, 6);
this.label20.Location = new System.Drawing.Point(155, 5);
this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(20, 17);
@@ -1283,7 +1295,7 @@ namespace TemuKJD.KJDForms.AdminForms
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(77, 6);
this.label11.Location = new System.Drawing.Point(77, 5);
this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(44, 17);
@@ -1293,7 +1305,7 @@ namespace TemuKJD.KJDForms.AdminForms
// chkLessThan
//
this.chkLessThan.AutoSize = true;
this.chkLessThan.Location = new System.Drawing.Point(7, 4);
this.chkLessThan.Location = new System.Drawing.Point(7, 3);
this.chkLessThan.Name = "chkLessThan";
this.chkLessThan.Size = new System.Drawing.Size(75, 21);
this.chkLessThan.TabIndex = 1160;
@@ -1301,6 +1313,16 @@ namespace TemuKJD.KJDForms.AdminForms
this.chkLessThan.UseVisualStyleBackColor = true;
this.chkLessThan.CheckedChanged += new System.EventHandler(this.chkLessThan_CheckedChanged);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(924, 39);
this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(44, 17);
this.label8.TabIndex = 1208;
this.label8.Text = "过滤词";
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1831,6 +1853,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.chkForceRestoreTitle);
this.splitContainer4.Panel2.Controls.Add(this.statusBar);
this.splitContainer4.Size = new System.Drawing.Size(1484, 26);
this.splitContainer4.SplitterDistance = 322;
@@ -1850,6 +1873,18 @@ namespace TemuKJD.KJDForms.AdminForms
this.ucSplitPage1.TotalPage = 1;
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
//
// chkForceRestoreTitle
//
this.chkForceRestoreTitle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkForceRestoreTitle.AutoSize = true;
this.chkForceRestoreTitle.Location = new System.Drawing.Point(1031, 0);
this.chkForceRestoreTitle.Name = "chkForceRestoreTitle";
this.chkForceRestoreTitle.Size = new System.Drawing.Size(123, 21);
this.chkForceRestoreTitle.TabIndex = 1077;
this.chkForceRestoreTitle.Text = "强制还原英文标题";
this.chkForceRestoreTitle.UseVisualStyleBackColor = true;
this.chkForceRestoreTitle.Visible = false;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
@@ -1913,6 +1948,7 @@ namespace TemuKJD.KJDForms.AdminForms
((System.ComponentModel.ISupportInitialize)(this.dgvPriceCheck)).EndInit();
this.splitContainer4.Panel1.ResumeLayout(false);
this.splitContainer4.Panel2.ResumeLayout(false);
this.splitContainer4.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false);
this.ResumeLayout(false);
@@ -2039,5 +2075,8 @@ namespace TemuKJD.KJDForms.AdminForms
private System.Windows.Forms.Panel pnlRestoreSizeAndNumber;
private DevComponents.DotNetBar.PanelEx btnSearchPrice3;
private UserComponent.UcCheckBox chkLessThan;
private System.Windows.Forms.TextBox txtReplaceText;
private System.Windows.Forms.Label label8;
private UserComponent.UcCheckBox chkForceRestoreTitle;
}
}
@@ -74,6 +74,12 @@ namespace TemuKJD.KJDForms.AdminForms
//dgvShop.Columns["colSubSa"].Visible = false;
//btnSetSubSa.Visible = false;
}
if (BaseClass.SaLevel == 1 && ClientMode == EnumClientMode.Admin)
{
//chkForceRestoreTitle.Visible = true;
}
if (ClientMode != EnumClientMode.Admin)
{
ucSplitPage1.Visible = false;
@@ -1162,6 +1168,22 @@ namespace TemuKJD.KJDForms.AdminForms
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
}
private string editPriceProductNameAndEnNameBatchAdd(ShopLoginInfo shop, string productId)
{
string url = "https://agentseller.temu.com/lich-mms/audit/edit/task/product/batchAdd";
string body = @"{""bizIdType"":1,""bizIds"":[" + productId + @"],""productEditItems"":[{""editItem"":1,""editAdvice"":""优化""},{""editItem"":2,""editAdvice"":""优化""}]}";
string referer = "https://agentseller.temu.com/goods/list?productId=" + productId;
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
}
private string editPriceProductEnNameBatchAdd(ShopLoginInfo shop, string productId)
{
string url = "https://agentseller.temu.com/lich-mms/audit/edit/task/product/batchAdd";
string body = @"{""bizIdType"":1,""bizIds"":[" + productId + @"],""productEditItems"":[{""editItem"":2,""editAdvice"":""优化""}]}";
string referer = "https://agentseller.temu.com/goods/list?productId=" + productId;
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
}
private string editPriceProductName(ShopLoginInfo shop, string taskUid, string productId, string productNewName)
{
string url = "https://agentseller.temu.com/visage-agent-seller/product/edit/task/reply";
@@ -1170,6 +1192,27 @@ namespace TemuKJD.KJDForms.AdminForms
string referer = "https://agentseller.temu.com/goods/edit?from=platform&productId=" + productId + "&taskUid=" + taskUid;
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
}
private string editPriceProductNameAndEnName(ShopLoginInfo shop, string taskUid, string productId, string productNewName)
{
string url = "https://agentseller.temu.com/visage-agent-seller/product/edit/task/reply";
string body = "";
body = @"{""productId"":" + productId + @",""taskUid"":""" + taskUid + @""",""taskVersion"":0,""refuseEdit"":false," +
@"""productName"":""" + productNewName + @""",""productI18nReqs"":[{""productName"":""" + productNewName + @""",""language"":""en""}]}";
string referer = "https://agentseller.temu.com/goods/edit?from=platform&productId=" + productId + "&taskUid=" + taskUid;
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
}
private string editPriceProductEnName(ShopLoginInfo shop, string taskUid, string productId, string productNewName)
{
string url = "https://agentseller.temu.com/visage-agent-seller/product/edit/task/reply";
string body = "";
body = @"{""productId"":" + productId + @",""taskUid"":""" + taskUid + @""",""taskVersion"":0,""refuseEdit"":false," +
@"""productI18nReqs"":[{""productName"":""" + productNewName + @""",""language"":""en""}]}";
string referer = "https://agentseller.temu.com/goods/edit?from=platform&productId=" + productId + "&taskUid=" + taskUid;
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
}
//申请修改 SKU分类和包装清单 体积与重量 商品名称
//{"bizIdType":1,"bizIds":[8942170367],"productEditItems":[{"editItem":4,"editAdvice":"12345"},{"editItem":8,"editAdvice":"54321"},{"editItem":1,"editAdvice":"33333"}]}
@@ -1270,7 +1313,7 @@ namespace TemuKJD.KJDForms.AdminForms
}
var pName = price.productName;
if (CheckRestoreTitleWords(pName))
if (CheckRestoreTitleWords(pName) || chkForceRestoreTitle.Checked)
{
}
else
@@ -1283,16 +1326,44 @@ namespace TemuKJD.KJDForms.AdminForms
continue;
}
var html = editPriceProductNameBatchAdd(shop, price.productId.ParseToString());
var html = "";
var isRestoreEnName = false;
//// 中文标题不为空大概率加了英文标题了,一并还原英文标题
//if (ProductSelectForms.DbProductSelectListManageForm.CountChineseCharacters(pName) <= 0 )
//{
// isRestoreEnName = true;
// //if (chkForceRestoreTitle.Checked) // 强制还原英文标题功能已移除
// // html = editPriceProductEnNameBatchAdd(shop, price.productId.ParseToString());
// //else
// html = editPriceProductNameAndEnNameBatchAdd(shop, price.productId.ParseToString());
//}
if (!isRestoreEnName) // 商品上传时已禁止英文标题头尾词,此处默认只还原商品主标题
{
html = editPriceProductNameBatchAdd(shop, price.productId.ParseToString());
}
//{"success":true,"errorCode":1000000,"errorMsg":null,"result":{"handleFailedList":[{"failedBizId":4432690492,"failedReason":"This product has pending or in-progress modification tasks, cannot initiate again"}],"addFailedList":[{"failedBizId":4432690492,"failedReason":"This product has pending or in-progress modification tasks, cannot initiate again","failedReasonType":8}],"successBizId2TaskUidMap":{}}}
string taskUid = "";
if (html.Contains("This product has pending or in-progress modification tasks"))
{
Invoke(new Action(() =>
var taskHtml = editPriceProductSizeAndNumberTaskQuery(shop, price.productId.ParseToString());
taskUid = BaseRegex.GetStringJson(ref taskHtml, "taskUid");
//if (string.IsNullOrEmpty(taskUid) || !taskHtml.Contains("\"productEditTaskItems\":[{\"editItem\":1,\"editAdvice\":\"优化\"}]"))
if (string.IsNullOrEmpty(taskUid) || !taskHtml.Contains("\"productEditTaskItems\":[{\"editItem\":1,"))
{
foreach (var row in rows)
row.Cells["colMsg"].Value = "已提交过修改任务";
}));
continue;
Invoke(new Action(() =>
{
foreach (var row in rows)
row.Cells["colMsg"].Value = "已提交过修改任务或商品有其他修改任务,请在后店铺台终止任务并稍候重试";
}));
return; //continue;
}
//Invoke(new Action(() =>
//{
// foreach (var row in rows)
// row.Cells["colMsg"].Value = "已提交过修改任务";
//}));
//continue;
}
if (!html.Contains("\"success\":true"))
{
@@ -1319,11 +1390,14 @@ namespace TemuKJD.KJDForms.AdminForms
try
{
JObject jObj = JObject.Parse(html);
var item = jObj["result"]["successBizId2TaskUidMap"].LastOrDefault().LastOrDefault();
if (string.IsNullOrEmpty(taskUid))
{
JObject jObj = JObject.Parse(html);
taskUid = jObj["result"]["successBizId2TaskUidMap"].LastOrDefault().LastOrDefault().ParseToString();
}
// 还原原始标题
var newPName = RestoreProductName(pName);
var newProdName = RestoreProductName(pName, txtReplaceText.Text.Trim());
// 测试修改标题最多字符数量
//while (newPName.Length < 500)
@@ -1331,7 +1405,15 @@ namespace TemuKJD.KJDForms.AdminForms
// newPName += "长";
//}
html = editPriceProductName(shop, item.ParseToString(), price.productId.ParseToString(), newPName);
if (isRestoreEnName)
{
//if (chkForceRestoreTitle.Checked) // 强制还原英文标题功能已移除
// html = editPriceProductEnName(shop, item.ParseToString(), price.productId.ParseToString(), newProdName);
//else
html = editPriceProductNameAndEnName(shop, taskUid, price.productId.ParseToString(), newProdName);
}
else
html = editPriceProductName(shop, taskUid, price.productId.ParseToString(), newProdName);
Thread.Sleep(Randomx.GetId(25, 75));
commonSleep();
if (html.Contains("\"success\":true"))
@@ -1707,10 +1789,10 @@ namespace TemuKJD.KJDForms.AdminForms
bool CheckRestoreTitleWords(string filterProdName)
{
return filterProdName != RestoreProductName(filterProdName);
return filterProdName != RestoreProductName(filterProdName, txtReplaceText.Text.Trim());
}
public static string RestoreProductName(string pName)
public static string RestoreProductName(string pName, string replaceTxt = "")
{
string checkChineseName = pName.Replace("适合不同的搭配风格", "").Replace("个", "").Replace("适合不同的搭配场景", "");
bool containsChinese = Regex.IsMatch(checkChineseName, @"[\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF]");
@@ -1738,6 +1820,9 @@ namespace TemuKJD.KJDForms.AdminForms
newPName = newPName.Replace("适合不同的搭配风格", "Suitable for " + headword + " different matching styles").Trim()
.Replace("适合不同的搭配场景", "Suitable for " + headword + " different matching scenarios").Trim();
}
if (!string.IsNullOrWhiteSpace(replaceTxt))
newPName = newPName.Replace(replaceTxt, "");
return newPName;
}
@@ -1805,7 +1890,7 @@ namespace TemuKJD.KJDForms.AdminForms
Invoke(new Action(() =>
{
foreach (var row in rows)
row.Cells["colMsg"].Value = "已提交过修改任务或商品有其他修改任务";
row.Cells["colMsg"].Value = "已提交过修改任务或商品有其他修改任务,请在后店铺台终止任务并稍候重试";
}));
return; //continue;
}
@@ -1856,7 +1941,7 @@ namespace TemuKJD.KJDForms.AdminForms
Invoke(new Action(() =>
{
foreach (var row in rows)
row.Cells["colMsg"].Value = "已提交过修改任务";
row.Cells["colMsg"].Value = "已提交过修改任务,请在后店铺台终止任务并稍候重试";
}));
return; // continue;
}
+99 -86
View File
@@ -29,11 +29,11 @@ namespace TemuKJD.KJDForms.AdminForms
/// </summary>
private void InitializeComponent()
{
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();
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();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.panel5 = new System.Windows.Forms.Panel();
@@ -57,17 +57,22 @@ namespace TemuKJD.KJDForms.AdminForms
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.pnlAddProdRemaining = new System.Windows.Forms.Panel();
this.lblShopId = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.pnlCancel = new DevComponents.DotNetBar.PanelEx();
this.numAddRemaining = new System.Windows.Forms.NumericUpDown();
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.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEditNotes = new System.Windows.Forms.DataGridViewLinkColumn();
this.colMinus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPlus = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -92,10 +97,6 @@ namespace TemuKJD.KJDForms.AdminForms
this.colSubSa = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.lblShopId = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -413,6 +414,16 @@ namespace TemuKJD.KJDForms.AdminForms
this.pnlAddProdRemaining.TabIndex = 7;
this.pnlAddProdRemaining.Visible = false;
//
// lblShopId
//
this.lblShopId.AutoSize = true;
this.lblShopId.Location = new System.Drawing.Point(20, 19);
this.lblShopId.Name = "lblShopId";
this.lblShopId.Size = new System.Drawing.Size(50, 17);
this.lblShopId.TabIndex = 455;
this.lblShopId.Text = "ShopId";
this.lblShopId.Visible = false;
//
// panel2
//
this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top;
@@ -497,26 +508,28 @@ namespace TemuKJD.KJDForms.AdminForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
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)))));
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;
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;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colLoginName,
this.colShopId,
this.colShopAccount,
this.conNotes,
this.colNotes,
this.colEditNotes,
this.colMinus,
this.colProductRemaining,
this.colPlus,
@@ -552,6 +565,43 @@ namespace TemuKJD.KJDForms.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(597, 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 = false;
this.ucSplitPage1.Location = new System.Drawing.Point(911, 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(362, 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(1273, 25);
this.statusBar.TabIndex = 1;
//
// colSelect
//
this.colSelect.FillWeight = 26F;
@@ -581,16 +631,25 @@ namespace TemuKJD.KJDForms.AdminForms
this.colShopAccount.Name = "colShopAccount";
this.colShopAccount.ReadOnly = true;
//
// conNotes
// colNotes
//
this.conNotes.HeaderText = "备注";
this.conNotes.Name = "conNotes";
this.conNotes.ReadOnly = true;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colEditNotes
//
this.colEditNotes.FillWeight = 25F;
this.colEditNotes.HeaderText = "编辑备注";
this.colEditNotes.Name = "colEditNotes";
this.colEditNotes.ReadOnly = true;
this.colEditNotes.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colEditNotes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colMinus
//
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colMinus.DefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colMinus.DefaultCellStyle = dataGridViewCellStyle3;
this.colMinus.FillWeight = 15F;
this.colMinus.HeaderText = "-";
this.colMinus.Name = "colMinus";
@@ -599,8 +658,8 @@ namespace TemuKJD.KJDForms.AdminForms
//
// colProductRemaining
//
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colProductRemaining.DefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colProductRemaining.DefaultCellStyle = dataGridViewCellStyle4;
this.colProductRemaining.FillWeight = 30F;
this.colProductRemaining.HeaderText = "选品限额";
this.colProductRemaining.Name = "colProductRemaining";
@@ -608,8 +667,8 @@ namespace TemuKJD.KJDForms.AdminForms
//
// colPlus
//
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colPlus.DefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colPlus.DefaultCellStyle = dataGridViewCellStyle5;
this.colPlus.FillWeight = 15F;
this.colPlus.HeaderText = "+";
this.colPlus.Name = "colPlus";
@@ -793,53 +852,6 @@ namespace TemuKJD.KJDForms.AdminForms
this.colDelete.ReadOnly = true;
this.colDelete.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(597, 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 = false;
this.ucSplitPage1.Location = new System.Drawing.Point(911, 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(362, 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(1273, 25);
this.statusBar.TabIndex = 1;
//
// lblShopId
//
this.lblShopId.AutoSize = true;
this.lblShopId.Location = new System.Drawing.Point(20, 19);
this.lblShopId.Name = "lblShopId";
this.lblShopId.Size = new System.Drawing.Size(50, 17);
this.lblShopId.TabIndex = 455;
this.lblShopId.Text = "ShopId";
this.lblShopId.Visible = false;
//
// AdminShopListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -902,11 +914,19 @@ namespace TemuKJD.KJDForms.AdminForms
private System.Windows.Forms.Label label5;
private System.Windows.Forms.CheckBox chkShowDelete;
private UserControls.ButtonEx btnSetSubSa;
private System.Windows.Forms.Panel pnlAddProdRemaining;
private System.Windows.Forms.Label lblAddProdRemaining;
private System.Windows.Forms.NumericUpDown numAddRemaining;
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.PanelEx btnRemainOK;
private DevComponents.DotNetBar.PanelEx pnlCancel;
private System.Windows.Forms.Label lblShopId;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colMinus;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductRemaining;
private System.Windows.Forms.DataGridViewTextBoxColumn colPlus;
@@ -931,12 +951,5 @@ namespace TemuKJD.KJDForms.AdminForms
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSa;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.Panel pnlAddProdRemaining;
private System.Windows.Forms.Label lblAddProdRemaining;
private System.Windows.Forms.NumericUpDown numAddRemaining;
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.PanelEx btnRemainOK;
private DevComponents.DotNetBar.PanelEx pnlCancel;
private System.Windows.Forms.Label lblShopId;
}
}
@@ -48,6 +48,9 @@ namespace TemuKJD.KJDForms.AdminForms
this.dgvShop.AddSelectorColumn("colSelect");
this.dgvShop.AddMergeColumnHeader(new List<string>() { /*"colMinus",*/ "colProductRemaining", "colPlus" }, "选品限额");
this.dgvShop.AddMergeColumn(new List<string>() { /*"colMinus",*/ "colProductRemaining", "colPlus" });
this.dgvShop.AddMergeColumnHeader(new List<string>() { "colNotes", "colEditNotes" }, "备注");
this.dgvShop.AddMergeColumn(new List<string>() { "colNotes", "colEditNotes" });
this.dgvShop.Columns["colEditNotes"].Width = 30;
this.dgvShop.Columns["colMinus"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
this.dgvShop.Columns["colPlus"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
@@ -112,6 +115,7 @@ namespace TemuKJD.KJDForms.AdminForms
shop.ShopId,
shop.ShopAccount,
shop.Notes,
"编辑",
"-",
shop.AddProductRemaining,
"+",
@@ -211,8 +215,10 @@ namespace TemuKJD.KJDForms.AdminForms
return;
string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText;
string loginName = dgvShop.Rows[e.RowIndex].Cells["colLoginName"].Value.ParseToString();
string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString();
var shop = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == loginName && v.ShopId == accountId);
string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString();
string userName = dgvShop.Rows[e.RowIndex].Cells["colUser"].Value.ParseToString();
var shop = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == loginName && v.ShopId == accountId && v.UserName == userName);
switch (headerText)
{
@@ -291,9 +297,28 @@ namespace TemuKJD.KJDForms.AdminForms
SearchShop(this.ucSplitPage1.CurrentPage);
break;
case "编辑":
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.SaveCompleteWithDescribe += EditForm_SaveCompleteWithDescribe;
editForm.ShowDialog();
{
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.txtNotes.ReadOnly = true;
editForm.txtNotes.Enabled = false;
editForm.SaveCompleteWithDescribe += EditForm_SaveCompleteWithDescribe;
editForm.ShowDialog();
}
break;
case "编辑备注":
{
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.txtChatAccount.ReadOnly = true;
editForm.txtChatAccount.Enabled = false;
editForm.txtShopPassword.ReadOnly = true;
editForm.txtShopPassword.Enabled = false;
editForm.ShowDialog();
if (editForm.HasChange)
{
ShopBLL.AdminMdyServerShop(shop, true);
SearchShop(this.ucSplitPage1.CurrentPage);
}
}
break;
case "登录":
IsOperate = true;
@@ -129,7 +129,10 @@
<metadata name="colShopAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="conNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colEditNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMinus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -353,17 +353,21 @@ namespace TemuKJD.KJDForms.AdminForms
private string ProductQuery(ShopLoginInfo shop, string prodId)
{
string url = "https://seller.kuajingmaihuo.com/bg-visage-mms/product/query";
url = "https://agentseller.temu.com/visage-agent-seller/product/query";
string body = @"{""productId"":" + prodId + @",""productEditTaskUid"":""""}";
string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?from=productList&productId=" + prodId;
return HttpResponseBLL.PostResponse(shop, url, body, refere);
refere = "https://agentseller.temu.com/goods/edit?from=productList&productId=" + prodId;
return HttpResponseBLL.PostResponse2(shop, url, body, refere);
}
private string SizeSpecQuery(ShopLoginInfo shop, string prodId, string sizeSpecId)
{
string url = "https://seller.kuajingmaihuo.com/bg-anniston-mms/sizespec/query";
url = "https://agentseller.temu.com/anniston-agent-seller/sizespec/query";
string body = @"{""businessId"":" + sizeSpecId + @",""reusable"":false}";
string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?from=productList&productId=" + prodId;
return HttpResponseBLL.PostResponse(shop, url, body, refere);
refere = "https://agentseller.temu.com/goods/edit?from=productList&productId=" + prodId;
return HttpResponseBLL.PostResponse2(shop, url, body, refere);
}
}
}
@@ -67,8 +67,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
url = BaseClass.BuildObjString("product/mdy_product_select_notes");
else
url = BaseClass.BuildObjString("product_third/mdy_product_select_notes");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbProdSelect.id + "&notes=" + this.txtNotes.Text.Trim();
var data = UserLogin.GetSignaturex();
data += "&db_id=" + dbProdSelect.id;
data += "&select_add_time=" + dbProdSelect.add_time.ToString("yyyy-MM-dd HH:mm:ss");
data += "&notes=" + this.txtNotes.Text.Trim();
data += "&user_notes=" + this.cmbUserNotes.Text.Trim();
if (IsClientJit)
data += "&is_client_jit=true";
@@ -88,8 +90,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
data += "&fission_product_name=" + txtProdName.Text.Trim();
}
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -43,16 +43,14 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectListManageForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.numMaxWaitSecond = new System.Windows.Forms.NumericUpDown();
this.label22 = new System.Windows.Forms.Label();
this.pbFissionSetting = new System.Windows.Forms.PictureBox();
this.btnForceEnable = new DevComponents.DotNetBar.PanelEx();
this.label22 = new System.Windows.Forms.Label();
this.txtNotChangeMainImg = new System.Windows.Forms.TextBox();
this.chkNoSubSa = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkNotChangeMainImg = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkAiSkuAndMainImg = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkLongTitle = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkSameExtcodeRandomMainImg = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.lblSkuRandomLetterNotes = new System.Windows.Forms.Label();
this.btnAdd = new DevComponents.DotNetBar.PanelEx();
this.lblSkuRandomLetterNotes = new System.Windows.Forms.Label();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.label9 = new System.Windows.Forms.Label();
this.txtSkuHeadText = new System.Windows.Forms.TextBox();
@@ -119,7 +117,12 @@
this.cmbUserNotes = new System.Windows.Forms.ComboBox();
this.lblUserNotes = new System.Windows.Forms.Label();
this.chkAddPrice = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.chkAiSkuAndMainImg = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkSameExtcodeRandomMainImg = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkLongTitle = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkEnglishProdName = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkUseGlobalProductWords = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pnlError = new DevComponents.DotNetBar.PanelEx();
this.lblError = new System.Windows.Forms.Label();
@@ -173,6 +176,7 @@
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numMaxWaitSecond)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbFissionSetting)).BeginInit();
this.flowLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numSkuRandomPrice)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numUnitNum2)).BeginInit();
@@ -188,6 +192,7 @@
((System.ComponentModel.ISupportInitialize)(this.numAddPrice)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numAddPriceTimes)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.flowLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
@@ -212,16 +217,14 @@
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.numMaxWaitSecond);
this.splitContainer1.Panel1.Controls.Add(this.label22);
this.splitContainer1.Panel1.Controls.Add(this.pbFissionSetting);
this.splitContainer1.Panel1.Controls.Add(this.btnForceEnable);
this.splitContainer1.Panel1.Controls.Add(this.label22);
this.splitContainer1.Panel1.Controls.Add(this.txtNotChangeMainImg);
this.splitContainer1.Panel1.Controls.Add(this.chkNoSubSa);
this.splitContainer1.Panel1.Controls.Add(this.chkNotChangeMainImg);
this.splitContainer1.Panel1.Controls.Add(this.chkAiSkuAndMainImg);
this.splitContainer1.Panel1.Controls.Add(this.chkLongTitle);
this.splitContainer1.Panel1.Controls.Add(this.chkSameExtcodeRandomMainImg);
this.splitContainer1.Panel1.Controls.Add(this.lblSkuRandomLetterNotes);
this.splitContainer1.Panel1.Controls.Add(this.btnAdd);
this.splitContainer1.Panel1.Controls.Add(this.lblSkuRandomLetterNotes);
this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanel1);
this.splitContainer1.Panel1.Controls.Add(this.btnSetSubSa);
this.splitContainer1.Panel1.Controls.Add(this.btnReFission);
@@ -254,7 +257,8 @@
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel1);
this.splitContainer1.Panel1.Controls.Add(this.chkAddPrice);
this.splitContainer1.Panel1.Controls.Add(this.chkEnglishProdName);
this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanel2);
this.splitContainer1.Panel1.Controls.Add(this.chkUseGlobalProductWords);
//
// splitContainer1.Panel2
//
@@ -265,7 +269,9 @@
//
// numMaxWaitSecond
//
this.numMaxWaitSecond.Location = new System.Drawing.Point(104, 95);
this.numMaxWaitSecond.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.numMaxWaitSecond.Font = new System.Drawing.Font("微软雅黑", 8F);
this.numMaxWaitSecond.Location = new System.Drawing.Point(1328, 68);
this.numMaxWaitSecond.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numMaxWaitSecond.Maximum = new decimal(new int[] {
500,
@@ -278,7 +284,7 @@
0,
0});
this.numMaxWaitSecond.Name = "numMaxWaitSecond";
this.numMaxWaitSecond.Size = new System.Drawing.Size(49, 23);
this.numMaxWaitSecond.Size = new System.Drawing.Size(38, 22);
this.numMaxWaitSecond.TabIndex = 745;
this.numMaxWaitSecond.Value = new decimal(new int[] {
120,
@@ -287,15 +293,17 @@
0});
this.numMaxWaitSecond.ValueChanged += new System.EventHandler(this.numMaxWaitSecond_ValueChanged);
//
// label22
// pbFissionSetting
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(3, 98);
this.label22.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(112, 17);
this.label22.TabIndex = 744;
this.label22.Text = "最大等待时间(秒):";
this.pbFissionSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pbFissionSetting.Image = global::TemuKJD.Properties.Resources.齿轮;
this.pbFissionSetting.Location = new System.Drawing.Point(1228, 68);
this.pbFissionSetting.Name = "pbFissionSetting";
this.pbFissionSetting.Size = new System.Drawing.Size(22, 22);
this.pbFissionSetting.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbFissionSetting.TabIndex = 774;
this.pbFissionSetting.TabStop = false;
this.pbFissionSetting.Click += new System.EventHandler(this.pbFissionSetting_Click);
//
// btnForceEnable
//
@@ -303,10 +311,10 @@
this.btnForceEnable.CanvasColor = System.Drawing.SystemColors.Control;
this.btnForceEnable.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnForceEnable.DisabledBackColor = System.Drawing.Color.Empty;
this.btnForceEnable.Location = new System.Drawing.Point(1340, 67);
this.btnForceEnable.Location = new System.Drawing.Point(1370, 67);
this.btnForceEnable.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnForceEnable.Name = "btnForceEnable";
this.btnForceEnable.Size = new System.Drawing.Size(174, 24);
this.btnForceEnable.Size = new System.Drawing.Size(144, 24);
this.btnForceEnable.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnForceEnable.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnForceEnable.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
@@ -320,9 +328,20 @@
this.btnForceEnable.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnForceEnable.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnForceEnable.TabIndex = 722;
this.btnForceEnable.Text = "强制解锁按钮(上传卡住时用)";
this.btnForceEnable.Text = "强制解锁(上传卡住时用)";
this.btnForceEnable.Click += new System.EventHandler(this.btnForceEnable_Click);
//
// label22
//
this.label22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(1251, 71);
this.label22.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(88, 17);
this.label22.TabIndex = 744;
this.label22.Text = "超时跳过(秒):";
//
// txtNotChangeMainImg
//
this.txtNotChangeMainImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -359,54 +378,6 @@
this.chkNotChangeMainImg.Text = "第 张主图不替换";
this.chkNotChangeMainImg.UseVisualStyleBackColor = true;
//
// chkAiSkuAndMainImg
//
this.chkAiSkuAndMainImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkAiSkuAndMainImg.AutoSize = true;
this.chkAiSkuAndMainImg.Location = new System.Drawing.Point(1221, 96);
this.chkAiSkuAndMainImg.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkAiSkuAndMainImg.Name = "chkAiSkuAndMainImg";
this.chkAiSkuAndMainImg.Size = new System.Drawing.Size(152, 21);
this.chkAiSkuAndMainImg.TabIndex = 680;
this.chkAiSkuAndMainImg.Text = "sku随机AI图+随机转主";
this.chkAiSkuAndMainImg.UseVisualStyleBackColor = true;
//
// chkLongTitle
//
this.chkLongTitle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkLongTitle.AutoSize = true;
this.chkLongTitle.Location = new System.Drawing.Point(937, 96);
this.chkLongTitle.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkLongTitle.Name = "chkLongTitle";
this.chkLongTitle.Size = new System.Drawing.Size(96, 21);
this.chkLongTitle.TabIndex = 660;
this.chkLongTitle.Text = "500字长标题";
this.chkLongTitle.UseVisualStyleBackColor = true;
//
// chkSameExtcodeRandomMainImg
//
this.chkSameExtcodeRandomMainImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkSameExtcodeRandomMainImg.AutoSize = true;
this.chkSameExtcodeRandomMainImg.Location = new System.Drawing.Point(1033, 96);
this.chkSameExtcodeRandomMainImg.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkSameExtcodeRandomMainImg.Name = "chkSameExtcodeRandomMainImg";
this.chkSameExtcodeRandomMainImg.Size = new System.Drawing.Size(188, 21);
this.chkSameExtcodeRandomMainImg.TabIndex = 488;
this.chkSameExtcodeRandomMainImg.Text = "同货号主图随机+sku随机转主";
this.chkSameExtcodeRandomMainImg.UseVisualStyleBackColor = true;
//
// lblSkuRandomLetterNotes
//
this.lblSkuRandomLetterNotes.AutoSize = true;
this.lblSkuRandomLetterNotes.Font = new System.Drawing.Font("微软雅黑", 9F);
this.lblSkuRandomLetterNotes.ForeColor = System.Drawing.SystemColors.MenuHighlight;
this.lblSkuRandomLetterNotes.Location = new System.Drawing.Point(959, 71);
this.lblSkuRandomLetterNotes.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblSkuRandomLetterNotes.Name = "lblSkuRandomLetterNotes";
this.lblSkuRandomLetterNotes.Size = new System.Drawing.Size(150, 17);
this.lblSkuRandomLetterNotes.TabIndex = 641;
this.lblSkuRandomLetterNotes.Text = "备注:SKU随机字符包括…";
//
// btnAdd
//
this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -432,6 +403,18 @@
this.btnAdd.Text = "一键上传";
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// lblSkuRandomLetterNotes
//
this.lblSkuRandomLetterNotes.AutoSize = true;
this.lblSkuRandomLetterNotes.Font = new System.Drawing.Font("微软雅黑", 9F);
this.lblSkuRandomLetterNotes.ForeColor = System.Drawing.SystemColors.MenuHighlight;
this.lblSkuRandomLetterNotes.Location = new System.Drawing.Point(3, 98);
this.lblSkuRandomLetterNotes.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblSkuRandomLetterNotes.Name = "lblSkuRandomLetterNotes";
this.lblSkuRandomLetterNotes.Size = new System.Drawing.Size(150, 17);
this.lblSkuRandomLetterNotes.TabIndex = 641;
this.lblSkuRandomLetterNotes.Text = "备注:SKU随机字符包括…";
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@@ -1420,12 +1403,61 @@
this.chkAddPrice.Text = "加价";
this.chkAddPrice.UseVisualStyleBackColor = true;
//
// flowLayoutPanel2
//
this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel2.Controls.Add(this.chkAiSkuAndMainImg);
this.flowLayoutPanel2.Controls.Add(this.chkSameExtcodeRandomMainImg);
this.flowLayoutPanel2.Controls.Add(this.chkLongTitle);
this.flowLayoutPanel2.Controls.Add(this.chkEnglishProdName);
this.flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
this.flowLayoutPanel2.Location = new System.Drawing.Point(832, 96);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(538, 23);
this.flowLayoutPanel2.TabIndex = 500;
//
// chkAiSkuAndMainImg
//
this.chkAiSkuAndMainImg.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkAiSkuAndMainImg.AutoSize = true;
this.chkAiSkuAndMainImg.Location = new System.Drawing.Point(386, 0);
this.chkAiSkuAndMainImg.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0);
this.chkAiSkuAndMainImg.Name = "chkAiSkuAndMainImg";
this.chkAiSkuAndMainImg.Size = new System.Drawing.Size(152, 21);
this.chkAiSkuAndMainImg.TabIndex = 680;
this.chkAiSkuAndMainImg.Text = "sku随机AI图+随机转主";
this.chkAiSkuAndMainImg.UseVisualStyleBackColor = true;
//
// chkSameExtcodeRandomMainImg
//
this.chkSameExtcodeRandomMainImg.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkSameExtcodeRandomMainImg.AutoSize = true;
this.chkSameExtcodeRandomMainImg.Location = new System.Drawing.Point(196, 0);
this.chkSameExtcodeRandomMainImg.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0);
this.chkSameExtcodeRandomMainImg.Name = "chkSameExtcodeRandomMainImg";
this.chkSameExtcodeRandomMainImg.Size = new System.Drawing.Size(188, 21);
this.chkSameExtcodeRandomMainImg.TabIndex = 488;
this.chkSameExtcodeRandomMainImg.Text = "同货号主图随机+sku随机转主";
this.chkSameExtcodeRandomMainImg.UseVisualStyleBackColor = true;
//
// chkLongTitle
//
this.chkLongTitle.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkLongTitle.AutoSize = true;
this.chkLongTitle.Location = new System.Drawing.Point(98, 0);
this.chkLongTitle.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0);
this.chkLongTitle.Name = "chkLongTitle";
this.chkLongTitle.Size = new System.Drawing.Size(96, 21);
this.chkLongTitle.TabIndex = 660;
this.chkLongTitle.Text = "500字长标题";
this.chkLongTitle.UseVisualStyleBackColor = true;
//
// chkEnglishProdName
//
this.chkEnglishProdName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkEnglishProdName.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkEnglishProdName.AutoSize = true;
this.chkEnglishProdName.Location = new System.Drawing.Point(864, 96);
this.chkEnglishProdName.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkEnglishProdName.Location = new System.Drawing.Point(21, 0);
this.chkEnglishProdName.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0);
this.chkEnglishProdName.Name = "chkEnglishProdName";
this.chkEnglishProdName.Size = new System.Drawing.Size(75, 21);
this.chkEnglishProdName.TabIndex = 679;
@@ -1433,6 +1465,18 @@
this.chkEnglishProdName.UseVisualStyleBackColor = true;
this.chkEnglishProdName.CheckedChanged += new System.EventHandler(this.chkEnglishProdName_CheckedChanged);
//
// chkUseGlobalProductWords
//
this.chkUseGlobalProductWords.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkUseGlobalProductWords.AutoSize = true;
this.chkUseGlobalProductWords.Location = new System.Drawing.Point(1163, 60);
this.chkUseGlobalProductWords.Margin = new System.Windows.Forms.Padding(0);
this.chkUseGlobalProductWords.Name = "chkUseGlobalProductWords";
this.chkUseGlobalProductWords.Size = new System.Drawing.Size(75, 38);
this.chkUseGlobalProductWords.TabIndex = 773;
this.chkUseGlobalProductWords.Text = "使用全局\r\n重组标题";
this.chkUseGlobalProductWords.UseVisualStyleBackColor = true;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1787,7 +1831,7 @@
this.colSupplierId.HeaderText = "店铺Id";
this.colSupplierId.Name = "colSupplierId";
this.colSupplierId.ReadOnly = true;
this.colSupplierId.Width = 110;
this.colSupplierId.Width = 115;
//
// colSupplierName
//
@@ -1834,7 +1878,7 @@
this.colProdGetType.HeaderText = "商品来源";
this.colProdGetType.Name = "colProdGetType";
this.colProdGetType.ReadOnly = true;
this.colProdGetType.Width = 65;
this.colProdGetType.Width = 62;
//
// colSpuId
//
@@ -1918,7 +1962,7 @@
this.colAddTime.HeaderText = "认领时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
this.colAddTime.Width = 63;
this.colAddTime.Width = 62;
//
// colMdyTime
//
@@ -1927,7 +1971,7 @@
this.colMdyTime.HeaderText = "上传时间";
this.colMdyTime.Name = "colMdyTime";
this.colMdyTime.ReadOnly = true;
this.colMdyTime.Width = 63;
this.colMdyTime.Width = 62;
//
// colSubSa
//
@@ -1967,7 +2011,7 @@
this.colEditNotes.ReadOnly = true;
this.colEditNotes.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colEditNotes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colEditNotes.Width = 62;
this.colEditNotes.Width = 38;
//
// colDelete
//
@@ -2027,6 +2071,7 @@
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.numMaxWaitSecond)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbFissionSetting)).EndInit();
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numSkuRandomPrice)).EndInit();
@@ -2044,6 +2089,8 @@
((System.ComponentModel.ISupportInitialize)(this.numAddPriceTimes)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.flowLayoutPanel2.ResumeLayout(false);
this.flowLayoutPanel2.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel1.PerformLayout();
this.splitContainer2.Panel2.ResumeLayout(false);
@@ -2149,6 +2196,21 @@
private DevComponents.DotNetBar.PanelEx pnlError;
private UserComponent.UcCheckBox chkNotChangeMainImg;
private System.Windows.Forms.TextBox txtNotChangeMainImg;
private DevComponents.DotNetBar.PanelEx btnForceEnable;
private System.Windows.Forms.NumericUpDown numMaxWaitSecond;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.PanelEx panelEx1;
private UserComponent.DataGridViewEx dgvMapDraftIds;
private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapId;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapShopId;
private System.Windows.Forms.DataGridViewLinkColumn colMapDraftId;
private System.Windows.Forms.DataGridViewLinkColumn colToPorductPage;
private System.Windows.Forms.DataGridViewLinkColumn colToDraftPage;
private UserComponent.UcCheckBox chkUseGlobalProductWords;
private System.Windows.Forms.PictureBox pbFissionSetting;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
@@ -2176,17 +2238,5 @@
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private DevComponents.DotNetBar.PanelEx btnForceEnable;
private System.Windows.Forms.NumericUpDown numMaxWaitSecond;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.PanelEx panelEx1;
private UserComponent.DataGridViewEx dgvMapDraftIds;
private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapId;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapShopId;
private System.Windows.Forms.DataGridViewLinkColumn colMapDraftId;
private System.Windows.Forms.DataGridViewLinkColumn colToPorductPage;
private System.Windows.Forms.DataGridViewLinkColumn colToDraftPage;
}
}
@@ -134,6 +134,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var chkSel = this.dgvSelectProduct.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false, null, true);
chkSel.CheckedChanged += ChkSel_CheckedChanged;
this.dgvSelectProduct.AddImgColumn("colProductSkcPic", "colImgUrl");
this.dgvSelectProduct.AddMergeColumnHeader(new List<string> { "colNotes", "colEditNotes" }, "备注");
this.dgvSelectProduct.AddMergeColumn(new List<string> { "colNotes", "colEditNotes" });
dgvSelectProduct.Columns["colSubSaNick"].Visible = false;
dgvSelectProduct.Columns["colDelete"].Visible = false;
@@ -200,6 +202,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
colOpResult.Width += dgvSelectProduct.Width - colsWidth - dgvSelectProduct.RowHeadersWidth;
}
if(ClientMode == EnumClientMode.Client)
{
chkAiSkuAndMainImg.Visible = false;
}
}
this.lblSkuRandomLetterNotes.Text = "备注:SKU随机字符包括 " + string.Join(" ", skuRandomLetterArr) + " ";
@@ -498,6 +504,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
// 查看map映射列表
var url = BaseClass.BuildObjString("product/get_select_prod_db_id_map_draft_id_list");
var data = UserLogin.GetSignaturex() + "&select_db_id=" + dbId;
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
if (ClientMode == EnumClientMode.ClientJit)
data += "&is_client_jit=true";
@@ -688,6 +695,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var url = BaseClass.BuildObjString("product/del_select_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbId;
var dbSelectProduct = lstAdminTemuDBProductSelect.FirstOrDefault(p => p.id.ParseToString() == dbId);
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
if (ClientMode == EnumClientMode.ClientJit)
data += "&is_client_jit=true";
var html = GetHtml.PostUtf8(url, data);
@@ -881,6 +890,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var empty_url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
"&status=已清除";
if (ClientMode == EnumClientMode.ClientJit)
empty_data += "&is_client_jit=true";
@@ -940,6 +950,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
"&draft_id=" + productDraftId + // draft_id即商品spuid
"&up_spu_id=" + prod.spu_id +
"&shop_id=" + prod.shop_id +
@@ -1345,6 +1356,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
prodParam.productName = selectProd.fission_product_name;
string headWords = "";
string centerName = "";
string endWords = "";
if (this.chkFission.Checked)
{
@@ -1362,32 +1374,26 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
//int[] heads = dbProd.head_words.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries)
// .Select(s => s.ParseToInt()).ToArray();
string headTemp = dbProd.head_words.Trim();
string headTemp = dbProd.head_words.ParseToString().Trim();
if (chkUseGlobalProductWords.Checked) // 使用全局头词
headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
int[] heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
if (heads.Length < 2)
{
if (GlobalConfig.ProductWords.HeadWords == null)
GlobalConfig.ProductWords.HeadWords = "";
//heads = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries)
// .Select(s => s.ParseToInt()).ToArray();
headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
}
if (heads.Length > 1 && heads[1] > heads[0])
if (heads.Length ==2 && heads[1] > heads[0])
headWords = Randomx.GetId(heads[0], heads[1]) + headTemp.Replace(heads[0] + "-" + heads[1], "");
else
headWords = headTemp;
}
// 尾词
if (this.chkEndWords.Checked)
{
endWords = string.IsNullOrEmpty(dbProd.end_words) ? "" : dbProd.end_words;
endWords = dbProd.end_words.ParseToString().Trim();
if (string.IsNullOrWhiteSpace(endWords))
endWords = string.IsNullOrEmpty(GlobalConfig.ProductWords.EndWords) ? "" : GlobalConfig.ProductWords.EndWords;
if (chkUseGlobalProductWords.Checked) // 使用全局尾词
endWords = GlobalConfig.ProductWords.EndWords.ParseToString().Trim();
}
// 标题部分打乱
@@ -1419,7 +1425,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
centerWords += fissionTxt + joinText;
}
string centerName = originProductName + centerWords.ParseToString();
centerName = originProductName + centerWords.ParseToString();
// 标题完全打乱
if (chkReFissionAllProdName.Checked)
@@ -1905,15 +1911,30 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
if (chkChangeSizeAndNumber.Checked)
{
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
if (numberOfPieces > 1)
{
skuClassification = 2,
numberOfPieces = numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
individuallyPacked = 1,
};
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
{
skuClassification = 2,
numberOfPieces = numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
individuallyPacked = 1,
};
}
else
{
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq()
{
// 件数为1必须设置单品
skuClassification = 1,
numberOfPieces = 1,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
};
}
}
skuItem.productSkuNonAuditExtAttrReq = JsonHelper.DeserializeJsonToObject<ProductSkuNonAuditExtAttrReq>(
JsonHelper.SerializeObject(skuInfo.productSkuNonAuditExtAttr));
@@ -2484,16 +2505,17 @@ namespace TemuKJD.KJDForms.ProductSelectForms
productI18nParam productI18nEn = new productI18nParam
{
language = "en",
productName = prodParam.productName,
//productName = prodParam.productName,
productName = centerName.Trim(',', ' ') + '.',
};
if (CountChineseCharacters(productI18nEn.productName) > 0 && !string.IsNullOrEmpty(headWords))
{
productI18nEn.productName = productI18nEn.productName.Replace(headWords, "");
}
if (CountChineseCharacters(productI18nEn.productName) > 0 && !string.IsNullOrEmpty(endWords))
{
productI18nEn.productName = productI18nEn.productName.Replace(endWords, "");
}
//if (CountChineseCharacters(productI18nEn.productName) > 0 && !string.IsNullOrEmpty(headWords))
//{
// productI18nEn.productName = productI18nEn.productName.Replace(headWords, "");
//}
//if (CountChineseCharacters(productI18nEn.productName) > 0 && !string.IsNullOrEmpty(endWords))
//{
// productI18nEn.productName = productI18nEn.productName.Replace(endWords, "");
//}
if (CountChineseCharacters(productI18nEn.productName) > 0)
{
Invoke(new Action(() =>
@@ -3252,10 +3274,7 @@ Content-Disposition: form-data; name=""sign""
return;
}
DbProductSelectSetSubSaForm subSaForm = new DbProductSelectSetSubSaForm(
prodList.Select(p => p.id.ToString()).ToList(),
prodList.Select(p => p.shop_id).ToList()
);
DbProductSelectSetSubSaForm subSaForm = new DbProductSelectSetSubSaForm(prodList.ToList());
subSaForm.SaveCompleteWithDescribe += SubSaForm_SaveComplete;
subSaForm.ShowDialog();
}
@@ -3389,6 +3408,7 @@ Content-Disposition: form-data; name=""sign""
var empty_url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
"&status=已清除";
if (ClientMode == EnumClientMode.ClientJit)
empty_data += "&is_client_jit=true";
@@ -3404,13 +3424,22 @@ Content-Disposition: form-data; name=""sign""
continue;
}
var fissionProductName = DbProductListForm.GetFissionProductName(temuDBProd);
var fissionProductName = "";
if (chkUseGlobalProductWords.Checked)
{
fissionProductName = GetFissionGlobalProductName(temuDBProd);
}
else
{
fissionProductName = DbProductListForm.GetFissionProductName(temuDBProd);
}
prod.fission_product_name = fissionProductName;
var url = "";
url = BaseClass.BuildObjString("product/mdy_product_select_notes");
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id;
var data = UserLogin.GetSignaturex();
data += "&db_id=" + prod.id;
data += "&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss");
data += "&fission_product_name=" + GetHtml.UrlEncodeUtf8(fissionProductName.Trim());
if (ClientMode == EnumClientMode.ClientJit)
data += "&is_client_jit=true";
@@ -3450,6 +3479,26 @@ Content-Disposition: form-data; name=""sign""
}));
}
public string GetFissionGlobalProductName(KJDDBProduct prod)
{
string headWords = "";
if (!string.IsNullOrWhiteSpace(GlobalConfig.ProductWords.HeadWords))
{
string headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
int[] heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
if (heads.Length == 2 && heads[1] > heads[0])
headWords = Randomx.GetId(heads[0], heads[1]) + headTemp.Replace(heads[0] + "-" + heads[1], "");
else
headWords = headTemp;
}
string endWords = string.IsNullOrWhiteSpace(GlobalConfig.ProductWords.EndWords) ? "" : GlobalConfig.ProductWords.EndWords;
string centerWords = ",";
return (headWords + prod.product_name + centerWords + endWords).Trim(',');
}
private void chkSkuRandomPrice_CheckedChanged(object sender, EventArgs e)
{
@@ -3615,7 +3664,8 @@ Content-Disposition: form-data; name=""sign""
public static int CountChineseCharacters(string text)
{
// 使用正则表达式匹配中文字符
string pattern = @"[\u4e00-\u9fff]";
//string pattern = @"[\u4e00-\u9fff]";
string pattern = @"[\u4e00-\u9fff。?!,、;:“”‘’()《》【】~]";
MatchCollection matches = Regex.Matches(text, pattern);
return matches.Count;
}
@@ -3682,5 +3732,11 @@ Content-Disposition: form-data; name=""sign""
break;
}
}
private void pbFissionSetting_Click(object sender, EventArgs e)
{
ProductThirdSelectForms.ProductThirdTitleForm titleForm = new ProductThirdSelectForms.ProductThirdTitleForm();
titleForm.ShowDialog();
}
}
}
@@ -25,17 +25,19 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
List<string> lstProductSelectId = new List<string>();
List<string> lstShopSelectId = new List<string>();
List<TemuDBProductSelect> lstDbProdSelect = new List<TemuDBProductSelect>();
SetSubSaType setSubSaType;
List<ShopSubAccountInfo> lstSubSa = new List<ShopSubAccountInfo>();
public DbProductSelectSetSubSaForm(List<string> ProductSelectIds = null,
List<string> ShopSelectIds = null, SetSubSaType type = SetSubSaType.DbProduct)
public DbProductSelectSetSubSaForm(List<TemuDBProductSelect> dbProdSelectLst, SetSubSaType type = SetSubSaType.DbProduct)
{
InitializeComponent();
if (ProductSelectIds != null)
lstProductSelectId.AddRange(ProductSelectIds);
if (ShopSelectIds != null)
lstShopSelectId.AddRange(ShopSelectIds);
if (dbProdSelectLst != null)
{
lstDbProdSelect = dbProdSelectLst;
lstProductSelectId.AddRange(dbProdSelectLst.Select(p => p.id.ToString()).ToList());
lstShopSelectId.AddRange(dbProdSelectLst.Select(p => p.shop_id).ToList());
}
this.setSubSaType = type;
}
@@ -67,6 +69,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
return "请选择要分配的二级管理员!";
}
if (lstDbProdSelect == null || lstDbProdSelect.Count == 0)
{
return "请选择需要分配二级管理员的商品!";
}
var sub_sa = selectRow.Cells["colSubSaName"].Value.ParseToString();
var sub_sa_nick = selectRow.Cells["colSubSaNick"].Value.ParseToString();
@@ -76,11 +82,27 @@ namespace TemuKJD.KJDForms.ProductSelectForms
if (isShopAllSameSaCheck)
{
data.Append("&shop_id=" + string.Join(",", lstShopSelectId));
data.Append("&select_add_time=" + lstDbProdSelect.Max(p => p.add_time).ToString("yyyy-MM-dd HH:mm:ss"));
data.Append("&status=待上传");
}
else
{
data.Append("&db_id=" + string.Join(",", lstProductSelectId));
var yearLst = lstDbProdSelect.Select(p => p.add_time.Year).Distinct().ToList();
if (yearLst.All(y => y < 2026))
{
data.Append("&db_id=" + string.Join(",", lstProductSelectId));
data.Append("&select_add_time=" + lstDbProdSelect.Max(p => p.add_time).ToString("yyyy-MM-dd HH:mm:ss"));
}
else
{
string dbIdInfo = "[";
foreach (var year in yearLst)
{
dbIdInfo += "{\"year\":" + year + ",\"db_ids\":\"" + string.Join(",", lstDbProdSelect.Where(p => p.add_time.Year == year).Select(p => p.id)) + "\"}";
}
dbIdInfo += "]";
data.Append("&db_id_infos=" + dbIdInfo);
}
}
string url = "";
if (setSubSaType == SetSubSaType.DbProduct)
@@ -63,8 +63,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
url = BaseClass.BuildObjString("product/mdy_product_select_notes");
else
url = BaseClass.BuildObjString("product_third/mdy_product_select_notes");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbProdSelect.id + "&user_notes=" + this.cmbUserNotes.Text.Trim();
var data = UserLogin.GetSignaturex();
data += "&db_id=" + dbProdSelect.id;
data += "&select_add_time=" + dbProdSelect.add_time.ToString("yyyy-MM-dd HH:mm:ss");
data += "&user_notes=" + this.cmbUserNotes.Text.Trim();
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -422,6 +422,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var url = BaseClass.BuildObjString("product/del_select_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbId;
var dbSelectProduct = lstTemuDBProductSelect.FirstOrDefault(p => p.id.ParseToString() == dbId);
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -69,7 +69,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colOriginalPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMarkupTimes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colExtraPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@@ -515,7 +515,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colOriginalPrice,
this.colMarkupTimes,
this.colExtraPrice,
this.conNotes,
this.colNotes,
this.colEdit,
this.colDelete});
this.dgvPrice.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -591,11 +591,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colExtraPrice.Name = "colExtraPrice";
this.colExtraPrice.ReadOnly = true;
//
// conNotes
// colNotes
//
this.conNotes.HeaderText = "备注";
this.conNotes.Name = "conNotes";
this.conNotes.ReadOnly = true;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colEdit
//
@@ -689,7 +689,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewTextBoxColumn colOriginalPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colMarkupTimes;
private System.Windows.Forms.DataGridViewTextBoxColumn colExtraPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
}
@@ -135,7 +135,7 @@
<metadata name="colExtraPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="conNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colEdit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -42,11 +42,14 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductThirdSelectListManageForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.numMaxWaitSecond = new System.Windows.Forms.NumericUpDown();
this.btnForceEnable = new DevComponents.DotNetBar.PanelEx();
this.label22 = new System.Windows.Forms.Label();
this.pbFissionSetting = new System.Windows.Forms.PictureBox();
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
this.label14 = new System.Windows.Forms.Label();
this.btnSetSubSa = new DevComponents.DotNetBar.PanelEx();
this.btnAdd = new DevComponents.DotNetBar.PanelEx();
this.pbFissionSetting = new System.Windows.Forms.PictureBox();
this.btnReFission = new DevComponents.DotNetBar.PanelEx();
this.chkShowDel = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkNoSubSa = new TemuKJD.UserComponent.UcCheckBox(this.components);
@@ -111,6 +114,7 @@
this.label4 = new System.Windows.Forms.Label();
this.txtProdName = new System.Windows.Forms.TextBox();
this.lblUserNotes = new System.Windows.Forms.Label();
this.chkUseGlobalFissionSetting = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.panel2 = new System.Windows.Forms.Panel();
@@ -131,6 +135,7 @@
this.colLogin = new System.Windows.Forms.DataGridViewLinkColumn();
this.colImportCookies = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn();
this.colProdGetType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn();
this.colSkcId = new System.Windows.Forms.DataGridViewLinkColumn();
this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -155,6 +160,7 @@
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numMaxWaitSecond)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbFissionSetting)).BeginInit();
this.flowLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numSkuRandomPrice)).BeginInit();
@@ -192,11 +198,14 @@
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.numMaxWaitSecond);
this.splitContainer1.Panel1.Controls.Add(this.btnForceEnable);
this.splitContainer1.Panel1.Controls.Add(this.label22);
this.splitContainer1.Panel1.Controls.Add(this.pbFissionSetting);
this.splitContainer1.Panel1.Controls.Add(this.btnSearch);
this.splitContainer1.Panel1.Controls.Add(this.label14);
this.splitContainer1.Panel1.Controls.Add(this.btnSetSubSa);
this.splitContainer1.Panel1.Controls.Add(this.btnAdd);
this.splitContainer1.Panel1.Controls.Add(this.pbFissionSetting);
this.splitContainer1.Panel1.Controls.Add(this.btnReFission);
this.splitContainer1.Panel1.Controls.Add(this.chkShowDel);
this.splitContainer1.Panel1.Controls.Add(this.chkNoSubSa);
@@ -228,14 +237,90 @@
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.btnDel);
this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel1);
this.splitContainer1.Panel1.Controls.Add(this.chkUseGlobalFissionSetting);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1518, 638);
this.splitContainer1.SplitterDistance = 96;
this.splitContainer1.SplitterDistance = 120;
this.splitContainer1.TabIndex = 2;
//
// numMaxWaitSecond
//
this.numMaxWaitSecond.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.numMaxWaitSecond.Font = new System.Drawing.Font("微软雅黑", 8F);
this.numMaxWaitSecond.Location = new System.Drawing.Point(1328, 68);
this.numMaxWaitSecond.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numMaxWaitSecond.Maximum = new decimal(new int[] {
500,
0,
0,
0});
this.numMaxWaitSecond.Minimum = new decimal(new int[] {
100,
0,
0,
0});
this.numMaxWaitSecond.Name = "numMaxWaitSecond";
this.numMaxWaitSecond.Size = new System.Drawing.Size(38, 22);
this.numMaxWaitSecond.TabIndex = 780;
this.numMaxWaitSecond.Value = new decimal(new int[] {
120,
0,
0,
0});
this.numMaxWaitSecond.ValueChanged += new System.EventHandler(this.numMaxWaitSecond_ValueChanged);
//
// btnForceEnable
//
this.btnForceEnable.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnForceEnable.CanvasColor = System.Drawing.SystemColors.Control;
this.btnForceEnable.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnForceEnable.DisabledBackColor = System.Drawing.Color.Empty;
this.btnForceEnable.Location = new System.Drawing.Point(1370, 67);
this.btnForceEnable.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnForceEnable.Name = "btnForceEnable";
this.btnForceEnable.Size = new System.Drawing.Size(144, 24);
this.btnForceEnable.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnForceEnable.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnForceEnable.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnForceEnable.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnForceEnable.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnForceEnable.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnForceEnable.Style.GradientAngle = 90;
this.btnForceEnable.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnForceEnable.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnForceEnable.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnForceEnable.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnForceEnable.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnForceEnable.TabIndex = 778;
this.btnForceEnable.Text = "强制解锁(上传卡住时用)";
this.btnForceEnable.Click += new System.EventHandler(this.btnForceEnable_Click);
//
// label22
//
this.label22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(1251, 71);
this.label22.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(88, 17);
this.label22.TabIndex = 779;
this.label22.Text = "超时跳过(秒):";
//
// pbFissionSetting
//
this.pbFissionSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pbFissionSetting.Image = global::TemuKJD.Properties.Resources.齿轮;
this.pbFissionSetting.Location = new System.Drawing.Point(1228, 68);
this.pbFissionSetting.Name = "pbFissionSetting";
this.pbFissionSetting.Size = new System.Drawing.Size(22, 22);
this.pbFissionSetting.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbFissionSetting.TabIndex = 191;
this.pbFissionSetting.TabStop = false;
this.pbFissionSetting.Click += new System.EventHandler(this.pbFissionSetting_Click);
//
// btnSearch
//
this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -265,12 +350,12 @@
//
this.label14.AutoSize = true;
this.label14.ForeColor = System.Drawing.SystemColors.MenuHighlight;
this.label14.Location = new System.Drawing.Point(959, 71);
this.label14.Location = new System.Drawing.Point(3, 98);
this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(307, 17);
this.label14.Size = new System.Drawing.Size(235, 17);
this.label14.TabIndex = 640;
this.label14.Text = "备注:新的商品上传货号为固定前缀 EC + 上家商品SKC";
this.label14.Text = "备注:上传货号为固定前缀 EC + 上家SKC";
//
// btnSetSubSa
//
@@ -322,19 +407,6 @@
this.btnAdd.Text = "一键上传";
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// pbFissionSetting
//
this.pbFissionSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pbFissionSetting.Image = global::TemuKJD.Properties.Resources.齿轮;
this.pbFissionSetting.Location = new System.Drawing.Point(1164, 38);
this.pbFissionSetting.Name = "pbFissionSetting";
this.pbFissionSetting.Size = new System.Drawing.Size(24, 24);
this.pbFissionSetting.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbFissionSetting.TabIndex = 191;
this.pbFissionSetting.TabStop = false;
this.pbFissionSetting.Visible = false;
this.pbFissionSetting.Click += new System.EventHandler(this.pbFissionSetting_Click);
//
// btnReFission
//
this.btnReFission.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -342,9 +414,9 @@
this.btnReFission.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnReFission.DisabledBackColor = System.Drawing.Color.Empty;
this.btnReFission.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReFission.Location = new System.Drawing.Point(1188, 38);
this.btnReFission.Location = new System.Drawing.Point(1164, 38);
this.btnReFission.Name = "btnReFission";
this.btnReFission.Size = new System.Drawing.Size(62, 24);
this.btnReFission.Size = new System.Drawing.Size(86, 24);
this.btnReFission.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnReFission.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnReFission.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -357,7 +429,7 @@
this.btnReFission.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnReFission.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnReFission.TabIndex = 449;
this.btnReFission.Text = "重组标题";
this.btnReFission.Text = "批量重组标题";
this.btnReFission.Click += new System.EventHandler(this.btnReFission_Click);
//
// chkShowDel
@@ -1265,6 +1337,21 @@
this.lblUserNotes.TabIndex = 460;
this.lblUserNotes.Text = "用户备注";
//
// chkUseGlobalFissionSetting
//
this.chkUseGlobalFissionSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkUseGlobalFissionSetting.AutoSize = true;
this.chkUseGlobalFissionSetting.Checked = true;
this.chkUseGlobalFissionSetting.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkUseGlobalFissionSetting.Enabled = false;
this.chkUseGlobalFissionSetting.Location = new System.Drawing.Point(1163, 60);
this.chkUseGlobalFissionSetting.Margin = new System.Windows.Forms.Padding(0);
this.chkUseGlobalFissionSetting.Name = "chkUseGlobalFissionSetting";
this.chkUseGlobalFissionSetting.Size = new System.Drawing.Size(75, 38);
this.chkUseGlobalFissionSetting.TabIndex = 774;
this.chkUseGlobalFissionSetting.Text = "使用全局\r\n重组标题";
this.chkUseGlobalFissionSetting.UseVisualStyleBackColor = true;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1284,15 +1371,15 @@
//
this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1518, 538);
this.splitContainer2.SplitterDistance = 509;
this.splitContainer2.Size = new System.Drawing.Size(1518, 514);
this.splitContainer2.SplitterDistance = 485;
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(734, 227);
this.pbLoading.Location = new System.Drawing.Point(734, 215);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -1450,6 +1537,7 @@
this.colLogin,
this.colImportCookies,
this.colCopyCookies,
this.colProdGetType,
this.colSpuId,
this.colSkcId,
this.colImgUrl,
@@ -1474,7 +1562,7 @@
this.dgvSelectProduct.ReadOnly = true;
this.dgvSelectProduct.RowHeadersWidth = 40;
this.dgvSelectProduct.RowTemplate.Height = 23;
this.dgvSelectProduct.Size = new System.Drawing.Size(1510, 509);
this.dgvSelectProduct.Size = new System.Drawing.Size(1510, 485);
this.dgvSelectProduct.TabIndex = 190;
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll);
@@ -1501,7 +1589,7 @@
this.colSupplierId.HeaderText = "店铺Id";
this.colSupplierId.Name = "colSupplierId";
this.colSupplierId.ReadOnly = true;
this.colSupplierId.Width = 120;
this.colSupplierId.Width = 115;
//
// colSupplierName
//
@@ -1510,7 +1598,6 @@
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
this.colSupplierName.ReadOnly = true;
this.colSupplierName.Width = 110;
//
// colInShop
//
@@ -1528,21 +1615,28 @@
//
// colImportCookies
//
this.colImportCookies.HeaderText = "导入Cookie";
this.colImportCookies.HeaderText = "导入Cook";
this.colImportCookies.Name = "colImportCookies";
this.colImportCookies.ReadOnly = true;
this.colImportCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colImportCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colImportCookies.Width = 80;
this.colImportCookies.Width = 70;
//
// colCopyCookies
//
this.colCopyCookies.HeaderText = "复制Cookie";
this.colCopyCookies.HeaderText = "复制Cook";
this.colCopyCookies.Name = "colCopyCookies";
this.colCopyCookies.ReadOnly = true;
this.colCopyCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCopyCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCopyCookies.Width = 80;
this.colCopyCookies.Width = 70;
//
// colProdGetType
//
this.colProdGetType.HeaderText = "商品来源";
this.colProdGetType.Name = "colProdGetType";
this.colProdGetType.ReadOnly = true;
this.colProdGetType.Width = 62;
//
// colSpuId
//
@@ -1585,7 +1679,7 @@
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Width = 160;
this.colProductName.Width = 150;
//
// colProductCat
//
@@ -1596,14 +1690,14 @@
this.colProductCat.ReadOnly = true;
this.colProductCat.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductCat.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colProductCat.Width = 72;
this.colProductCat.Width = 70;
//
// colExtCode
//
this.colExtCode.HeaderText = "商品货号";
this.colExtCode.Name = "colExtCode";
this.colExtCode.ReadOnly = true;
this.colExtCode.Width = 125;
this.colExtCode.Width = 122;
//
// colStatus
//
@@ -1628,7 +1722,7 @@
this.colAddTime.HeaderText = "添加时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
this.colAddTime.Width = 65;
this.colAddTime.Width = 62;
//
// colMdyTime
//
@@ -1637,7 +1731,7 @@
this.colMdyTime.HeaderText = "上传时间";
this.colMdyTime.Name = "colMdyTime";
this.colMdyTime.ReadOnly = true;
this.colMdyTime.Width = 65;
this.colMdyTime.Width = 62;
//
// colSubSa
//
@@ -1677,7 +1771,7 @@
this.colEditNotes.ReadOnly = true;
this.colEditNotes.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colEditNotes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colEditNotes.Width = 62;
this.colEditNotes.Width = 38;
//
// ColDelete
//
@@ -1737,6 +1831,7 @@
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.numMaxWaitSecond)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbFissionSetting)).EndInit();
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
@@ -1846,6 +1941,17 @@
private System.Windows.Forms.Panel panel2;
private UserComponent.DataGridViewEx dgvMapDraftIds;
private UserComponent.UcCheckBox chkSkuRandomLetter;
private DevComponents.DotNetBar.PanelEx panelEx1;
private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapId;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapShopId;
private System.Windows.Forms.DataGridViewLinkColumn colMapDraftId;
private System.Windows.Forms.DataGridViewLinkColumn colToPorductPage;
private System.Windows.Forms.DataGridViewLinkColumn colToDraftPage;
private UserComponent.UcCheckBox chkUseGlobalFissionSetting;
private System.Windows.Forms.NumericUpDown numMaxWaitSecond;
private DevComponents.DotNetBar.PanelEx btnForceEnable;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
@@ -1854,6 +1960,7 @@
private System.Windows.Forms.DataGridViewLinkColumn colLogin;
private System.Windows.Forms.DataGridViewLinkColumn colImportCookies;
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
private System.Windows.Forms.DataGridViewTextBoxColumn colProdGetType;
private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
private System.Windows.Forms.DataGridViewLinkColumn colSkcId;
private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl;
@@ -1872,12 +1979,5 @@
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private DevComponents.DotNetBar.PanelEx panelEx1;
private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapId;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapShopId;
private System.Windows.Forms.DataGridViewLinkColumn colMapDraftId;
private System.Windows.Forms.DataGridViewLinkColumn colToPorductPage;
private System.Windows.Forms.DataGridViewLinkColumn colToDraftPage;
}
}
@@ -61,13 +61,15 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
{
this.ucSplitPage1.PageChange += UcSplitPage1_PageChange;
this.dgvSelectProduct.AddSelectorColumn("colSelect");
this.dgvSelectProduct.AddMergeColumnHeader(new List<string> { "colNotes", "colEditNotes" }, "备注");
this.dgvSelectProduct.AddMergeColumn(new List<string> { "colNotes", "colEditNotes" });
dgvSelectProduct.Columns["colSubSaNick"].Visible = false;
dgvSelectProduct.Columns["colDelete"].Visible = false;
chkShowDel.Visible = false;
btnSetSubSa.Visible = false;
chkNoSubSa.Visible = false;
pbFissionSetting.Visible = false;
pbFissionSetting.Visible = true;
btnReFission.Visible = false;
chkUploadProd.Visible = false; // 直接上传
@@ -78,7 +80,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
ucSplitPage1.IsShowPageSize = false; // 可调整分页
if (BaseClass.SaLevel == 1)
if (BaseClass.SaLevel == 1 && ClientMode == EnumClientMode.Admin)
{
dgvSelectProduct.Columns["colSubSaNick"].Visible = true;
chkShowDel.Visible = true;
@@ -194,6 +196,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
shopLst.FirstOrDefault(s => s.ShopId == prodSelect.shop_id)?.LoginStatus2 == "国际版在线" ? "在线" : "登录",
"导入Cookie",
"复制Cookie",
"库存采集",
prodSelect.spu_id,
prodSelect.skc_id,
prodSelect.main_img.Replace("https:", "http:") + "?imageMogr2/thumbnail/54x54&quot;",
@@ -412,6 +415,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
bool flag = true;
var url = BaseClass.BuildObjString("product_third/get_select_prod_db_id_map_draft_id_list");
var data = UserLogin.GetSignaturex() + "&select_db_id=" + dbId;
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -525,6 +529,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
}
break;
case "导入Cook":
case "导入Cookie":
{
var shop = GetShop(shopId);
@@ -533,6 +538,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
updateCookieForm.ShowDialog();
}
break;
case "复制Cook":
case "复制Cookie":
{
var shop = GetShop(shopId);
@@ -612,6 +618,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var url = BaseClass.BuildObjString("product_third/del_select_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbId;
var dbSelectProduct = lstAdminTemuDBProductSelect.FirstOrDefault(p => p.id.ParseToString() == dbId);
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -684,6 +692,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
}
}
int timeOutSeconds = 120;
void AddProductDraft(TemuDBProductSelect[] prodSelect)
{
if (prodSelect == null || prodSelect.Count() == 0)
@@ -773,6 +782,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var empty_url = BaseClass.BuildObjString("product_third/mdy_user_select_product_status");
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
"&status=已清除";
GetHtml.PostUtf8(empty_url, empty_data);
}
@@ -816,19 +826,34 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
}
temuDBProd.product_json = prodDetailJsonReplace2;
result = UploadProduct(shop, temuDBProd, prod, row.Cells["colOpResult"]); //将商品上传至草稿箱或直接上传到未发布
if (result.Contains("登录过期") || result.Contains("Invalid Login State"))
var t = Task.Run(() =>
{
if (ClientMode == EnumClientMode.Admin)
AdminShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
else
ShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
try
{
result = UploadProduct(shop, temuDBProd, prod, row.Cells["colOpResult"]); //将商品上传至草稿箱或直接上传到未发布
if (result.Contains("登录过期") || result.Contains("Invalid Login State"))
{
if (ClientMode == EnumClientMode.Admin)
AdminShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
else
ShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
}
}
catch(Exception ex)
{
result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"上传失败:" + ex.Message + "\"}";
}
});
t.Wait(timeOutSeconds * 1000);
if (!t.IsCompleted)
{
result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"上传超时\"}";
}
}
catch (Exception ex)
{
result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"" + ex.Message + "\"}";
result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"解析失败:" + ex.Message + "\"}";
}
Thread.Sleep(200);
@@ -849,6 +874,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var url = BaseClass.BuildObjString("product_third/mdy_user_select_product_status");
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
"&draft_id=" + productDraftId + // draft_id即商品spuid
"&up_spu_id=" + prod.spu_id +
"&shop_id=" + prod.shop_id +
@@ -1157,12 +1183,15 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
GlobalConfig.ProductWords.HeadWords = "";
//int[] heads = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries)
// .Select(s => s.ParseToInt()).ToArray();
string headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
int[] heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
if (heads.Length > 1 && heads[1] > heads[0])
if (heads.Length == 2 && heads[1] > heads[0])
headWords = Randomx.GetId(heads[0], heads[1]) + headTemp.Replace(heads[0] + "-" + heads[1], "");
else
headWords = headTemp;
}
// 尾词
@@ -1479,15 +1508,30 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
}
if (chkChangeSizeAndNumber.Checked)
{
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
if (numberOfPieces > 1)
{
skuClassification = 2,
numberOfPieces = numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
individuallyPacked = 1,
};
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
{
skuClassification = 2,
numberOfPieces = numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
individuallyPacked = 1,
};
}
else
{
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq()
{
// 件数为1必须设置单品
skuClassification = 1,
numberOfPieces = 1,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
};
}
}
skuItem.productSkuNonAuditExtAttrReq = JsonHelper.DeserializeJsonToObject<ProductSkuNonAuditExtAttrReq>(
JsonHelper.SerializeObject(skuInfo.productSkuNonAuditExtAttr));
@@ -1824,11 +1868,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
return;
}
DbProductSelectSetSubSaForm subSaForm = new DbProductSelectSetSubSaForm(
prodList.Select(p => p.id.ToString()).ToList(),
prodList.Select(p => p.shop_id).ToList(),
SetSubSaType.ThirdProduct
);
DbProductSelectSetSubSaForm subSaForm = new DbProductSelectSetSubSaForm(prodList.ToList(), SetSubSaType.ThirdProduct);
subSaForm.SaveCompleteWithDescribe += SubSaForm_SaveComplete;
subSaForm.ShowDialog();
}
@@ -1966,6 +2006,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var empty_url = BaseClass.BuildObjString("product_third/mdy_user_select_product_status");
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
"&status=已清除";
GetHtml.PostUtf8(empty_url, empty_data);
}
@@ -1984,8 +2025,9 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var url = "";
url = BaseClass.BuildObjString("product_third/mdy_product_select_notes");
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id;
var data = UserLogin.GetSignaturex();
data += "&db_id=" + prod.id;
data += "&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss");
data += "&fission_product_name=" + GetHtml.UrlEncodeUtf8(fissionProductName.Trim());
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -2028,26 +2070,35 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
string headWords = "";
if (!string.IsNullOrWhiteSpace(GlobalConfig.ProductWords.HeadWords))
{
//var numbers = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries).Select(w => w.ParseToInt()).ToList();
////var numbers = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries).Select(w => w.ParseToInt()).ToList();
//string headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
//var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
//var numbers = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToList();
//int minNum = 5;
//int maxNum = 99;
//if (numbers.Count > 0 && numbers[0] > 0)
//{
// minNum = numbers[0];
// if (numbers.Count > 1 && numbers[1] > 0)
// {
// maxNum = numbers[1];
// }
// if (maxNum < minNum)
// {
// maxNum = minNum;
// }
// headWords += Randomx.GetId(minNum, maxNum + 1) + headTemp.Replace(minNum + "-" + maxNum, "");
//}
string headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
var numbers = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToList();
int[] heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
int minNum = 5;
int maxNum = 19;
if (numbers.Count > 0 && numbers[0] > 0)
{
minNum = numbers[0];
if (numbers.Count > 1 && numbers[1] > 0)
{
maxNum = numbers[1];
}
if (maxNum < minNum)
{
maxNum = minNum;
}
headWords += Randomx.GetId(minNum, maxNum + 1) + headTemp.Replace(minNum + "-" + maxNum, "");
}
if (heads.Length == 2 && heads[1] > heads[0])
headWords = Randomx.GetId(heads[0], heads[1]) + headTemp.Replace(heads[0] + "-" + heads[1], "");
else
headWords = headTemp;
}
string endWords = string.IsNullOrWhiteSpace(GlobalConfig.ProductWords.EndWords) ? "" : GlobalConfig.ProductWords.EndWords;
@@ -2158,5 +2209,18 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
break;
}
}
private void btnForceEnable_Click(object sender, EventArgs e)
{
if (BaseMsgForm.ShowConfirm("确定解锁吗?可能造成性能损耗或重复上传。").DialogResult == DialogResult.OK)
{
this.btnAdd.Enabled = true;
}
}
private void numMaxWaitSecond_ValueChanged(object sender, EventArgs e)
{
this.timeOutSeconds = numMaxWaitSecond.Value.ParseToInt();
}
}
}
@@ -159,6 +159,9 @@
<metadata name="colCopyCookies.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProdGetType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSpuId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -428,6 +428,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var url = BaseClass.BuildObjString("product_third/del_select_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbId;
var dbSelectProduct = lstTemuDBProductSelect.FirstOrDefault(p => p.id.ParseToString() == dbId);
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
+34 -34
View File
@@ -30,6 +30,8 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShopAddEditForm));
this.panel2 = new System.Windows.Forms.Panel();
this.label8 = new System.Windows.Forms.Label();
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label7 = new System.Windows.Forms.Label();
this.cmbGroup = new System.Windows.Forms.ComboBox();
this.txtBuyAccount = new DevComponents.DotNetBar.Controls.TextBoxX();
@@ -44,8 +46,6 @@
this.label1 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.btnOk = new TemuKJD.UserControls.ButtonEx();
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label8 = new System.Windows.Forms.Label();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
@@ -75,6 +75,35 @@
this.panel2.TabIndex = 1;
this.panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.panel2_Paint);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(29, 135);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(56, 17);
this.label8.TabIndex = 386;
this.label8.Text = " 备注";
//
// txtNotes
//
//
//
//
this.txtNotes.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.Class = "CrumbBarBackgroundKey";
this.txtNotes.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtNotes.Border.PaddingBottom = 2;
this.txtNotes.Border.PaddingLeft = 2;
this.txtNotes.Border.PaddingRight = 2;
this.txtNotes.Border.PaddingTop = 2;
this.txtNotes.Location = new System.Drawing.Point(91, 133);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(172, 23);
this.txtNotes.TabIndex = 385;
//
// label7
//
this.label7.AutoSize = true;
@@ -251,35 +280,6 @@
this.btnOk.UseVisualStyleBackColor = false;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// txtNotes
//
//
//
//
this.txtNotes.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.Class = "CrumbBarBackgroundKey";
this.txtNotes.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtNotes.Border.PaddingBottom = 2;
this.txtNotes.Border.PaddingLeft = 2;
this.txtNotes.Border.PaddingRight = 2;
this.txtNotes.Border.PaddingTop = 2;
this.txtNotes.Location = new System.Drawing.Point(91, 133);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(172, 23);
this.txtNotes.TabIndex = 385;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(29, 135);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(56, 17);
this.label8.TabIndex = 386;
this.label8.Text = " 备注";
//
// ShopAddEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -302,7 +302,6 @@
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtShopPassword;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtLoginName;
private UserControls.ButtonEx btnOk;
@@ -311,11 +310,12 @@
private System.Windows.Forms.Label label3;
private DevComponents.DotNetBar.Controls.TextBoxX txtBuyAccount;
private System.Windows.Forms.Label label6;
private DevComponents.DotNetBar.Controls.TextBoxX txtChatAccount;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox cmbGroup;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private DevComponents.DotNetBar.Controls.TextBoxX txtNotes;
public System.Windows.Forms.TextBox txtShopPassword;
public DevComponents.DotNetBar.Controls.TextBoxX txtChatAccount;
public DevComponents.DotNetBar.Controls.TextBoxX txtNotes;
}
}
@@ -15,6 +15,7 @@ namespace TemuKJD.KJDForms.ShopForms
{
public partial class ShopAddEditForm : LRBaseForm
{
public bool HasChange = false;
ShopLoginInfo shopLoginInfo = null;
bool isAdd = true;
@@ -56,7 +57,8 @@ namespace TemuKJD.KJDForms.ShopForms
shop.GroupName = shopLoginInfo.GroupName;
shop.Notes = shopLoginInfo.Notes;
}
HasChange = true;
this.OnSaveComplete(shopLoginInfo, isAdd);
this.Close();
}
+59 -48
View File
@@ -29,8 +29,8 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.label1 = new System.Windows.Forms.Label();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
@@ -54,11 +54,14 @@
this.btnRefreshAuth = new TemuKJD.UserControls.ButtonEx();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEditNotes = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCookie = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSubUser = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colGroupName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -77,8 +80,6 @@
this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -404,26 +405,28 @@
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
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)))));
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
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;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colLoginName,
this.colShopId,
this.colShopAccount,
this.conNotes,
this.colNotes,
this.colEditNotes,
this.colCookie,
this.colSubUser,
this.colGroupName,
@@ -451,6 +454,31 @@
this.dgvShop.TabIndex = 5;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
// 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(1108, 2);
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;
this.chkAutoDrag.Click += new System.EventHandler(this.chkAutoDrag_Click);
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom;
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(1264, 29);
this.statusBar.TabIndex = 1;
//
// colSelect
//
this.colSelect.FillWeight = 26F;
@@ -480,11 +508,18 @@
this.colShopAccount.Name = "colShopAccount";
this.colShopAccount.ReadOnly = true;
//
// conNotes
// colNotes
//
this.conNotes.HeaderText = "备注";
this.conNotes.Name = "conNotes";
this.conNotes.ReadOnly = true;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colEditNotes
//
this.colEditNotes.FillWeight = 25F;
this.colEditNotes.HeaderText = "编辑备注";
this.colEditNotes.Name = "colEditNotes";
this.colEditNotes.ReadOnly = true;
//
// colCookie
//
@@ -638,31 +673,6 @@
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
//
// 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(1108, 2);
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;
this.chkAutoDrag.Click += new System.EventHandler(this.chkAutoDrag_Click);
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom;
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(1264, 29);
this.statusBar.TabIndex = 1;
//
// ShopListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -722,11 +732,14 @@
private System.Windows.Forms.Label label4;
private DevComponents.DotNetBar.PanelEx pnlEmpty;
private UserControls.ButtonEx btnRefreshShop;
private System.Windows.Forms.ComboBox cmbNotes;
private UserComponent.UcCheckBox chkLoginAds;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colCookie;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubUser;
private System.Windows.Forms.DataGridViewTextBoxColumn colGroupName;
@@ -745,7 +758,5 @@
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.ComboBox cmbNotes;
private UserComponent.UcCheckBox chkLoginAds;
}
}
+27 -3
View File
@@ -521,6 +521,7 @@ namespace TemuKJD.KJDForms.ShopForms
param.ShopId,
param.ShopAccount,
param.Notes,
"编辑",
param.Cookies,
param.SubUserName,
param.GroupName,
@@ -845,6 +846,10 @@ namespace TemuKJD.KJDForms.ShopForms
this.chkAutoDrag.Checked = GlobalConfig.TemuShopSettingParam.IsAutoDragLogin;
this.splitContainer2.FixedPanel = FixedPanel.Panel2;
this.dgvShop.AddMergeColumnHeader(new List<string>() { "colNotes", "colEditNotes" }, "备注");
this.dgvShop.AddMergeColumn(new List<string>() { "colNotes", "colEditNotes" });
this.dgvShop.Columns["colEditNotes"].Width = 30;
//子账号
//var url = BaseClass.BuildObjString("shop&act=get_shop_user_sub_group");
//var data = UserLogin.GetSignaturex();
@@ -974,9 +979,28 @@ namespace TemuKJD.KJDForms.ShopForms
StartUp.SaveLocalShopLoginInfo();
break;
case "编辑":
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.SaveCompleteWithDescribe += Sae_SaveComplete;
editForm.ShowDialog();
{
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.txtNotes.ReadOnly = true;
editForm.txtNotes.Enabled = false;
editForm.SaveCompleteWithDescribe += Sae_SaveComplete;
editForm.ShowDialog();
}
break;
case "编辑备注":
{
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.txtChatAccount.ReadOnly = true;
editForm.txtChatAccount.Enabled = false;
editForm.txtShopPassword.ReadOnly = true;
editForm.txtShopPassword.Enabled = false;
editForm.ShowDialog();
if (editForm.HasChange)
{
ShopBLL.MdyServerShopSubInfo(shop, true);
btnSearch_Click(null, null);
}
}
break;
case "登录":
IsOperate = true;
+4 -1
View File
@@ -129,7 +129,10 @@
<metadata name="colShopAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="conNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colEditNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCookie.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">