1循环加入发货台功能 2修复部分bug

This commit is contained in:
wule committed 2025-11-11 11:06:40 +08:00
1 parent e2b37df00b
commit 41a3cb3e34
16 files changed
+870 -422

No files matched your search

@@ -150,6 +150,8 @@
this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.chkNotChangeMainImg = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.txtNotChangeMainImg = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -190,6 +192,8 @@
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.txtNotChangeMainImg);
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);
@@ -235,7 +239,7 @@
//
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(1410, 98);
this.chkAiSkuAndMainImg.Location = new System.Drawing.Point(1261, 98);
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);
@@ -247,7 +251,7 @@
//
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(1126, 98);
this.chkLongTitle.Location = new System.Drawing.Point(977, 98);
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);
@@ -259,7 +263,7 @@
//
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(1222, 98);
this.chkSameExtcodeRandomMainImg.Location = new System.Drawing.Point(1073, 98);
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);
@@ -852,7 +856,7 @@
"核价成功",
"核价成功(重复)",
"重复"});
this.cmbNotes.Location = new System.Drawing.Point(917, 8);
this.cmbNotes.Location = new System.Drawing.Point(917, 5);
this.cmbNotes.Margin = new System.Windows.Forms.Padding(0);
this.cmbNotes.Name = "cmbNotes";
this.cmbNotes.Size = new System.Drawing.Size(65, 25);
@@ -877,7 +881,7 @@
"已上传",
"草稿箱",
"全部"});
this.cmbStatus.Location = new System.Drawing.Point(814, 8);
this.cmbStatus.Location = new System.Drawing.Point(814, 5);
this.cmbStatus.Margin = new System.Windows.Forms.Padding(0);
this.cmbStatus.Name = "cmbStatus";
this.cmbStatus.Size = new System.Drawing.Size(65, 25);
@@ -1244,7 +1248,7 @@
"全部",
"重上",
"已买"});
this.cmbUserNotes.Location = new System.Drawing.Point(1044, 8);
this.cmbUserNotes.Location = new System.Drawing.Point(1044, 5);
this.cmbUserNotes.Margin = new System.Windows.Forms.Padding(0);
this.cmbUserNotes.Name = "cmbUserNotes";
this.cmbUserNotes.Size = new System.Drawing.Size(65, 25);
@@ -1316,7 +1320,7 @@
//
this.chkEnglishProdName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkEnglishProdName.AutoSize = true;
this.chkEnglishProdName.Location = new System.Drawing.Point(1053, 98);
this.chkEnglishProdName.Location = new System.Drawing.Point(904, 98);
this.chkEnglishProdName.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkEnglishProdName.Name = "chkEnglishProdName";
this.chkEnglishProdName.Size = new System.Drawing.Size(75, 21);
@@ -1760,6 +1764,31 @@
this.statusBar.Size = new System.Drawing.Size(1558, 25);
this.statusBar.TabIndex = 5;
//
// chkNotChangeMainImg
//
this.chkNotChangeMainImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkNotChangeMainImg.AutoSize = true;
this.chkNotChangeMainImg.Checked = true;
this.chkNotChangeMainImg.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkNotChangeMainImg.Location = new System.Drawing.Point(1410, 98);
this.chkNotChangeMainImg.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkNotChangeMainImg.Name = "chkNotChangeMainImg";
this.chkNotChangeMainImg.Size = new System.Drawing.Size(151, 21);
this.chkNotChangeMainImg.TabIndex = 699;
this.chkNotChangeMainImg.Text = "第 张主图不替换";
this.chkNotChangeMainImg.UseVisualStyleBackColor = true;
//
// txtNotChangeMainImg
//
this.txtNotChangeMainImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtNotChangeMainImg.Location = new System.Drawing.Point(1440, 97);
this.txtNotChangeMainImg.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtNotChangeMainImg.Name = "txtNotChangeMainImg";
this.txtNotChangeMainImg.ReadOnly = true;
this.txtNotChangeMainImg.Size = new System.Drawing.Size(36, 23);
this.txtNotChangeMainImg.TabIndex = 700;
this.txtNotChangeMainImg.Text = "5";
//
// DbProductSelectListManageForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1922,5 +1951,7 @@
private System.Windows.Forms.Label lblError;
private UserComponent.UcCheckBox chkAiSkuAndMainImg;
private DevComponents.DotNetBar.PanelEx pnlError;
private UserComponent.UcCheckBox chkNotChangeMainImg;
private System.Windows.Forms.TextBox txtNotChangeMainImg;
}
}
@@ -1817,6 +1817,29 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
}
// 指定一张主图不替换(如:作为尺寸图)
var idNotChange = txtNotChangeMainImg.Text.ParseToInt() - 1;
if (idNotChange < 0)
idNotChange = 0;
if (idNotChange > 9)
idNotChange = 9;
if (chkNotChangeMainImg.Checked && prodParam.carouselImageUrls.Count > idNotChange && prodInfo.carouselImageUrls.Count > idNotChange)
{
// 查找指定第几张图有没有出现在别的地方,如果出现了交换一下掉防止重复
for (int i = 0; i < prodParam.carouselImageUrls.Count; i++)
{
if (i == idNotChange)
continue;
if (prodParam.carouselImageUrls[i] == prodInfo.carouselImageUrls[idNotChange])
{
string urlTmp = prodParam.carouselImageUrls[i];
prodParam.carouselImageUrls[i] = prodParam.carouselImageUrls[idNotChange];
prodParam.carouselImageUrls[idNotChange] = urlTmp;
}
}
prodParam.carouselImageUrls[idNotChange] = prodInfo.carouselImageUrls[idNotChange];
}
#region 尺码表
string sizeError = "";
//上传尺码表(如果有)