1上货逻辑改造修改sku件数和包装尺寸重量 2统计计算利润和填写商品进货价相关功能

This commit is contained in:
wule committed 2025-09-04 20:05:02 +08:00
1 parent cc539ce604
commit 511affaeb5
28 files changed
+3283 -482

No files matched your search

@@ -39,6 +39,26 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectListManageForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.label21 = new System.Windows.Forms.Label();
this.numUnitNum2 = new System.Windows.Forms.NumericUpDown();
this.numUnitNum1 = new System.Windows.Forms.NumericUpDown();
this.label20 = new System.Windows.Forms.Label();
this.numWeight2 = new System.Windows.Forms.NumericUpDown();
this.numWeight1 = new System.Windows.Forms.NumericUpDown();
this.label19 = new System.Windows.Forms.Label();
this.numHeight2 = new System.Windows.Forms.NumericUpDown();
this.numHeight1 = new System.Windows.Forms.NumericUpDown();
this.label18 = new System.Windows.Forms.Label();
this.numWidth2 = new System.Windows.Forms.NumericUpDown();
this.numWidth1 = new System.Windows.Forms.NumericUpDown();
this.numLen2 = new System.Windows.Forms.NumericUpDown();
this.numLen1 = new System.Windows.Forms.NumericUpDown();
this.label15 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.numAddPrice = new System.Windows.Forms.NumericUpDown();
this.label16 = new System.Windows.Forms.Label();
this.numAddPriceTimes = new System.Windows.Forms.NumericUpDown();
this.chkChangeSizeAndNumber = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.btnStop = new DevComponents.DotNetBar.PanelEx();
this.btnExport = new DevComponents.DotNetBar.PanelEx();
this.lblCustomImgNum = new System.Windows.Forms.Label();
@@ -90,6 +110,7 @@
this.chkUploadProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.btnSetSubSa = new TemuKJD.UserControls.ButtonEx();
this.btnAdd = new TemuKJD.UserControls.ButtonEx();
this.chkAddPrice = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
@@ -125,6 +146,18 @@
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numUnitNum2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numUnitNum1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numWeight2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numWeight1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numHeight2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numHeight1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numWidth2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numWidth1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numLen2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numLen1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numAddPrice)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numAddPriceTimes)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numSeconds)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
@@ -148,6 +181,26 @@
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.label21);
this.splitContainer1.Panel1.Controls.Add(this.numUnitNum2);
this.splitContainer1.Panel1.Controls.Add(this.numUnitNum1);
this.splitContainer1.Panel1.Controls.Add(this.label20);
this.splitContainer1.Panel1.Controls.Add(this.numWeight2);
this.splitContainer1.Panel1.Controls.Add(this.numWeight1);
this.splitContainer1.Panel1.Controls.Add(this.label19);
this.splitContainer1.Panel1.Controls.Add(this.numHeight2);
this.splitContainer1.Panel1.Controls.Add(this.numHeight1);
this.splitContainer1.Panel1.Controls.Add(this.label18);
this.splitContainer1.Panel1.Controls.Add(this.numWidth2);
this.splitContainer1.Panel1.Controls.Add(this.numWidth1);
this.splitContainer1.Panel1.Controls.Add(this.numLen2);
this.splitContainer1.Panel1.Controls.Add(this.numLen1);
this.splitContainer1.Panel1.Controls.Add(this.label15);
this.splitContainer1.Panel1.Controls.Add(this.label17);
this.splitContainer1.Panel1.Controls.Add(this.numAddPrice);
this.splitContainer1.Panel1.Controls.Add(this.label16);
this.splitContainer1.Panel1.Controls.Add(this.numAddPriceTimes);
this.splitContainer1.Panel1.Controls.Add(this.chkChangeSizeAndNumber);
this.splitContainer1.Panel1.Controls.Add(this.btnStop);
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.lblCustomImgNum);
@@ -160,6 +213,7 @@
this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel1);
this.splitContainer1.Panel1.Controls.Add(this.btnSetSubSa);
this.splitContainer1.Panel1.Controls.Add(this.btnAdd);
this.splitContainer1.Panel1.Controls.Add(this.chkAddPrice);
//
// splitContainer1.Panel2
//
@@ -168,6 +222,305 @@
this.splitContainer1.SplitterDistance = 100;
this.splitContainer1.TabIndex = 2;
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(621, 75);
this.label21.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(32, 17);
this.label21.TabIndex = 588;
this.label21.Text = "数量";
//
// numUnitNum2
//
this.numUnitNum2.Location = new System.Drawing.Point(696, 72);
this.numUnitNum2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numUnitNum2.Maximum = new decimal(new int[] {
600,
0,
0,
0});
this.numUnitNum2.Name = "numUnitNum2";
this.numUnitNum2.Size = new System.Drawing.Size(42, 23);
this.numUnitNum2.TabIndex = 587;
this.numUnitNum2.Value = new decimal(new int[] {
600,
0,
0,
0});
//
// numUnitNum1
//
this.numUnitNum1.Location = new System.Drawing.Point(653, 72);
this.numUnitNum1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numUnitNum1.Maximum = new decimal(new int[] {
600,
0,
0,
0});
this.numUnitNum1.Name = "numUnitNum1";
this.numUnitNum1.Size = new System.Drawing.Size(42, 23);
this.numUnitNum1.TabIndex = 586;
this.numUnitNum1.Value = new decimal(new int[] {
450,
0,
0,
0});
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(487, 75);
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);
this.label20.TabIndex = 585;
this.label20.Text = "重";
//
// numWeight2
//
this.numWeight2.Location = new System.Drawing.Point(563, 72);
this.numWeight2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numWeight2.Maximum = new decimal(new int[] {
99999,
0,
0,
0});
this.numWeight2.Name = "numWeight2";
this.numWeight2.Size = new System.Drawing.Size(55, 23);
this.numWeight2.TabIndex = 584;
this.numWeight2.Value = new decimal(new int[] {
99999,
0,
0,
0});
//
// numWeight1
//
this.numWeight1.Location = new System.Drawing.Point(507, 72);
this.numWeight1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numWeight1.Maximum = new decimal(new int[] {
99999,
0,
0,
0});
this.numWeight1.Name = "numWeight1";
this.numWeight1.Size = new System.Drawing.Size(55, 23);
this.numWeight1.TabIndex = 583;
this.numWeight1.Value = new decimal(new int[] {
80000,
0,
0,
0});
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(379, 75);
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);
this.label19.TabIndex = 570;
this.label19.Text = "高";
//
// numHeight2
//
this.numHeight2.Location = new System.Drawing.Point(442, 72);
this.numHeight2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numHeight2.Maximum = new decimal(new int[] {
299,
0,
0,
0});
this.numHeight2.Name = "numHeight2";
this.numHeight2.Size = new System.Drawing.Size(42, 23);
this.numHeight2.TabIndex = 569;
this.numHeight2.Value = new decimal(new int[] {
100,
0,
0,
0});
//
// numHeight1
//
this.numHeight1.Location = new System.Drawing.Point(399, 72);
this.numHeight1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numHeight1.Maximum = new decimal(new int[] {
299,
0,
0,
0});
this.numHeight1.Name = "numHeight1";
this.numHeight1.Size = new System.Drawing.Size(42, 23);
this.numHeight1.TabIndex = 568;
this.numHeight1.Value = new decimal(new int[] {
50,
0,
0,
0});
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(271, 75);
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);
this.label18.TabIndex = 567;
this.label18.Text = "宽";
//
// numWidth2
//
this.numWidth2.Location = new System.Drawing.Point(334, 72);
this.numWidth2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numWidth2.Maximum = new decimal(new int[] {
299,
0,
0,
0});
this.numWidth2.Name = "numWidth2";
this.numWidth2.Size = new System.Drawing.Size(42, 23);
this.numWidth2.TabIndex = 566;
this.numWidth2.Value = new decimal(new int[] {
100,
0,
0,
0});
//
// numWidth1
//
this.numWidth1.Location = new System.Drawing.Point(291, 72);
this.numWidth1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numWidth1.Maximum = new decimal(new int[] {
299,
0,
0,
0});
this.numWidth1.Name = "numWidth1";
this.numWidth1.Size = new System.Drawing.Size(42, 23);
this.numWidth1.TabIndex = 565;
this.numWidth1.Value = new decimal(new int[] {
55,
0,
0,
0});
//
// numLen2
//
this.numLen2.Location = new System.Drawing.Point(226, 72);
this.numLen2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numLen2.Maximum = new decimal(new int[] {
299,
0,
0,
0});
this.numLen2.Name = "numLen2";
this.numLen2.Size = new System.Drawing.Size(42, 23);
this.numLen2.TabIndex = 564;
this.numLen2.Value = new decimal(new int[] {
100,
0,
0,
0});
//
// numLen1
//
this.numLen1.Location = new System.Drawing.Point(183, 72);
this.numLen1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numLen1.Maximum = new decimal(new int[] {
299,
0,
0,
0});
this.numLen1.Name = "numLen1";
this.numLen1.Size = new System.Drawing.Size(42, 23);
this.numLen1.TabIndex = 563;
this.numLen1.Value = new decimal(new int[] {
60,
0,
0,
0});
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(164, 75);
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);
this.label15.TabIndex = 562;
this.label15.Text = "长";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(933, 75);
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);
this.label17.TabIndex = 549;
this.label17.Text = "元";
//
// numAddPrice
//
this.numAddPrice.DecimalPlaces = 2;
this.numAddPrice.Increment = new decimal(new int[] {
1,
0,
0,
131072});
this.numAddPrice.Location = new System.Drawing.Point(889, 72);
this.numAddPrice.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numAddPrice.Name = "numAddPrice";
this.numAddPrice.Size = new System.Drawing.Size(44, 23);
this.numAddPrice.TabIndex = 548;
this.numAddPrice.Value = new decimal(new int[] {
5,
0,
0,
0});
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(843, 75);
this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(48, 17);
this.label16.TabIndex = 547;
this.label16.Text = "倍 再加";
//
// numAddPriceTimes
//
this.numAddPriceTimes.DecimalPlaces = 2;
this.numAddPriceTimes.Increment = new decimal(new int[] {
1,
0,
0,
131072});
this.numAddPriceTimes.Location = new System.Drawing.Point(799, 72);
this.numAddPriceTimes.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numAddPriceTimes.Name = "numAddPriceTimes";
this.numAddPriceTimes.Size = new System.Drawing.Size(44, 23);
this.numAddPriceTimes.TabIndex = 533;
this.numAddPriceTimes.Value = new decimal(new int[] {
20,
0,
0,
65536});
//
// chkChangeSizeAndNumber
//
this.chkChangeSizeAndNumber.AutoSize = true;
this.chkChangeSizeAndNumber.Location = new System.Drawing.Point(6, 73);
this.chkChangeSizeAndNumber.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkChangeSizeAndNumber.Name = "chkChangeSizeAndNumber";
this.chkChangeSizeAndNumber.Size = new System.Drawing.Size(159, 21);
this.chkChangeSizeAndNumber.TabIndex = 520;
this.chkChangeSizeAndNumber.Text = "修改包装尺寸和单品数量";
this.chkChangeSizeAndNumber.UseVisualStyleBackColor = true;
//
// btnStop
//
this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -223,12 +576,13 @@
// lblCustomImgNum
//
this.lblCustomImgNum.AutoSize = true;
this.lblCustomImgNum.Location = new System.Drawing.Point(349, 74);
this.lblCustomImgNum.Location = new System.Drawing.Point(1442, 75);
this.lblCustomImgNum.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.lblCustomImgNum.Name = "lblCustomImgNum";
this.lblCustomImgNum.Size = new System.Drawing.Size(95, 17);
this.lblCustomImgNum.TabIndex = 484;
this.lblCustomImgNum.Text = "自定义图片 0 张";
this.lblCustomImgNum.Visible = false;
//
// btnCustomImg
//
@@ -236,7 +590,7 @@
this.btnCustomImg.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCustomImg.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCustomImg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCustomImg.Location = new System.Drawing.Point(242, 69);
this.btnCustomImg.Location = new System.Drawing.Point(1335, 70);
this.btnCustomImg.Name = "btnCustomImg";
this.btnCustomImg.Size = new System.Drawing.Size(106, 26);
this.btnCustomImg.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -252,21 +606,23 @@
this.btnCustomImg.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnCustomImg.TabIndex = 483;
this.btnCustomImg.Text = "设置自定义图片";
this.btnCustomImg.Visible = false;
this.btnCustomImg.Click += new System.EventHandler(this.btnCustomImg_Click);
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(183, 74);
this.label14.Location = new System.Drawing.Point(1276, 75);
this.label14.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(56, 17);
this.label14.TabIndex = 479;
this.label14.Text = "秒后还原";
this.label14.Visible = false;
//
// numSeconds
//
this.numSeconds.Location = new System.Drawing.Point(137, 71);
this.numSeconds.Location = new System.Drawing.Point(1230, 72);
this.numSeconds.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numSeconds.Maximum = new decimal(new int[] {
1000,
@@ -281,16 +637,18 @@
0,
0,
0});
this.numSeconds.Visible = false;
//
// chkCustomPic
//
this.chkCustomPic.Location = new System.Drawing.Point(8, 72);
this.chkCustomPic.Location = new System.Drawing.Point(1101, 73);
this.chkCustomPic.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0);
this.chkCustomPic.Name = "chkCustomPic";
this.chkCustomPic.Size = new System.Drawing.Size(135, 21);
this.chkCustomPic.TabIndex = 477;
this.chkCustomPic.Text = "使用自定义图片并在";
this.chkCustomPic.UseVisualStyleBackColor = true;
this.chkCustomPic.Visible = false;
//
// btnDel
//
@@ -918,6 +1276,17 @@
this.btnAdd.UseVisualStyleBackColor = false;
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// chkAddPrice
//
this.chkAddPrice.AutoSize = true;
this.chkAddPrice.Location = new System.Drawing.Point(755, 73);
this.chkAddPrice.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkAddPrice.Name = "chkAddPrice";
this.chkAddPrice.Size = new System.Drawing.Size(51, 21);
this.chkAddPrice.TabIndex = 550;
this.chkAddPrice.Text = "加价";
this.chkAddPrice.UseVisualStyleBackColor = true;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1259,6 +1628,18 @@
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.numUnitNum2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numUnitNum1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numWeight2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numWeight1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numHeight2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numHeight1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numWidth2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numWidth1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numLen2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numLen1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numAddPrice)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numAddPriceTimes)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numSeconds)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
@@ -1360,5 +1741,26 @@
private DevComponents.DotNetBar.PanelEx btnCustomImg;
private DevComponents.DotNetBar.PanelEx btnExport;
private DevComponents.DotNetBar.PanelEx btnStop;
private UserComponent.UcCheckBox chkChangeSizeAndNumber;
private System.Windows.Forms.NumericUpDown numAddPriceTimes;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.NumericUpDown numAddPrice;
private System.Windows.Forms.Label label16;
private UserComponent.UcCheckBox chkAddPrice;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.NumericUpDown numHeight2;
private System.Windows.Forms.NumericUpDown numHeight1;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.NumericUpDown numWidth2;
private System.Windows.Forms.NumericUpDown numWidth1;
private System.Windows.Forms.NumericUpDown numLen2;
private System.Windows.Forms.NumericUpDown numLen1;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.NumericUpDown numUnitNum2;
private System.Windows.Forms.NumericUpDown numUnitNum1;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.NumericUpDown numWeight2;
private System.Windows.Forms.NumericUpDown numWeight1;
}
}
@@ -1229,6 +1229,18 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
#endregion
int len = 30, width = 20, height = 10; // 300, 200, 100
int weight = 500; //500000
int numberOfPieces = 1; // 单品数量
if (chkChangeSizeAndNumber.Checked) // 修改包装尺寸和单品数量
{
len = Randomx.GetId(numLen1.Value.ParseToInt(), numLen2.Value.ParseToInt()+1);
width = Randomx.GetId(numWidth1.Value.ParseToInt(), Math.Min(len, numWidth2.Value.ParseToInt() + 1));
height = Randomx.GetId(numHeight1.Value.ParseToInt(), Math.Min(width, numHeight2.Value.ParseToInt() + 1));
weight = Randomx.GetId(numWeight1.Value.ParseToInt(), numWeight2.Value.ParseToInt() + 1);
numberOfPieces = Randomx.GetId(numUnitNum1.Value.ParseToInt(), numUnitNum2.Value.ParseToInt());
}
int skuCount = 0;
//foreach (var skuInfo in skcInfo.productSkuList)
List<TemuProductSku> skuListTmp = new List<TemuProductSku>();
@@ -1270,12 +1282,36 @@ namespace TemuKJD.KJDForms.ProductSelectForms
skuItem.productSkuId = 0;
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq()
{
skuClassification = skuInfo.productSkuMultiPack.skuClassification,
numberOfPieces = skuInfo.productSkuMultiPack.numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
skuClassification = skuInfo.productSkuMultiPack.skuClassification,
};
if (skuInfo.productSkuMultiPack.individuallyPacked != null)
{
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
{
skuClassification = skuInfo.productSkuMultiPack.skuClassification,
numberOfPieces = skuInfo.productSkuMultiPack.numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
individuallyPacked = skuInfo.productSkuMultiPack.individuallyPacked.ParseToInt(),
};
}
if (chkChangeSizeAndNumber.Checked)
{
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
{
skuClassification = 2,
numberOfPieces = numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
individuallyPacked = 1,
};
}
skuItem.productSkuNonAuditExtAttrReq = JsonHelper.DeserializeJsonToObject<ProductSkuNonAuditExtAttrReq>(
JsonHelper.SerializeObject(skuInfo.productSkuNonAuditExtAttr));
if (skuItem.productSkuNonAuditExtAttrReq == null)
@@ -1342,6 +1378,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms
productSkuWeightReq = JsonHelper.DeserializeJsonToObject<ProductSkuWeightReq>(
JsonHelper.SerializeObject(skuInfo.productSkuWhExtAttr.productSkuWeight)),
};
if (chkChangeSizeAndNumber.Checked) // 修改包装尺寸和单品数量
{
skuItem.productSkuWhExtAttrReq.productSkuVolumeReq.len = len * 10;
skuItem.productSkuWhExtAttrReq.productSkuVolumeReq.width = width * 10;
skuItem.productSkuWhExtAttrReq.productSkuVolumeReq.height = height * 10;
skuItem.productSkuWhExtAttrReq.productSkuWeightReq.value = weight * 1000;
}
skuItem.supplierPrice = skuInfo.supplierPrice;
// 按照批号原价取商品原价和加价规则并修改商品上传价格
if (chkOriginalPriceMarkUp.Checked)
@@ -1350,6 +1393,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
if (dbPrice != null)
skuItem.supplierPrice = dbPrice.original_price * dbPrice.markup_times + dbPrice.extra_price;
}
if (chkAddPrice.Checked) //自定义加价
{
skuItem.supplierPrice = (skuInfo.supplierPrice * numAddPriceTimes.Value + numAddPrice.Value * 100).ParseToInt();
}
#region 使用随机sku价格上传(第一个sku价格不变,此处有bug,平台最后的sku排列不是按照提交上去的顺序排的)
if (skuCount != 1 && chkSkuRandomPrice.Checked)
@@ -75,7 +75,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
BaseMsgForm.ShowInfo(text, "", FormLevel.LARGE);
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "文本文件(*.txt)|*.txt|所有文件 (*.*)|*.*";
openFileDialog.Filter = "文本文件(*.txt)|*.txt|csv文件(*.csv)|*.csv|所有文件 (*.*)|*.*";
openFileDialog.RestoreDirectory = true;
openFileDialog.FilterIndex = 1;
if (openFileDialog.ShowDialog() == DialogResult.OK)
@@ -84,8 +84,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.pbLoading.Enabled = true;
Task.Run(() =>
{
using (StreamReader sr = new StreamReader(openFileDialog.FileName, System.Text.Encoding.UTF8))
//using (StreamReader sr = new StreamReader(openFileDialog.FileName, Encoding.GetEncoding("gb2312")))
//using (StreamReader sr = new StreamReader(openFileDialog.FileName, System.Text.Encoding.UTF8))
using (StreamReader sr = new StreamReader(openFileDialog.FileName, Encoding.GetEncoding("gb2312")))
{
string fileName = openFileDialog.FileName;
string importStr = sr.ReadToEnd().Trim();
@@ -145,7 +145,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "导入结束";
this.statusBar.lblTaskStatus.Text = "加价信息导入结束";
BaseMsgForm.ShowInfo(resultMsg, "", FormLevel.LARGE);
}));
}