1 bxx相关逻辑 2 店铺活动相关逻辑

This commit is contained in:
wule committed 2025-09-09 19:07:29 +08:00
1 parent fc017993df
commit b44fa2a6c3
35 files changed
+460 -3861

No files matched your search

@@ -30,17 +30,15 @@ namespace TemuKJD.KJDForms.SalesCenterForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.chkIfLowCancel = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.actDiscount80 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl();
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.ucCheckBox2 = new TemuKJD.UserComponent.UcCheckBox(this.components);
@@ -55,6 +53,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.chkFullShop = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkNoSaleProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.panel1 = new System.Windows.Forms.Panel();
this.numOnSaleDays2 = new System.Windows.Forms.NumericUpDown();
this.numSaleCount = new System.Windows.Forms.NumericUpDown();
this.cmbDays = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
@@ -62,6 +61,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.label2 = new System.Windows.Forms.Label();
this.numOnSaleDays = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
@@ -102,6 +102,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRecommendPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRecommendInventory = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colTargetActivityStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPrcie = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colInventory = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -118,6 +119,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.actDiscount85.SuspendLayout();
this.actDiscount70.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numOnSaleDays2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numSaleCount)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numOnSaleDays)).BeginInit();
this.ucGroupBoxEx1.SuspendLayout();
@@ -171,6 +173,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx3.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx3.Controls.Add(this.chkIfLowCancel);
this.ucGroupBoxEx3.Controls.Add(this.actDiscount80);
this.ucGroupBoxEx3.Controls.Add(this.actDiscount85);
this.ucGroupBoxEx3.Controls.Add(this.actDiscount70);
@@ -186,6 +189,17 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.ucGroupBoxEx3.TabStop = false;
this.ucGroupBoxEx3.Text = "活动设置";
//
// chkIfLowCancel
//
this.chkIfLowCancel.AutoSize = true;
this.chkIfLowCancel.Location = new System.Drawing.Point(653, 84);
this.chkIfLowCancel.Name = "chkIfLowCancel";
this.chkIfLowCancel.Size = new System.Drawing.Size(207, 21);
this.chkIfLowCancel.TabIndex = 723;
this.chkIfLowCancel.Text = "设置库存低于最低库存不报名活动";
this.chkIfLowCancel.UseVisualStyleBackColor = true;
this.chkIfLowCancel.Visible = false;
//
// actDiscount80
//
this.actDiscount80.AutoSize = true;
@@ -198,16 +212,16 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.actDiscount80.IsDefaultInventory = false;
this.actDiscount80.Location = new System.Drawing.Point(15, 82);
this.actDiscount80.Name = "actDiscount80";
this.actDiscount80.Size = new System.Drawing.Size(318, 21);
this.actDiscount80.Size = new System.Drawing.Size(303, 26);
this.actDiscount80.TabIndex = 715;
//
// object_6dcc57fe_428d_475c_90c2_d99d71a7014f
//
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.AutoSize = true;
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Location = new System.Drawing.Point(198, 2);
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Location = new System.Drawing.Point(180, 2);
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Margin = new System.Windows.Forms.Padding(0);
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Name = "object_6dcc57fe_428d_475c_90c2_d99d71a7014f";
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Size = new System.Drawing.Size(120, 16);
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Size = new System.Drawing.Size(123, 21);
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.TabIndex = 706;
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Text = "平台推荐最低库存";
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.UseVisualStyleBackColor = true;
@@ -217,7 +231,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.ucCheckBox2.AutoSize = true;
this.ucCheckBox2.Location = new System.Drawing.Point(198, 2);
this.ucCheckBox2.Name = "ucCheckBox2";
this.ucCheckBox2.Size = new System.Drawing.Size(48, 16);
this.ucCheckBox2.Size = new System.Drawing.Size(51, 21);
this.ucCheckBox2.TabIndex = 706;
this.ucCheckBox2.Text = "默认";
this.ucCheckBox2.UseVisualStyleBackColor = true;
@@ -227,7 +241,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.ucCheckBox3.AutoSize = true;
this.ucCheckBox3.Location = new System.Drawing.Point(198, 2);
this.ucCheckBox3.Name = "ucCheckBox3";
this.ucCheckBox3.Size = new System.Drawing.Size(48, 16);
this.ucCheckBox3.Size = new System.Drawing.Size(51, 21);
this.ucCheckBox3.TabIndex = 706;
this.ucCheckBox3.Text = "默认";
this.ucCheckBox3.UseVisualStyleBackColor = true;
@@ -241,17 +255,17 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.actDiscount85.Discount = 85;
this.actDiscount85.Inventory = 10;
this.actDiscount85.IsDefaultInventory = false;
this.actDiscount85.Location = new System.Drawing.Point(351, 82);
this.actDiscount85.Location = new System.Drawing.Point(329, 82);
this.actDiscount85.Name = "actDiscount85";
this.actDiscount85.Size = new System.Drawing.Size(321, 21);
this.actDiscount85.Size = new System.Drawing.Size(306, 26);
this.actDiscount85.TabIndex = 711;
//
// object_5db00808_c6be_4ffa_a702_9b91e2208933
//
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.AutoSize = true;
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Location = new System.Drawing.Point(198, 2);
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Location = new System.Drawing.Point(180, 2);
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Name = "object_5db00808_c6be_4ffa_a702_9b91e2208933";
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Size = new System.Drawing.Size(120, 16);
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Size = new System.Drawing.Size(123, 21);
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.TabIndex = 706;
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Text = "平台推荐最低库存";
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.UseVisualStyleBackColor = true;
@@ -261,7 +275,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.ucCheckBox1.AutoSize = true;
this.ucCheckBox1.Location = new System.Drawing.Point(198, 2);
this.ucCheckBox1.Name = "ucCheckBox1";
this.ucCheckBox1.Size = new System.Drawing.Size(48, 16);
this.ucCheckBox1.Size = new System.Drawing.Size(51, 21);
this.ucCheckBox1.TabIndex = 706;
this.ucCheckBox1.Text = "默认";
this.ucCheckBox1.UseVisualStyleBackColor = true;
@@ -274,17 +288,17 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.actDiscount70.Discount = 70;
this.actDiscount70.Inventory = 10;
this.actDiscount70.IsDefaultInventory = false;
this.actDiscount70.Location = new System.Drawing.Point(351, 54);
this.actDiscount70.Location = new System.Drawing.Point(329, 54);
this.actDiscount70.Name = "actDiscount70";
this.actDiscount70.Size = new System.Drawing.Size(321, 21);
this.actDiscount70.Size = new System.Drawing.Size(306, 26);
this.actDiscount70.TabIndex = 710;
//
// chkDiscount6
//
this.chkDiscount6.AutoSize = true;
this.chkDiscount6.Location = new System.Drawing.Point(198, 2);
this.chkDiscount6.Location = new System.Drawing.Point(180, 2);
this.chkDiscount6.Name = "chkDiscount6";
this.chkDiscount6.Size = new System.Drawing.Size(120, 16);
this.chkDiscount6.Size = new System.Drawing.Size(123, 21);
this.chkDiscount6.TabIndex = 706;
this.chkDiscount6.Text = "平台推荐最低库存";
this.chkDiscount6.UseVisualStyleBackColor = true;
@@ -298,7 +312,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.actDiscount60.IsDefaultInventory = false;
this.actDiscount60.Location = new System.Drawing.Point(15, 54);
this.actDiscount60.Name = "actDiscount60";
this.actDiscount60.Size = new System.Drawing.Size(318, 21);
this.actDiscount60.Size = new System.Drawing.Size(303, 23);
this.actDiscount60.TabIndex = 709;
//
// panelEx2
@@ -308,7 +322,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.panelEx2.Cursor = System.Windows.Forms.Cursors.Hand;
this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.panelEx2.Location = new System.Drawing.Point(1055, 32);
this.panelEx2.Location = new System.Drawing.Point(1050, 32);
this.panelEx2.Name = "panelEx2";
this.panelEx2.Size = new System.Drawing.Size(70, 23);
this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -333,7 +347,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.chkFullShop.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkFullShop.Location = new System.Drawing.Point(18, 27);
this.chkFullShop.Name = "chkFullShop";
this.chkFullShop.Size = new System.Drawing.Size(96, 16);
this.chkFullShop.Size = new System.Drawing.Size(99, 21);
this.chkFullShop.TabIndex = 684;
this.chkFullShop.Text = "报名全店活动";
this.chkFullShop.UseVisualStyleBackColor = true;
@@ -344,7 +358,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.chkNoSaleProd.AutoSize = true;
this.chkNoSaleProd.Location = new System.Drawing.Point(120, 27);
this.chkNoSaleProd.Name = "chkNoSaleProd";
this.chkNoSaleProd.Size = new System.Drawing.Size(96, 16);
this.chkNoSaleProd.Size = new System.Drawing.Size(99, 21);
this.chkNoSaleProd.TabIndex = 685;
this.chkNoSaleProd.Text = "算法报名活动";
this.chkNoSaleProd.UseVisualStyleBackColor = true;
@@ -352,6 +366,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
//
// panel1
//
this.panel1.Controls.Add(this.numOnSaleDays2);
this.panel1.Controls.Add(this.numSaleCount);
this.panel1.Controls.Add(this.cmbDays);
this.panel1.Controls.Add(this.label4);
@@ -359,17 +374,35 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.numOnSaleDays);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.label5);
this.panel1.Location = new System.Drawing.Point(223, 23);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(397, 26);
this.panel1.Size = new System.Drawing.Size(545, 26);
this.panel1.TabIndex = 722;
this.panel1.Visible = false;
//
// numOnSaleDays2
//
this.numOnSaleDays2.Location = new System.Drawing.Point(143, 2);
this.numOnSaleDays2.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.numOnSaleDays2.Name = "numOnSaleDays2";
this.numOnSaleDays2.Size = new System.Drawing.Size(46, 23);
this.numOnSaleDays2.TabIndex = 730;
this.numOnSaleDays2.Value = new decimal(new int[] {
9999,
0,
0,
0});
//
// numSaleCount
//
this.numSaleCount.Location = new System.Drawing.Point(286, 2);
this.numSaleCount.Location = new System.Drawing.Point(329, 2);
this.numSaleCount.Name = "numSaleCount";
this.numSaleCount.Size = new System.Drawing.Size(40, 21);
this.numSaleCount.Size = new System.Drawing.Size(40, 23);
this.numSaleCount.TabIndex = 726;
//
// cmbDays
@@ -379,7 +412,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.cmbDays.Items.AddRange(new object[] {
"7",
"30"});
this.cmbDays.Location = new System.Drawing.Point(203, 1);
this.cmbDays.Location = new System.Drawing.Point(246, 1);
this.cmbDays.Name = "cmbDays";
this.cmbDays.Size = new System.Drawing.Size(38, 24);
this.cmbDays.TabIndex = 729;
@@ -388,35 +421,40 @@ namespace TemuKJD.KJDForms.SalesCenterForms
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(243, 6);
this.label4.Location = new System.Drawing.Point(286, 5);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(41, 12);
this.label4.Size = new System.Drawing.Size(44, 17);
this.label4.TabIndex = 728;
this.label4.Text = "天销量";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(328, 6);
this.label3.Location = new System.Drawing.Point(371, 5);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(65, 12);
this.label3.Size = new System.Drawing.Size(68, 17);
this.label3.TabIndex = 727;
this.label3.Text = "以内的商品";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(148, 6);
this.label2.Location = new System.Drawing.Point(191, 5);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.Size = new System.Drawing.Size(56, 17);
this.label2.TabIndex = 725;
this.label2.Text = "天,且近";
//
// numOnSaleDays
//
this.numOnSaleDays.Location = new System.Drawing.Point(106, 2);
this.numOnSaleDays.Location = new System.Drawing.Point(80, 2);
this.numOnSaleDays.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.numOnSaleDays.Name = "numOnSaleDays";
this.numOnSaleDays.Size = new System.Drawing.Size(40, 21);
this.numOnSaleDays.Size = new System.Drawing.Size(46, 23);
this.numOnSaleDays.TabIndex = 724;
this.numOnSaleDays.Value = new decimal(new int[] {
30,
@@ -427,11 +465,20 @@ namespace TemuKJD.KJDForms.SalesCenterForms
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 6);
this.label1.Location = new System.Drawing.Point(3, 5);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(101, 12);
this.label1.Size = new System.Drawing.Size(80, 17);
this.label1.TabIndex = 723;
this.label1.Text = "设置加站时间超过";
this.label1.Text = "设置加站时间";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(125, 5);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(20, 17);
this.label5.TabIndex = 731;
this.label5.Text = "至";
//
// ucGroupBoxEx1
//
@@ -494,7 +541,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.chkGetDiscount.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkGetDiscount.Location = new System.Drawing.Point(20, 68);
this.chkGetDiscount.Name = "chkGetDiscount";
this.chkGetDiscount.Size = new System.Drawing.Size(96, 28);
this.chkGetDiscount.Size = new System.Drawing.Size(99, 38);
this.chkGetDiscount.TabIndex = 0;
this.chkGetDiscount.Text = "同时查询折扣\r\n (较耗时)";
this.chkGetDiscount.UseVisualStyleBackColor = true;
@@ -566,18 +613,18 @@ namespace TemuKJD.KJDForms.SalesCenterForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle10.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -588,14 +635,6 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.colLoginStatus,
this.colCanUse,
this.colMessage});
dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.DefaultCellStyle = dataGridViewCellStyle12;
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(4, 0);
this.dgvShop.Name = "dgvShop";
@@ -693,19 +732,19 @@ namespace TemuKJD.KJDForms.SalesCenterForms
//
this.dgvActivity.AllowUserToAddRows = false;
this.dgvActivity.AllowUserToDeleteRows = false;
dataGridViewCellStyle13.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvActivity.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvActivity.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
this.dgvActivity.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvActivity.BackgroundColor = System.Drawing.Color.White;
this.dgvActivity.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvActivity.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14;
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvActivity.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
this.dgvActivity.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvActivity.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheckActivity,
@@ -717,14 +756,6 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.colSignUpTime,
this.colDiscount,
this.colActivityMsg});
dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvActivity.DefaultCellStyle = dataGridViewCellStyle15;
this.dgvActivity.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvActivity.Location = new System.Drawing.Point(0, 0);
this.dgvActivity.Name = "dgvActivity";
@@ -801,18 +832,18 @@ namespace TemuKJD.KJDForms.SalesCenterForms
//
this.dgvProduct.AllowUserToAddRows = false;
this.dgvProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle16.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16;
dataGridViewCellStyle11.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
this.dgvProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17;
dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheckProduct,
@@ -827,17 +858,10 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.colExtCode,
this.colRecommendPrice,
this.colRecommendInventory,
this.colTargetActivityStock,
this.colPrcie,
this.colInventory,
this.colMsg});
dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvProduct.DefaultCellStyle = dataGridViewCellStyle18;
this.dgvProduct.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvProduct.Location = new System.Drawing.Point(0, 0);
this.dgvProduct.Name = "dgvProduct";
@@ -939,6 +963,13 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.colRecommendInventory.ReadOnly = true;
this.colRecommendInventory.Width = 65;
//
// colTargetActivityStock
//
this.colTargetActivityStock.HeaderText = "最低库存";
this.colTargetActivityStock.Name = "colTargetActivityStock";
this.colTargetActivityStock.ReadOnly = true;
this.colTargetActivityStock.Width = 65;
//
// colPrcie
//
this.colPrcie.HeaderText = "申报价格";
@@ -1045,6 +1076,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1424, 529);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "MarketingActivityForm";
this.Text = "店铺优化";
this.Load += new System.EventHandler(this.MarketingActivityForm_Load);
@@ -1063,6 +1095,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.actDiscount70.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numOnSaleDays2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numSaleCount)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numOnSaleDays)).EndInit();
this.ucGroupBoxEx1.ResumeLayout(false);
@@ -1127,21 +1160,6 @@ namespace TemuKJD.KJDForms.SalesCenterForms
private System.Windows.Forms.Label label2;
private System.Windows.Forms.NumericUpDown numOnSaleDays;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheckProduct;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubmitActivityId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubmitActivityName;
private System.Windows.Forms.DataGridViewImageColumn colPic;
private System.Windows.Forms.DataGridViewTextBoxColumn colProdName;
private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
private System.Windows.Forms.DataGridViewLinkColumn coSkcId;
private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode;
private System.Windows.Forms.DataGridViewTextBoxColumn colRecommendPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colRecommendInventory;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrcie;
private System.Windows.Forms.DataGridViewTextBoxColumn colInventory;
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
private System.Windows.Forms.NumericUpDown numSaleCount;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox cmbDays;
@@ -1163,5 +1181,24 @@ namespace TemuKJD.KJDForms.SalesCenterForms
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheckProduct;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubmitActivityId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubmitActivityName;
private System.Windows.Forms.DataGridViewImageColumn colPic;
private System.Windows.Forms.DataGridViewTextBoxColumn colProdName;
private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
private System.Windows.Forms.DataGridViewLinkColumn coSkcId;
private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode;
private System.Windows.Forms.DataGridViewTextBoxColumn colRecommendPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colRecommendInventory;
private System.Windows.Forms.DataGridViewTextBoxColumn colTargetActivityStock;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrcie;
private System.Windows.Forms.DataGridViewTextBoxColumn colInventory;
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
private UserComponent.UcCheckBox chkIfLowCancel;
private System.Windows.Forms.NumericUpDown numOnSaleDays2;
private System.Windows.Forms.Label label5;
}
}
@@ -393,9 +393,11 @@ namespace TemuKJD.KJDForms.SalesCenterForms
pActThematic.activityTypeName = pActivity.activityName;
lstActivityThematic.Add(pActThematic);
string name = pActThematic.activityThematicName;
pActThematic.discount = BaseRegex.GetMatchRegexString(ref name, "(\\d{1,3}折)").ParseToString();
pActThematic.discount = pActThematic.discount.Replace("折", "");
pActThematic.discount = BaseRegex.GetMatchRegexString(ref name, "(\\d{1,3}(\\.?\\d?)折)").ParseToString();
pActThematic.discount = pActThematic.discount.Replace("折", "").Replace(".","");
pActThematic.discount = string.IsNullOrWhiteSpace(pActThematic.discount) ? "" : pActThematic.discount;
if (pActThematic.discount.Length == 1)
pActThematic.discount += "0"; // 补0
}
}
}
@@ -636,6 +638,8 @@ namespace TemuKJD.KJDForms.SalesCenterForms
var dailyPrice = skuObj["dailyPrice"].ParseToInt();
var discount = suggestActivityPrice * 100.0 / dailyPrice;
actInfo.discount = Math.Round(discount) + "";
if (actInfo.discount.Length == 1)
actInfo.discount += "0"; // 补0
Invoke(new Action(() =>
{
actRow.Cells["colDiscount"].Value = string.IsNullOrEmpty(actInfo.discount) ? "-" : actInfo.discount.TrimEnd('0') + "折";
@@ -665,7 +669,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
return lstDiscount.First();
if (discount >= lstDiscount.Last())
return lstDiscount.Last();
for (int i = 0; i < lstDiscount.Count - 2; i++)
for (int i = 0; i < lstDiscount.Count - 1; i++)
{
if (discount >= lstDiscount[i] && discount < lstDiscount[i + 1])
return lstDiscount[i];
@@ -732,6 +736,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
public List<string> GetNoSaleProd(string shopId)
{
int onSaleDays = 0;
int onSaleDays2 = 9999;
int saleCount = 0;
string days = "7";
//int i = 0;
@@ -741,6 +746,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
{
days = cmbDays.Text;
onSaleDays = numOnSaleDays.Value.ParseToInt();
onSaleDays2 = numOnSaleDays2.Value.ParseToInt();
saleCount = numSaleCount.Value.ParseToInt();
this.statusBar.lblTaskStatus.Text = "正在查询无销量商品...";
@@ -775,7 +781,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
{
page++;
string jsonRst = GetNoSaleProd(shop, days, onSaleDays, saleCount, page);
string jsonRst = GetNoSaleProd(shop, days, onSaleDays, onSaleDays2, saleCount, page);
if (!jsonRst.Contains("\"success\":true"))
{
@@ -871,7 +877,12 @@ namespace TemuKJD.KJDForms.SalesCenterForms
int tryCount = 0;
tryAgain:
Thread.Sleep(100 + Randomx.GetId(200));
if (chkNoSaleProd.Checked && noSaleProdIdLst.Count == 0)
{
noSaleProdIdLst.Add("123");
}
var jsonRst = GetActivityMatch(shop, activity.activityType, activity.activityThematicId, string.Join(",", noSaleProdIdLst));
if (jsonRst.Contains("指定的值含有无效的控制字符") || jsonRst.Contains("login") || jsonRst.Contains("Login"))
{
Invoke(new Action(() =>
@@ -948,8 +959,10 @@ namespace TemuKJD.KJDForms.SalesCenterForms
discountCtrl = this.actDiscount85;
// 如果是默认库存或者库存小于推荐值,使用推荐库存
int inventory = discountCtrl.Inventory;
if (inventory < prod.suggestActivityStock || discountCtrl.IsDefaultInventory)
inventory = prod.suggestActivityStock.ParseToInt();
//if (inventory < prod.suggestActivityStock || discountCtrl.IsDefaultInventory)
// inventory = prod.suggestActivityStock.ParseToInt();
if (inventory < prod.targetActivityStock || discountCtrl.IsDefaultInventory)
inventory = prod.targetActivityStock.ParseToInt();
Invoke(new Action(() =>
{
int rowId = dgvProduct.Rows.Add(
@@ -965,13 +978,23 @@ namespace TemuKJD.KJDForms.SalesCenterForms
prod.skcList.FirstOrDefault()?.extCode,
activity.discount.Trim('0') + "折",
prod.suggestActivityStock,
prod.targetActivityStock,
activity.discount.Trim('0') + "折",
inventory
);
dgvProduct.Rows[rowId].Height = 30;
prodSubmitRows.Add(dgvProduct.Rows[rowId]);
// 过低的报名数量则不参与活动
if (!discountCtrl.IsDefaultInventory && chkIfLowCancel.Checked && discountCtrl.Inventory < prod.targetActivityStock)
{
}
else
prodSubmitRows.Add(dgvProduct.Rows[rowId]);
}));
if (!discountCtrl.IsDefaultInventory && chkIfLowCancel.Checked && discountCtrl.Inventory < prod.targetActivityStock)
{
continue;
}
ActProductListItem activityProditem = new ActProductListItem();
activityProditem.productId = prod.productId;
activityProditem.activityStock = inventory;
@@ -1137,16 +1160,16 @@ namespace TemuKJD.KJDForms.SalesCenterForms
/// <param name="onSalesDays">加入站点天数</param>
/// <param name="page"></param>
/// <returns></returns>
private string GetNoSaleProd(ShopLoginInfo shop, string days, int onSalesDays, int saleCount = 0, int page=1)
private string GetNoSaleProd(ShopLoginInfo shop, string days, int onSalesDays, int onSalesDays2, int saleCount = 0, int page=1)
{
string url = "https://agentseller.temu.com/mms/venom/api/supplier/sales/management/listWarehouse";
string body;
if (days == "7")
body = @"{""pageNo"":" + page + @",""pageSize"":40,""isLack"":0,""selectStatusList"":[12],""priceAdjustRecentDays"":7,
""sevenDaysSaleVolumMin"":0, ""sevenDaysSaleVolumMax"":" + saleCount + @",""onSalesDurationOfflineGte"":" + onSalesDays + "}";
""sevenDaysSaleVolumMin"":0, ""sevenDaysSaleVolumMax"":" + saleCount + @",""onSalesDurationOfflineGte"":" + onSalesDays + @",""onSalesDurationOfflineLte"":" + onSalesDays2 + "}";
else
body = @"{""pageNo"":" + page + @",""pageSize"":40,""isLack"":0,""selectStatusList"":[12],""priceAdjustRecentDays"":7,
""thirtyDaysSaleVolumMin"":0, ""thirtyDaysSaleVolumMax"":" + saleCount + @",""onSalesDurationOfflineGte"":" + onSalesDays + "}";
""thirtyDaysSaleVolumMin"":0, ""thirtyDaysSaleVolumMax"":" + saleCount + @",""onSalesDurationOfflineGte"":" + onSalesDays + @",""onSalesDurationOfflineLte"":"+ onSalesDays2 + "}";
string refere = "https://agentseller.temu.com/stock/fully-mgt/sale-manage/main";
return KJDHttpResponse.PostResponse2(shop, url, body, refere);
}
@@ -198,6 +198,9 @@
<metadata name="colRecommendInventory.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colTargetActivityStock.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrcie.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -31,7 +31,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
{
this.components = new System.ComponentModel.Container();
this.numInventory = new System.Windows.Forms.NumericUpDown();
this.chkDefaultInventory = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkMinInventory = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.numInventory)).BeginInit();
this.SuspendLayout();
@@ -46,7 +46,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
0,
0});
this.numInventory.Name = "numInventory";
this.numInventory.Size = new System.Drawing.Size(65, 21);
this.numInventory.Size = new System.Drawing.Size(49, 21);
this.numInventory.TabIndex = 707;
this.numInventory.Value = new decimal(new int[] {
10,
@@ -55,16 +55,17 @@ namespace TemuKJD.KJDForms.SalesCenterForms
0});
this.numInventory.ValueChanged += new System.EventHandler(this.numInventory_ValueChanged);
//
// chkDefaultInventory
// chkMinInventory
//
this.chkDefaultInventory.AutoSize = true;
this.chkDefaultInventory.Location = new System.Drawing.Point(198, 2);
this.chkDefaultInventory.Margin = new System.Windows.Forms.Padding(0);
this.chkDefaultInventory.Name = "chkDefaultInventory";
this.chkDefaultInventory.Size = new System.Drawing.Size(120, 16);
this.chkDefaultInventory.TabIndex = 706;
this.chkDefaultInventory.Text = "平台推荐最低库存";
this.chkDefaultInventory.UseVisualStyleBackColor = true;
this.chkMinInventory.AutoSize = true;
this.chkMinInventory.Location = new System.Drawing.Point(180, 2);
this.chkMinInventory.Margin = new System.Windows.Forms.Padding(0);
this.chkMinInventory.Name = "chkMinInventory";
this.chkMinInventory.Size = new System.Drawing.Size(120, 16);
this.chkMinInventory.TabIndex = 706;
this.chkMinInventory.Text = "平台允许最低库存";
this.chkMinInventory.UseVisualStyleBackColor = true;
this.chkMinInventory.CheckedChanged += new System.EventHandler(this.chkDefaultInventory_CheckedChanged);
//
// label1
//
@@ -82,10 +83,10 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.Controls.Add(this.numInventory);
this.Controls.Add(this.chkDefaultInventory);
this.Controls.Add(this.chkMinInventory);
this.Controls.Add(this.label1);
this.Name = "UcActivityDiscountCtrl";
this.Size = new System.Drawing.Size(318, 21);
this.Size = new System.Drawing.Size(300, 21);
((System.ComponentModel.ISupportInitialize)(this.numInventory)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -95,7 +96,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
#endregion
private System.Windows.Forms.NumericUpDown numInventory;
private UserComponent.UcCheckBox chkDefaultInventory;
private UserComponent.UcCheckBox chkMinInventory;
private System.Windows.Forms.Label label1;
}
}
@@ -73,13 +73,13 @@ namespace TemuKJD.KJDForms.SalesCenterForms
{
get
{
return this.chkDefaultInventory.Checked;
return this.chkMinInventory.Checked;
}
set
{
if (this.chkDefaultInventory.Checked != value)
if (this.chkMinInventory.Checked != value)
{
this.chkDefaultInventory.Checked = value;
this.chkMinInventory.Checked = value;
this.Invalidate();
}
}
@@ -89,5 +89,10 @@ namespace TemuKJD.KJDForms.SalesCenterForms
{
this.inventory = numInventory.Value.ParseToInt();
}
private void chkDefaultInventory_CheckedChanged(object sender, EventArgs e)
{
numInventory.Enabled = !chkMinInventory.Checked;
}
}
}