From eaa5e4f701a1e936e905e6f3da047671ee2b82d0 Mon Sep 17 00:00:00 2001 From: robin <3504557@qq.com> Date: Sat, 15 May 2021 11:22:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LocalBL/SegmentProductionBL.cs | 2 +- .../SegmentProductionAutoForm.Designer.cs | 225 +++++++++--------- .../SegmentProductionAutoForm.cs | 20 +- 3 files changed, 124 insertions(+), 123 deletions(-) diff --git a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs index d4a8ae4..76a75f1 100644 --- a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs @@ -44,7 +44,7 @@ namespace ButcherFactory.BO.LocalBL if (submited) { query.Where.Conditions.Add(DQCondition.GreaterThanOrEqual("CreateTime", DateTime.Today)); - query.Range = SelectRange.Top(50); + //query.Range = SelectRange.Top(50); } var list = new BindingList(); using (var session = DmoSession.New()) diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs index c51fd9f..d8e5336 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs @@ -43,11 +43,15 @@ this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.GoodsLabel = new WinFormControl.ULabel(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.colorButton3 = new ButcherFactory.Controls.ColorButton(); this.numberInput = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.statisticNumberBox = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); + this.logBtn = new ButcherFactory.Controls.ColorButton(); this.msglbl = new System.Windows.Forms.Label(); + this.closeBtn = new ButcherFactory.Controls.ColorButton(); + this.uWeightControl1 = new ButcherFactory.Controls.WeightControl(); this.barPrintCheck = new System.Windows.Forms.CheckBox(); this.uTimerLabel1 = new WinFormControl.UTimerLabel(); this.productBatchSelect = new System.Windows.Forms.ComboBox(); @@ -56,21 +60,17 @@ this.uLabel2 = new WinFormControl.ULabel(); this.netStateWatch1 = new WinFormControl.NetStateWatch(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.goodsSetBtn = new ButcherFactory.Controls.ColorButton(); this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); - this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); - this.colorButton3 = new ButcherFactory.Controls.ColorButton(); - this.logBtn = new ButcherFactory.Controls.ColorButton(); - this.closeBtn = new ButcherFactory.Controls.ColorButton(); - this.uWeightControl1 = new ButcherFactory.Controls.WeightControl(); - this.goodsSetBtn = new ButcherFactory.Controls.ColorButton(); this.colorButton2 = new ButcherFactory.Controls.ColorButton(); this.viewTaskBtn = new ButcherFactory.Controls.ColorButton(); this.colorButton1 = new ButcherFactory.Controls.ColorButton(); this.deleteBtn = new ButcherFactory.Controls.ColorButton(); this.rePrintBtn = new ButcherFactory.Controls.ColorButton(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -225,6 +225,21 @@ this.splitContainer1.SplitterDistance = 87; this.splitContainer1.TabIndex = 1; // + // colorButton3 + // + this.colorButton3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.colorButton3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); + this.colorButton3.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.colorButton3.ForeColor = System.Drawing.Color.White; + this.colorButton3.Location = new System.Drawing.Point(567, 4); + this.colorButton3.Name = "colorButton3"; + this.colorButton3.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107))))); + this.colorButton3.Size = new System.Drawing.Size(101, 41); + this.colorButton3.TabIndex = 30; + this.colorButton3.Text = "手工上传"; + this.colorButton3.UseVisualStyleBackColor = false; + this.colorButton3.Click += new System.EventHandler(this.colorButton3_Click); + // // numberInput // this.numberInput.Font = new System.Drawing.Font("宋体", 15F); @@ -264,6 +279,21 @@ this.label1.TabIndex = 26; this.label1.Text = "统计数量:"; // + // logBtn + // + this.logBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.logBtn.BackColor = System.Drawing.Color.CadetBlue; + this.logBtn.Font = new System.Drawing.Font("宋体", 15F); + this.logBtn.ForeColor = System.Drawing.Color.White; + this.logBtn.Location = new System.Drawing.Point(680, 4); + this.logBtn.Name = "logBtn"; + this.logBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.logBtn.Size = new System.Drawing.Size(101, 41); + this.logBtn.TabIndex = 25; + this.logBtn.Text = "日志"; + this.logBtn.UseVisualStyleBackColor = false; + this.logBtn.Click += new System.EventHandler(this.logBtn_Click); + // // msglbl // this.msglbl.AutoSize = true; @@ -274,6 +304,30 @@ this.msglbl.TabIndex = 24; this.msglbl.Text = "正在获取基础信息"; // + // closeBtn + // + this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.closeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25))))); + this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); + this.closeBtn.ForeColor = System.Drawing.Color.White; + this.closeBtn.Location = new System.Drawing.Point(1109, 7); + this.closeBtn.Name = "closeBtn"; + this.closeBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.closeBtn.Size = new System.Drawing.Size(111, 41); + this.closeBtn.TabIndex = 18; + this.closeBtn.Text = "关闭"; + this.closeBtn.UseVisualStyleBackColor = false; + this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); + // + // uWeightControl1 + // + this.uWeightControl1.BackColor = System.Drawing.Color.Transparent; + this.uWeightControl1.Location = new System.Drawing.Point(12, 7); + this.uWeightControl1.Name = "uWeightControl1"; + this.uWeightControl1.Size = new System.Drawing.Size(262, 74); + this.uWeightControl1.TabIndex = 17; + this.uWeightControl1.WeightFalg = null; + // // barPrintCheck // this.barPrintCheck.AutoSize = true; @@ -378,6 +432,21 @@ this.splitContainer2.SplitterDistance = 761; this.splitContainer2.TabIndex = 0; // + // goodsSetBtn + // + this.goodsSetBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.goodsSetBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); + this.goodsSetBtn.Font = new System.Drawing.Font("宋体", 15F); + this.goodsSetBtn.ForeColor = System.Drawing.Color.White; + this.goodsSetBtn.Location = new System.Drawing.Point(645, 3); + this.goodsSetBtn.Name = "goodsSetBtn"; + this.goodsSetBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.goodsSetBtn.Size = new System.Drawing.Size(111, 62); + this.goodsSetBtn.TabIndex = 19; + this.goodsSetBtn.Text = "产品设置"; + this.goodsSetBtn.UseVisualStyleBackColor = false; + this.goodsSetBtn.Click += new System.EventHandler(this.goodsSetBtn_Click); + // // flowLayoutPanel2 // this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -400,110 +469,6 @@ this.flowLayoutPanel1.Size = new System.Drawing.Size(640, 70); this.flowLayoutPanel1.TabIndex = 22; // - // groupBox1 - // - this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.groupBox1.Controls.Add(this.flowLayoutPanel4); - this.groupBox1.Controls.Add(this.flowLayoutPanel3); - this.groupBox1.Controls.Add(this.uLabel3); - this.groupBox1.Location = new System.Drawing.Point(8, 222); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(5); - this.groupBox1.Size = new System.Drawing.Size(447, 381); - this.groupBox1.TabIndex = 5; - this.groupBox1.TabStop = false; - // - // flowLayoutPanel4 - // - this.flowLayoutPanel4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.flowLayoutPanel4.Location = new System.Drawing.Point(5, 90); - this.flowLayoutPanel4.Name = "flowLayoutPanel4"; - this.flowLayoutPanel4.Size = new System.Drawing.Size(437, 286); - this.flowLayoutPanel4.TabIndex = 5; - // - // flowLayoutPanel3 - // - this.flowLayoutPanel3.AutoScroll = true; - this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Top; - this.flowLayoutPanel3.Location = new System.Drawing.Point(5, 19); - this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel3.Name = "flowLayoutPanel3"; - this.flowLayoutPanel3.Size = new System.Drawing.Size(437, 68); - this.flowLayoutPanel3.TabIndex = 4; - this.flowLayoutPanel3.WrapContents = false; - // - // colorButton3 - // - this.colorButton3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.colorButton3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); - this.colorButton3.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.colorButton3.ForeColor = System.Drawing.Color.White; - this.colorButton3.Location = new System.Drawing.Point(567, 4); - this.colorButton3.Name = "colorButton3"; - this.colorButton3.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107))))); - this.colorButton3.Size = new System.Drawing.Size(101, 41); - this.colorButton3.TabIndex = 30; - this.colorButton3.Text = "手工上传"; - this.colorButton3.UseVisualStyleBackColor = false; - this.colorButton3.Click += new System.EventHandler(this.colorButton3_Click); - // - // logBtn - // - this.logBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.logBtn.BackColor = System.Drawing.Color.CadetBlue; - this.logBtn.Font = new System.Drawing.Font("宋体", 15F); - this.logBtn.ForeColor = System.Drawing.Color.White; - this.logBtn.Location = new System.Drawing.Point(680, 4); - this.logBtn.Name = "logBtn"; - this.logBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.logBtn.Size = new System.Drawing.Size(101, 41); - this.logBtn.TabIndex = 25; - this.logBtn.Text = "日志"; - this.logBtn.UseVisualStyleBackColor = false; - this.logBtn.Click += new System.EventHandler(this.logBtn_Click); - // - // closeBtn - // - this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.closeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25))))); - this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); - this.closeBtn.ForeColor = System.Drawing.Color.White; - this.closeBtn.Location = new System.Drawing.Point(1109, 7); - this.closeBtn.Name = "closeBtn"; - this.closeBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.closeBtn.Size = new System.Drawing.Size(111, 41); - this.closeBtn.TabIndex = 18; - this.closeBtn.Text = "关闭"; - this.closeBtn.UseVisualStyleBackColor = false; - this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); - // - // uWeightControl1 - // - this.uWeightControl1.BackColor = System.Drawing.Color.Transparent; - this.uWeightControl1.Location = new System.Drawing.Point(12, 7); - this.uWeightControl1.Name = "uWeightControl1"; - this.uWeightControl1.Size = new System.Drawing.Size(262, 74); - this.uWeightControl1.TabIndex = 17; - this.uWeightControl1.WeightFalg = null; - // - // goodsSetBtn - // - this.goodsSetBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.goodsSetBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); - this.goodsSetBtn.Font = new System.Drawing.Font("宋体", 15F); - this.goodsSetBtn.ForeColor = System.Drawing.Color.White; - this.goodsSetBtn.Location = new System.Drawing.Point(645, 3); - this.goodsSetBtn.Name = "goodsSetBtn"; - this.goodsSetBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.goodsSetBtn.Size = new System.Drawing.Size(111, 62); - this.goodsSetBtn.TabIndex = 19; - this.goodsSetBtn.Text = "产品设置"; - this.goodsSetBtn.UseVisualStyleBackColor = false; - this.goodsSetBtn.Click += new System.EventHandler(this.goodsSetBtn_Click); - // // colorButton2 // this.colorButton2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); @@ -576,6 +541,42 @@ this.rePrintBtn.UseVisualStyleBackColor = false; this.rePrintBtn.Click += new System.EventHandler(this.rePrintBtn_Click); // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.groupBox1.Controls.Add(this.flowLayoutPanel4); + this.groupBox1.Controls.Add(this.flowLayoutPanel3); + this.groupBox1.Controls.Add(this.uLabel3); + this.groupBox1.Location = new System.Drawing.Point(8, 222); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Padding = new System.Windows.Forms.Padding(5); + this.groupBox1.Size = new System.Drawing.Size(447, 381); + this.groupBox1.TabIndex = 5; + this.groupBox1.TabStop = false; + // + // flowLayoutPanel4 + // + this.flowLayoutPanel4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flowLayoutPanel4.AutoScroll = true; + this.flowLayoutPanel4.Location = new System.Drawing.Point(5, 90); + this.flowLayoutPanel4.Name = "flowLayoutPanel4"; + this.flowLayoutPanel4.Size = new System.Drawing.Size(437, 286); + this.flowLayoutPanel4.TabIndex = 5; + // + // flowLayoutPanel3 + // + this.flowLayoutPanel3.AutoScroll = true; + this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Top; + this.flowLayoutPanel3.Location = new System.Drawing.Point(5, 19); + this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel3.Name = "flowLayoutPanel3"; + this.flowLayoutPanel3.Size = new System.Drawing.Size(437, 68); + this.flowLayoutPanel3.TabIndex = 4; + this.flowLayoutPanel3.WrapContents = false; + // // SegmentProductionAutoForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs index d1aa98e..bda7e0c 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs @@ -223,10 +223,10 @@ namespace ButcherFactory.SegmentProductionAuto_ } var weight = uWeightControl1.Weight; -#if DEBUG - if (weight == 0) - weight = (g.StandardWeightLow ?? 4.0m) + 0.1m; -#endif +//#if DEBUG +// if (weight == 0) +// weight = (g.StandardWeightLow ?? 4.0m) + 0.1m; +//#endif if (weight == 0) { MessageBox.Show("重量不能为0"); @@ -302,10 +302,10 @@ namespace ButcherFactory.SegmentProductionAuto_ var btn = sender as ColorButton; var detail = btn.Tag as ClientGoodsSet_Detail; var weight = uWeightControl1.Weight; -#if DEBUG - if (weight == 0) - weight = (detail.StandardWeightLow ?? 4.0m) + 0.1m; -#endif +//#if DEBUG +// if (weight == 0) +// weight = (detail.StandardWeightLow ?? 4.0m) + 0.1m; +//#endif if (weight == 0) throw new Exception("重量不能为0"); @@ -395,8 +395,8 @@ namespace ButcherFactory.SegmentProductionAuto_ historyList.Insert(0, entity); - if (historyList.Count > 30) - historyList.RemoveAt(30); + //if (historyList.Count > 30) + // historyList.RemoveAt(30); if (barPrintCheck.Checked) { var template = config.Template;