diff --git a/ButcherFactory.BO/Enums/DriveType.cs b/ButcherFactory.BO/Enums/DriveType.cs index 44f41d9..06cb8f7 100644 --- a/ButcherFactory.BO/Enums/DriveType.cs +++ b/ButcherFactory.BO/Enums/DriveType.cs @@ -13,5 +13,8 @@ namespace ButcherFactory.BO 白条领用 = 1, 分割生产 = 2, 扫码入库 = 3, + + //一下为自动转向用,无需再服务器设置到NamedValue上 + 分割生产自动化 = 200, } } diff --git a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs index 4f69309..98c1ed9 100644 --- a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs @@ -75,6 +75,33 @@ namespace ButcherFactory.BO.LocalBL } } + public static SegmentProduction InsertAndSetGroupID(long goodsID, decimal weight, long? workUnitID, long productBatchID, DateTime batchDate) + { + using (var session = DmoSession.New()) + { + var entity = new SegmentProduction(); + entity.Goods_ID = goodsID; + entity.Weight = weight; + entity.UserID = AppContext.Worker.ID; + entity.WorkUnit_ID = workUnitID; + entity.ProductBatch_ID = productBatchID; + entity.RowIndex = GenerateRowIndex(productBatchID, session); + entity.BarCode = string.Format("260912011{0:yyyyMMdd}{1:00000}", batchDate, entity.RowIndex); + session.Insert(entity); + FillGroupIDAsID(session, entity.ID); + session.Commit(); + return entity; + } + } + + static void FillGroupIDAsID(IDmoSession session,long id) + { + var update = new DQUpdateDom(typeof(SegmentProduction)); + update.Where.Conditions.Add(DQCondition.EQ("ID",id)); + update.Columns.Add(new DQUpdateColumn("GroupID", id)); + session.ExecuteNonQuery(update); + } + static int GenerateRowIndex(long productBatchID, IDmoSession session) { var query = new DQueryDom(new JoinAlias("_main", typeof(SegmentProduction))); diff --git a/ButcherFactory.BO/Utils/FormUtil.cs b/ButcherFactory.BO/Utils/FormUtil.cs index e243fd5..b6f42e4 100644 --- a/ButcherFactory.BO/Utils/FormUtil.cs +++ b/ButcherFactory.BO/Utils/FormUtil.cs @@ -13,6 +13,8 @@ namespace ButcherFactory.BO.Utils { public static Form CreateFrom() { + RedirectRole(); + var dll = Path.Combine(Directory.GetCurrentDirectory(), "ButcherFactory.Form.dll"); if (!File.Exists(dll)) throw new Exception("缺少必要的程序集文件 ButcherFactory.Form.dll"); @@ -33,6 +35,26 @@ namespace ButcherFactory.BO.Utils } return form; } + + private static void RedirectRole() + { + var list = XmlUtil.DeserializeFromFile>("Config\\RoleRedirectConfig.xml"); + var arr = AppContext.Worker.RoleList.ToList(); + foreach (var item in list) + { + var idx = arr.IndexOf(item.Role); + if (idx >= 0) + arr[idx] = item.RedirectRole; + } + AppContext.Worker.Role = string.Join(",", arr); + } + } + + public class RoleRedirectConfig + { + public short Role { get; set; } + + public short RedirectRole { get; set; } } public interface IWithRoleForm diff --git a/ButcherFactory.Form/ButcherFactory.Form.csproj b/ButcherFactory.Form/ButcherFactory.Form.csproj index 475c3ca..ef8a28a 100644 --- a/ButcherFactory.Form/ButcherFactory.Form.csproj +++ b/ButcherFactory.Form/ButcherFactory.Form.csproj @@ -134,6 +134,12 @@ SegmentInStoreForm.cs + + Form + + + SegmentProductionAutoForm.cs + Form @@ -193,6 +199,9 @@ SegmentInStoreForm.cs + + SegmentProductionAutoForm.cs + SegmentProductionForm.cs diff --git a/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.Designer.cs b/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.Designer.cs index 3326e47..f4afa37 100644 --- a/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.Designer.cs +++ b/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.Designer.cs @@ -527,6 +527,7 @@ this.MinimumSize = new System.Drawing.Size(1321, 650); this.Name = "CarcassInStoreForm"; this.Text = "白条入库"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel1.PerformLayout(); this.splitContainer1.Panel2.ResumeLayout(false); diff --git a/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs b/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs index 34f114b..8e75dc8 100644 --- a/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs +++ b/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs @@ -29,27 +29,27 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarcassSaleOutForm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = 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 dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = 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 dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = 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(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); this.uWeightControl1 = new WinFormControl.UWeightControl(); this.panel1 = new System.Windows.Forms.Panel(); this.carNumberLabel = new WinFormControl.ULabel(); @@ -304,7 +304,7 @@ this.uTimerLabel1.Name = "uTimerLabel1"; this.uTimerLabel1.Size = new System.Drawing.Size(136, 16); this.uTimerLabel1.TabIndex = 11; - this.uTimerLabel1.Text = "5月26日 10:37:38"; + this.uTimerLabel1.Text = "6月22日 12:31:50"; // // uScanPanel1 // @@ -585,17 +585,17 @@ this.mainGridView.AllowUserToDeleteRows = false; this.mainGridView.AllowUserToResizeColumns = false; this.mainGridView.AllowUserToResizeRows = false; - dataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.mainGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle22; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.mainGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.mainGridView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); this.mainGridView.BackgroundColor = System.Drawing.Color.White; this.mainGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle23.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle23.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.mainGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle23; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.mainGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.mainGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.mainGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.M_ID, @@ -606,18 +606,18 @@ this.mainGridView.MultiSelect = false; this.mainGridView.Name = "mainGridView"; this.mainGridView.ReadOnly = true; - dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle25.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle25.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle25.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle25.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle25.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.mainGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle25; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.mainGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle4; this.mainGridView.RowHeadersVisible = false; - dataGridViewCellStyle26.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle26.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.mainGridView.RowsDefaultCellStyle = dataGridViewCellStyle26; + dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.mainGridView.RowsDefaultCellStyle = dataGridViewCellStyle5; this.mainGridView.RowTemplate.Height = 40; this.mainGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.mainGridView.Size = new System.Drawing.Size(493, 254); @@ -644,8 +644,8 @@ // this.M_SendTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.M_SendTime.DataPropertyName = "SendTime"; - dataGridViewCellStyle24.Format = "yyyy/MM/dd"; - this.M_SendTime.DefaultCellStyle = dataGridViewCellStyle24; + dataGridViewCellStyle3.Format = "yyyy/MM/dd"; + this.M_SendTime.DefaultCellStyle = dataGridViewCellStyle3; this.M_SendTime.HeaderText = "发货时间"; this.M_SendTime.Name = "M_SendTime"; this.M_SendTime.ReadOnly = true; @@ -688,15 +688,15 @@ this.orderGridView.AllowUserToDeleteRows = false; this.orderGridView.AllowUserToResizeColumns = false; this.orderGridView.AllowUserToResizeRows = false; - dataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.orderGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle27; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.orderGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; this.orderGridView.BackgroundColor = System.Drawing.Color.White; this.orderGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle28.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle28.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.orderGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle28; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle7.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.orderGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; this.orderGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.orderGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.D_ID, @@ -715,9 +715,9 @@ this.orderGridView.Name = "orderGridView"; this.orderGridView.ReadOnly = true; this.orderGridView.RowHeadersVisible = false; - dataGridViewCellStyle34.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle34.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.orderGridView.RowsDefaultCellStyle = dataGridViewCellStyle34; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.orderGridView.RowsDefaultCellStyle = dataGridViewCellStyle13; this.orderGridView.RowTemplate.Height = 40; this.orderGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.orderGridView.Size = new System.Drawing.Size(789, 200); @@ -770,8 +770,8 @@ // D_SecondNumber // this.D_SecondNumber.DataPropertyName = "SecondNumber"; - dataGridViewCellStyle29.Format = "#0.######"; - this.D_SecondNumber.DefaultCellStyle = dataGridViewCellStyle29; + dataGridViewCellStyle8.Format = "#0.######"; + this.D_SecondNumber.DefaultCellStyle = dataGridViewCellStyle8; this.D_SecondNumber.HeaderText = "辅数量"; this.D_SecondNumber.Name = "D_SecondNumber"; this.D_SecondNumber.ReadOnly = true; @@ -779,8 +779,8 @@ // D_Number // this.D_Number.DataPropertyName = "Number"; - dataGridViewCellStyle30.Format = "#0.######"; - this.D_Number.DefaultCellStyle = dataGridViewCellStyle30; + dataGridViewCellStyle9.Format = "#0.######"; + this.D_Number.DefaultCellStyle = dataGridViewCellStyle9; this.D_Number.HeaderText = "报价数量"; this.D_Number.Name = "D_Number"; this.D_Number.ReadOnly = true; @@ -788,8 +788,8 @@ // D_SSecondNumber // this.D_SSecondNumber.DataPropertyName = "SSecondNumber"; - dataGridViewCellStyle31.Format = "#0.######"; - this.D_SSecondNumber.DefaultCellStyle = dataGridViewCellStyle31; + dataGridViewCellStyle10.Format = "#0.######"; + this.D_SSecondNumber.DefaultCellStyle = dataGridViewCellStyle10; this.D_SSecondNumber.HeaderText = "配货辅数量"; this.D_SSecondNumber.Name = "D_SSecondNumber"; this.D_SSecondNumber.ReadOnly = true; @@ -797,8 +797,8 @@ // D_SNumber // this.D_SNumber.DataPropertyName = "SNumber"; - dataGridViewCellStyle32.Format = "#0.######"; - this.D_SNumber.DefaultCellStyle = dataGridViewCellStyle32; + dataGridViewCellStyle11.Format = "#0.######"; + this.D_SNumber.DefaultCellStyle = dataGridViewCellStyle11; this.D_SNumber.HeaderText = "配货数量"; this.D_SNumber.Name = "D_SNumber"; this.D_SNumber.ReadOnly = true; @@ -806,8 +806,8 @@ // D_DiffNumber // this.D_DiffNumber.DataPropertyName = "DiffNumber"; - dataGridViewCellStyle33.Format = "#0.######"; - this.D_DiffNumber.DefaultCellStyle = dataGridViewCellStyle33; + dataGridViewCellStyle12.Format = "#0.######"; + this.D_DiffNumber.DefaultCellStyle = dataGridViewCellStyle12; this.D_DiffNumber.HeaderText = "差异数量"; this.D_DiffNumber.Name = "D_DiffNumber"; this.D_DiffNumber.ReadOnly = true; @@ -829,15 +829,15 @@ this.sendGridView.AllowUserToDeleteRows = false; this.sendGridView.AllowUserToResizeColumns = false; this.sendGridView.AllowUserToResizeRows = false; - dataGridViewCellStyle35.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.sendGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle35; + dataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.sendGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle14; this.sendGridView.BackgroundColor = System.Drawing.Color.White; this.sendGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle36.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle36.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle36.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.sendGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle36; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle15.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.sendGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle15; this.sendGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.sendGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.F_ID, @@ -858,9 +858,9 @@ this.sendGridView.Name = "sendGridView"; this.sendGridView.ReadOnly = true; this.sendGridView.RowHeadersVisible = false; - dataGridViewCellStyle42.Font = new System.Drawing.Font("宋体", 10F); - dataGridViewCellStyle42.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.sendGridView.RowsDefaultCellStyle = dataGridViewCellStyle42; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 10F); + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.sendGridView.RowsDefaultCellStyle = dataGridViewCellStyle21; this.sendGridView.RowTemplate.Height = 40; this.sendGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.sendGridView.Size = new System.Drawing.Size(789, 200); @@ -929,8 +929,8 @@ // F_Number // this.F_Number.DataPropertyName = "Number"; - dataGridViewCellStyle37.Format = "#0.######"; - this.F_Number.DefaultCellStyle = dataGridViewCellStyle37; + dataGridViewCellStyle16.Format = "#0.######"; + this.F_Number.DefaultCellStyle = dataGridViewCellStyle16; this.F_Number.HeaderText = "数量"; this.F_Number.Name = "F_Number"; this.F_Number.ReadOnly = true; @@ -939,8 +939,8 @@ // F_InStoreWeight // this.F_InStoreWeight.DataPropertyName = "InStoreWeight"; - dataGridViewCellStyle38.Format = "#0.######"; - this.F_InStoreWeight.DefaultCellStyle = dataGridViewCellStyle38; + dataGridViewCellStyle17.Format = "#0.######"; + this.F_InStoreWeight.DefaultCellStyle = dataGridViewCellStyle17; this.F_InStoreWeight.HeaderText = "入库重量"; this.F_InStoreWeight.Name = "F_InStoreWeight"; this.F_InStoreWeight.ReadOnly = true; @@ -949,8 +949,8 @@ // F_Weight // this.F_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle39.Format = "#0.######"; - this.F_Weight.DefaultCellStyle = dataGridViewCellStyle39; + dataGridViewCellStyle18.Format = "#0.######"; + this.F_Weight.DefaultCellStyle = dataGridViewCellStyle18; this.F_Weight.HeaderText = "重量"; this.F_Weight.Name = "F_Weight"; this.F_Weight.ReadOnly = true; @@ -959,8 +959,8 @@ // F_DiffWeight // this.F_DiffWeight.DataPropertyName = "DiffWeight"; - dataGridViewCellStyle40.Format = "#0.######"; - this.F_DiffWeight.DefaultCellStyle = dataGridViewCellStyle40; + dataGridViewCellStyle19.Format = "#0.######"; + this.F_DiffWeight.DefaultCellStyle = dataGridViewCellStyle19; this.F_DiffWeight.HeaderText = "差异"; this.F_DiffWeight.Name = "F_DiffWeight"; this.F_DiffWeight.ReadOnly = true; @@ -969,8 +969,8 @@ // F_Time // this.F_Time.DataPropertyName = "Time"; - dataGridViewCellStyle41.Format = "MM.dd HH:mm:ss"; - this.F_Time.DefaultCellStyle = dataGridViewCellStyle41; + dataGridViewCellStyle20.Format = "MM.dd HH:mm:ss"; + this.F_Time.DefaultCellStyle = dataGridViewCellStyle20; this.F_Time.HeaderText = "时间"; this.F_Time.Name = "F_Time"; this.F_Time.ReadOnly = true; @@ -1098,6 +1098,7 @@ this.MinimumSize = new System.Drawing.Size(1321, 650); this.Name = "CarcassSaleOutForm"; this.Text = "白条发货"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.panel2.ResumeLayout(false); diff --git a/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.resx b/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.resx index 8091f9d..12c520e 100644 --- a/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.resx +++ b/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.resx @@ -142,7 +142,7 @@ KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= - + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK @@ -150,7 +150,7 @@ KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= - + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK @@ -158,7 +158,7 @@ KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= - + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK @@ -166,7 +166,7 @@ KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= - + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK diff --git a/ButcherFactory.Form/CarcassTakeOut_/CarcassTakeOutForm.Designer.cs b/ButcherFactory.Form/CarcassTakeOut_/CarcassTakeOutForm.Designer.cs index 261e03e..8de2da3 100644 --- a/ButcherFactory.Form/CarcassTakeOut_/CarcassTakeOutForm.Designer.cs +++ b/ButcherFactory.Form/CarcassTakeOut_/CarcassTakeOutForm.Designer.cs @@ -32,14 +32,14 @@ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = 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 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 dataGridViewCellStyle12 = 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 dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); this.workUnitSelect = new System.Windows.Forms.ComboBox(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); @@ -57,6 +57,13 @@ this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.historyDataGrid = new WinFormControl.UDataGridView(); + this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_BeforeWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.uLabel4 = new WinFormControl.ULabel(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.numFlowPanel = new System.Windows.Forms.FlowLayoutPanel(); @@ -65,16 +72,6 @@ this.W_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.W_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.needSubmitGrid = new WinFormControl.UDataGridView(); - this.readBtn = new WinFormControl.UButton(); - this.submitBtn = new WinFormControl.UButton(); - this.uLabel3 = new WinFormControl.ULabel(); - this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_BeforeWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -82,6 +79,9 @@ this.U_BeforeWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.readBtn = new WinFormControl.UButton(); + this.submitBtn = new WinFormControl.UButton(); + this.uLabel3 = new WinFormControl.ULabel(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -370,6 +370,65 @@ this.historyDataGrid.Size = new System.Drawing.Size(766, 198); this.historyDataGrid.TabIndex = 2; // + // H_ID + // + this.H_ID.DataPropertyName = "ID"; + this.H_ID.HeaderText = "ID"; + this.H_ID.Name = "H_ID"; + this.H_ID.ReadOnly = true; + this.H_ID.Visible = false; + // + // H_RowIndex + // + this.H_RowIndex.DataPropertyName = "RowIndex"; + this.H_RowIndex.HeaderText = "序号"; + this.H_RowIndex.Name = "H_RowIndex"; + this.H_RowIndex.ReadOnly = true; + // + // H_BarCode + // + this.H_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.H_BarCode.DataPropertyName = "BarCode"; + this.H_BarCode.HeaderText = "条码"; + this.H_BarCode.Name = "H_BarCode"; + this.H_BarCode.ReadOnly = true; + // + // H_Goods_Name + // + this.H_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.H_Goods_Name.DataPropertyName = "Goods_Name"; + this.H_Goods_Name.HeaderText = "产品名称"; + this.H_Goods_Name.Name = "H_Goods_Name"; + this.H_Goods_Name.ReadOnly = true; + // + // H_BeforeWeight + // + this.H_BeforeWeight.DataPropertyName = "BeforeWeight"; + dataGridViewCellStyle3.Format = "#0.######"; + this.H_BeforeWeight.DefaultCellStyle = dataGridViewCellStyle3; + this.H_BeforeWeight.HeaderText = "入库重量"; + this.H_BeforeWeight.Name = "H_BeforeWeight"; + this.H_BeforeWeight.ReadOnly = true; + this.H_BeforeWeight.Width = 150; + // + // H_Number + // + this.H_Number.DataPropertyName = "Number"; + this.H_Number.HeaderText = "头数"; + this.H_Number.Name = "H_Number"; + this.H_Number.ReadOnly = true; + this.H_Number.Width = 65; + // + // H_Weight + // + this.H_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle4.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle4; + this.H_Weight.HeaderText = "重量"; + this.H_Weight.Name = "H_Weight"; + this.H_Weight.ReadOnly = true; + this.H_Weight.Width = 150; + // // uLabel4 // this.uLabel4.AutoSize = true; @@ -511,120 +570,6 @@ this.needSubmitGrid.Size = new System.Drawing.Size(508, 200); this.needSubmitGrid.TabIndex = 1; // - // readBtn - // - this.readBtn.AsClicked = false; - this.readBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("readBtn.BackgroundImage"))); - this.readBtn.EnableGroup = false; - this.readBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); - this.readBtn.FlatAppearance.BorderSize = 0; - this.readBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.readBtn.Font = new System.Drawing.Font("宋体", 15F); - this.readBtn.ForeColor = System.Drawing.Color.Black; - this.readBtn.Location = new System.Drawing.Point(145, 20); - this.readBtn.Name = "readBtn"; - this.readBtn.PlaySound = false; - this.readBtn.SelfControlEnable = false; - this.readBtn.Size = new System.Drawing.Size(114, 34); - this.readBtn.SoundType = WinFormControl.SoundType.Click; - this.readBtn.TabIndex = 13; - this.readBtn.Text = "读 入"; - this.readBtn.UseVisualStyleBackColor = true; - this.readBtn.WithStataHode = false; - this.readBtn.Click += new System.EventHandler(this.readBtn_Click); - // - // submitBtn - // - this.submitBtn.AsClicked = false; - this.submitBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("submitBtn.BackgroundImage"))); - this.submitBtn.EnableGroup = false; - this.submitBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); - this.submitBtn.FlatAppearance.BorderSize = 0; - this.submitBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.submitBtn.Font = new System.Drawing.Font("宋体", 15F); - this.submitBtn.ForeColor = System.Drawing.Color.Black; - this.submitBtn.Location = new System.Drawing.Point(11, 20); - this.submitBtn.Name = "submitBtn"; - this.submitBtn.PlaySound = false; - this.submitBtn.SelfControlEnable = false; - this.submitBtn.Size = new System.Drawing.Size(111, 34); - this.submitBtn.SoundType = WinFormControl.SoundType.Click; - this.submitBtn.TabIndex = 11; - this.submitBtn.Text = "提 交"; - this.submitBtn.UseVisualStyleBackColor = true; - this.submitBtn.WithStataHode = false; - this.submitBtn.Click += new System.EventHandler(this.submitBtn_Click); - // - // uLabel3 - // - this.uLabel3.AutoSize = true; - this.uLabel3.BackColor = System.Drawing.Color.White; - this.uLabel3.Font = new System.Drawing.Font("宋体", 13F); - this.uLabel3.Location = new System.Drawing.Point(8, 0); - this.uLabel3.Name = "uLabel3"; - this.uLabel3.Size = new System.Drawing.Size(80, 18); - this.uLabel3.TabIndex = 0; - this.uLabel3.Text = "领料明细"; - // - // H_ID - // - this.H_ID.DataPropertyName = "ID"; - this.H_ID.HeaderText = "ID"; - this.H_ID.Name = "H_ID"; - this.H_ID.ReadOnly = true; - this.H_ID.Visible = false; - // - // H_RowIndex - // - this.H_RowIndex.DataPropertyName = "RowIndex"; - this.H_RowIndex.HeaderText = "序号"; - this.H_RowIndex.Name = "H_RowIndex"; - this.H_RowIndex.ReadOnly = true; - // - // H_BarCode - // - this.H_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.H_BarCode.DataPropertyName = "BarCode"; - this.H_BarCode.HeaderText = "条码"; - this.H_BarCode.Name = "H_BarCode"; - this.H_BarCode.ReadOnly = true; - // - // H_Goods_Name - // - this.H_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.H_Goods_Name.DataPropertyName = "Goods_Name"; - this.H_Goods_Name.HeaderText = "产品名称"; - this.H_Goods_Name.Name = "H_Goods_Name"; - this.H_Goods_Name.ReadOnly = true; - // - // H_BeforeWeight - // - this.H_BeforeWeight.DataPropertyName = "BeforeWeight"; - dataGridViewCellStyle3.Format = "#0.######"; - this.H_BeforeWeight.DefaultCellStyle = dataGridViewCellStyle3; - this.H_BeforeWeight.HeaderText = "入库重量"; - this.H_BeforeWeight.Name = "H_BeforeWeight"; - this.H_BeforeWeight.ReadOnly = true; - this.H_BeforeWeight.Width = 150; - // - // H_Number - // - this.H_Number.DataPropertyName = "Number"; - this.H_Number.HeaderText = "头数"; - this.H_Number.Name = "H_Number"; - this.H_Number.ReadOnly = true; - this.H_Number.Width = 65; - // - // H_Weight - // - this.H_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle4.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle4; - this.H_Weight.HeaderText = "重量"; - this.H_Weight.Name = "H_Weight"; - this.H_Weight.ReadOnly = true; - this.H_Weight.Width = 150; - // // U_ID // this.U_ID.DataPropertyName = "ID"; @@ -681,6 +626,61 @@ this.U_Weight.Name = "U_Weight"; this.U_Weight.ReadOnly = true; // + // readBtn + // + this.readBtn.AsClicked = false; + this.readBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("readBtn.BackgroundImage"))); + this.readBtn.EnableGroup = false; + this.readBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.readBtn.FlatAppearance.BorderSize = 0; + this.readBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.readBtn.Font = new System.Drawing.Font("宋体", 15F); + this.readBtn.ForeColor = System.Drawing.Color.Black; + this.readBtn.Location = new System.Drawing.Point(145, 20); + this.readBtn.Name = "readBtn"; + this.readBtn.PlaySound = false; + this.readBtn.SelfControlEnable = false; + this.readBtn.Size = new System.Drawing.Size(114, 34); + this.readBtn.SoundType = WinFormControl.SoundType.Click; + this.readBtn.TabIndex = 13; + this.readBtn.Text = "读 入"; + this.readBtn.UseVisualStyleBackColor = true; + this.readBtn.WithStataHode = false; + this.readBtn.Click += new System.EventHandler(this.readBtn_Click); + // + // submitBtn + // + this.submitBtn.AsClicked = false; + this.submitBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("submitBtn.BackgroundImage"))); + this.submitBtn.EnableGroup = false; + this.submitBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.submitBtn.FlatAppearance.BorderSize = 0; + this.submitBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.submitBtn.Font = new System.Drawing.Font("宋体", 15F); + this.submitBtn.ForeColor = System.Drawing.Color.Black; + this.submitBtn.Location = new System.Drawing.Point(11, 20); + this.submitBtn.Name = "submitBtn"; + this.submitBtn.PlaySound = false; + this.submitBtn.SelfControlEnable = false; + this.submitBtn.Size = new System.Drawing.Size(111, 34); + this.submitBtn.SoundType = WinFormControl.SoundType.Click; + this.submitBtn.TabIndex = 11; + this.submitBtn.Text = "提 交"; + this.submitBtn.UseVisualStyleBackColor = true; + this.submitBtn.WithStataHode = false; + this.submitBtn.Click += new System.EventHandler(this.submitBtn_Click); + // + // uLabel3 + // + this.uLabel3.AutoSize = true; + this.uLabel3.BackColor = System.Drawing.Color.White; + this.uLabel3.Font = new System.Drawing.Font("宋体", 13F); + this.uLabel3.Location = new System.Drawing.Point(8, 0); + this.uLabel3.Name = "uLabel3"; + this.uLabel3.Size = new System.Drawing.Size(80, 18); + this.uLabel3.TabIndex = 0; + this.uLabel3.Text = "领料明细"; + // // CarcassTakeOutForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -691,6 +691,7 @@ this.MinimumSize = new System.Drawing.Size(1321, 650); this.Name = "CarcassTakeOutForm"; this.Text = "白条领用"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel1.PerformLayout(); this.splitContainer1.Panel2.ResumeLayout(false); diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs new file mode 100644 index 0000000..fa4d12d --- /dev/null +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs @@ -0,0 +1,622 @@ +namespace ButcherFactory.SegmentProductionAuto_ +{ + partial class SegmentProductionAutoForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SegmentProductionAutoForm)); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle(); + this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.uLabel3 = new WinFormControl.ULabel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.taskDataGrid = new WinFormControl.UDataGridView(); + this.T_Item = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Need = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Done = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.GoodsLabel = new WinFormControl.ULabel(); + this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + this.goodsSetBtn = new WinFormControl.UButton(); + this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.barPrintCheck = new System.Windows.Forms.CheckBox(); + this.closeBtn = new WinFormControl.UButton(); + this.uTimerLabel1 = new WinFormControl.UTimerLabel(); + this.productBatchSelect = new System.Windows.Forms.ComboBox(); + this.workUnitSelect = new System.Windows.Forms.ComboBox(); + this.uLabel1 = new WinFormControl.ULabel(); + this.uLabel2 = new WinFormControl.ULabel(); + this.netStateWatch1 = new WinFormControl.NetStateWatch(); + this.uWeightControl1 = new WinFormControl.UWeightControl(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.submitBtn = new WinFormControl.UButton(); + this.deleteBtn = new WinFormControl.UButton(); + this.rePrintBtn = new WinFormControl.UButton(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.historyDataGrid = new WinFormControl.UDataGridView(); + this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).BeginInit(); + this.SuspendLayout(); + // + // H_BarCode + // + this.H_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.H_BarCode.DataPropertyName = "BarCode"; + this.H_BarCode.HeaderText = "条码"; + this.H_BarCode.Name = "H_BarCode"; + this.H_BarCode.ReadOnly = true; + // + // H_Weight + // + this.H_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle21.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle21; + this.H_Weight.HeaderText = "重量"; + this.H_Weight.Name = "H_Weight"; + this.H_Weight.ReadOnly = true; + // + // uLabel3 + // + this.uLabel3.AutoSize = true; + this.uLabel3.BackColor = System.Drawing.Color.White; + this.uLabel3.Font = new System.Drawing.Font("宋体", 12F); + this.uLabel3.Location = new System.Drawing.Point(8, 0); + this.uLabel3.Name = "uLabel3"; + this.uLabel3.Size = new System.Drawing.Size(72, 16); + this.uLabel3.TabIndex = 1; + this.uLabel3.Text = "生产历史"; + // + // groupBox2 + // + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox2.Controls.Add(this.taskDataGrid); + this.groupBox2.Controls.Add(this.GoodsLabel); + this.groupBox2.Location = new System.Drawing.Point(9, 8); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Padding = new System.Windows.Forms.Padding(5); + this.groupBox2.Size = new System.Drawing.Size(531, 120); + this.groupBox2.TabIndex = 4; + this.groupBox2.TabStop = false; + // + // taskDataGrid + // + this.taskDataGrid.AllowUserToAddRows = false; + this.taskDataGrid.AllowUserToDeleteRows = false; + this.taskDataGrid.AllowUserToResizeColumns = false; + this.taskDataGrid.AllowUserToResizeRows = false; + dataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle22; + this.taskDataGrid.BackgroundColor = System.Drawing.Color.White; + this.taskDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle23.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle23.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle23; + this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.T_Item, + this.T_Need, + this.T_Done, + this.T_Last}); + this.taskDataGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.taskDataGrid.Location = new System.Drawing.Point(5, 19); + this.taskDataGrid.MultiSelect = false; + this.taskDataGrid.Name = "taskDataGrid"; + this.taskDataGrid.ReadOnly = true; + this.taskDataGrid.RowHeadersVisible = false; + dataGridViewCellStyle27.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle27.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle27; + this.taskDataGrid.RowTemplate.Height = 23; + this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.taskDataGrid.Size = new System.Drawing.Size(521, 96); + this.taskDataGrid.TabIndex = 2; + // + // T_Item + // + this.T_Item.DataPropertyName = "Item"; + this.T_Item.HeaderText = "项目"; + this.T_Item.Name = "T_Item"; + this.T_Item.ReadOnly = true; + // + // T_Need + // + this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.T_Need.DataPropertyName = "Need"; + dataGridViewCellStyle24.Format = "#0.######"; + this.T_Need.DefaultCellStyle = dataGridViewCellStyle24; + this.T_Need.HeaderText = "订货"; + this.T_Need.Name = "T_Need"; + this.T_Need.ReadOnly = true; + // + // T_Done + // + this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.T_Done.DataPropertyName = "Done"; + dataGridViewCellStyle25.Format = "#0.######"; + this.T_Done.DefaultCellStyle = dataGridViewCellStyle25; + this.T_Done.HeaderText = "完工"; + this.T_Done.Name = "T_Done"; + this.T_Done.ReadOnly = true; + // + // T_Last + // + this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.T_Last.DataPropertyName = "Last"; + dataGridViewCellStyle26.Format = "#0.######"; + this.T_Last.DefaultCellStyle = dataGridViewCellStyle26; + this.T_Last.HeaderText = "剩余"; + this.T_Last.Name = "T_Last"; + this.T_Last.ReadOnly = true; + // + // GoodsLabel + // + this.GoodsLabel.AutoSize = true; + this.GoodsLabel.BackColor = System.Drawing.Color.White; + this.GoodsLabel.Font = new System.Drawing.Font("宋体", 12F); + this.GoodsLabel.ForeColor = System.Drawing.Color.Red; + this.GoodsLabel.Location = new System.Drawing.Point(8, 0); + this.GoodsLabel.Name = "GoodsLabel"; + this.GoodsLabel.Size = new System.Drawing.Size(72, 16); + this.GoodsLabel.TabIndex = 1; + this.GoodsLabel.Text = "存货名称"; + // + // H_Goods_Name + // + this.H_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.H_Goods_Name.DataPropertyName = "Goods_Name"; + this.H_Goods_Name.HeaderText = "产品"; + this.H_Goods_Name.Name = "H_Goods_Name"; + this.H_Goods_Name.ReadOnly = true; + // + // flowLayoutPanel2 + // + this.flowLayoutPanel2.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.flowLayoutPanel2.AutoScroll = true; + this.flowLayoutPanel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.flowLayoutPanel2.Location = new System.Drawing.Point(-3, 75); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(670, 432); + this.flowLayoutPanel2.TabIndex = 21; + // + // goodsSetBtn + // + this.goodsSetBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.goodsSetBtn.AsClicked = false; + this.goodsSetBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("goodsSetBtn.BackgroundImage"))); + this.goodsSetBtn.EnableGroup = false; + this.goodsSetBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.goodsSetBtn.FlatAppearance.BorderSize = 0; + this.goodsSetBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.goodsSetBtn.Font = new System.Drawing.Font("宋体", 15F); + this.goodsSetBtn.ForeColor = System.Drawing.Color.Black; + this.goodsSetBtn.Location = new System.Drawing.Point(551, 2); + this.goodsSetBtn.Name = "goodsSetBtn"; + this.goodsSetBtn.PlaySound = false; + this.goodsSetBtn.SelfControlEnable = false; + this.goodsSetBtn.Size = new System.Drawing.Size(111, 62); + this.goodsSetBtn.SoundType = WinFormControl.SoundType.Click; + this.goodsSetBtn.TabIndex = 18; + this.goodsSetBtn.Text = "产品设置"; + this.goodsSetBtn.UseVisualStyleBackColor = true; + this.goodsSetBtn.WithStataHode = false; + this.goodsSetBtn.Click += new System.EventHandler(this.goodsSetBtn_Click); + // + // H_RowIndex + // + this.H_RowIndex.DataPropertyName = "RowIndex"; + this.H_RowIndex.HeaderText = "序号"; + this.H_RowIndex.Name = "H_RowIndex"; + this.H_RowIndex.ReadOnly = true; + this.H_RowIndex.Width = 80; + // + // splitContainer1 + // + this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.IsSplitterFixed = true; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.barPrintCheck); + this.splitContainer1.Panel1.Controls.Add(this.closeBtn); + this.splitContainer1.Panel1.Controls.Add(this.uTimerLabel1); + this.splitContainer1.Panel1.Controls.Add(this.productBatchSelect); + this.splitContainer1.Panel1.Controls.Add(this.workUnitSelect); + this.splitContainer1.Panel1.Controls.Add(this.uLabel1); + this.splitContainer1.Panel1.Controls.Add(this.uLabel2); + this.splitContainer1.Panel1.Controls.Add(this.netStateWatch1); + this.splitContainer1.Panel1.Controls.Add(this.uWeightControl1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); + this.splitContainer1.Size = new System.Drawing.Size(1226, 602); + this.splitContainer1.SplitterDistance = 87; + this.splitContainer1.TabIndex = 1; + // + // barPrintCheck + // + this.barPrintCheck.AutoSize = true; + this.barPrintCheck.Font = new System.Drawing.Font("宋体", 15F); + this.barPrintCheck.Location = new System.Drawing.Point(359, 50); + this.barPrintCheck.Name = "barPrintCheck"; + this.barPrintCheck.Size = new System.Drawing.Size(108, 24); + this.barPrintCheck.TabIndex = 16; + this.barPrintCheck.Text = "启用打码"; + this.barPrintCheck.UseVisualStyleBackColor = true; + // + // closeBtn + // + this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.closeBtn.AsClicked = false; + this.closeBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("closeBtn.BackgroundImage"))); + this.closeBtn.EnableGroup = false; + this.closeBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.closeBtn.FlatAppearance.BorderSize = 0; + this.closeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); + this.closeBtn.ForeColor = System.Drawing.Color.Black; + this.closeBtn.Location = new System.Drawing.Point(1106, 7); + this.closeBtn.Name = "closeBtn"; + this.closeBtn.PlaySound = false; + this.closeBtn.SelfControlEnable = false; + this.closeBtn.Size = new System.Drawing.Size(111, 34); + this.closeBtn.SoundType = WinFormControl.SoundType.Click; + this.closeBtn.TabIndex = 15; + this.closeBtn.Text = "关 闭"; + this.closeBtn.UseVisualStyleBackColor = true; + this.closeBtn.WithStataHode = false; + this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); + // + // uTimerLabel1 + // + this.uTimerLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.uTimerLabel1.AutoSize = true; + this.uTimerLabel1.BackColor = System.Drawing.Color.Transparent; + this.uTimerLabel1.Font = new System.Drawing.Font("黑体", 12F); + this.uTimerLabel1.Format = "M月d日 H:mm:ss"; + this.uTimerLabel1.Location = new System.Drawing.Point(1084, 53); + this.uTimerLabel1.Name = "uTimerLabel1"; + this.uTimerLabel1.Size = new System.Drawing.Size(136, 16); + this.uTimerLabel1.TabIndex = 14; + this.uTimerLabel1.Text = "4月21日 16:32:19"; + // + // productBatchSelect + // + this.productBatchSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.productBatchSelect.Font = new System.Drawing.Font("宋体", 15F); + this.productBatchSelect.FormattingEnabled = true; + this.productBatchSelect.Location = new System.Drawing.Point(903, 47); + this.productBatchSelect.Name = "productBatchSelect"; + this.productBatchSelect.Size = new System.Drawing.Size(170, 28); + this.productBatchSelect.TabIndex = 11; + // + // workUnitSelect + // + this.workUnitSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.workUnitSelect.Font = new System.Drawing.Font("宋体", 15F); + this.workUnitSelect.FormattingEnabled = true; + this.workUnitSelect.Location = new System.Drawing.Point(903, 11); + this.workUnitSelect.Name = "workUnitSelect"; + this.workUnitSelect.Size = new System.Drawing.Size(170, 28); + this.workUnitSelect.TabIndex = 10; + // + // uLabel1 + // + this.uLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.uLabel1.AutoSize = true; + this.uLabel1.BackColor = System.Drawing.Color.Transparent; + this.uLabel1.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel1.Location = new System.Drawing.Point(802, 14); + this.uLabel1.Name = "uLabel1"; + this.uLabel1.Size = new System.Drawing.Size(109, 20); + this.uLabel1.TabIndex = 12; + this.uLabel1.Text = "工作单元:"; + // + // uLabel2 + // + this.uLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.uLabel2.AutoSize = true; + this.uLabel2.BackColor = System.Drawing.Color.Transparent; + this.uLabel2.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel2.Location = new System.Drawing.Point(802, 50); + this.uLabel2.Name = "uLabel2"; + this.uLabel2.Size = new System.Drawing.Size(109, 20); + this.uLabel2.TabIndex = 13; + this.uLabel2.Text = "生产批次:"; + // + // netStateWatch1 + // + this.netStateWatch1.BackColor = System.Drawing.Color.Transparent; + this.netStateWatch1.Location = new System.Drawing.Point(359, 2); + this.netStateWatch1.Name = "netStateWatch1"; + this.netStateWatch1.Size = new System.Drawing.Size(90, 39); + this.netStateWatch1.TabIndex = 1; + // + // uWeightControl1 + // + this.uWeightControl1.BackColor = System.Drawing.Color.Transparent; + this.uWeightControl1.Location = new System.Drawing.Point(3, 3); + this.uWeightControl1.Name = "uWeightControl1"; + this.uWeightControl1.Size = new System.Drawing.Size(349, 78); + this.uWeightControl1.TabIndex = 0; + this.uWeightControl1.WeightFalg = null; + // + // splitContainer2 + // + this.splitContainer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.submitBtn); + this.splitContainer2.Panel1.Controls.Add(this.deleteBtn); + this.splitContainer2.Panel1.Controls.Add(this.rePrintBtn); + this.splitContainer2.Panel1.Controls.Add(this.groupBox1); + this.splitContainer2.Panel1.Controls.Add(this.groupBox2); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.flowLayoutPanel2); + this.splitContainer2.Panel2.Controls.Add(this.goodsSetBtn); + this.splitContainer2.Panel2.Controls.Add(this.flowLayoutPanel1); + this.splitContainer2.Size = new System.Drawing.Size(1224, 509); + this.splitContainer2.SplitterDistance = 552; + this.splitContainer2.TabIndex = 0; + // + // submitBtn + // + this.submitBtn.AsClicked = false; + this.submitBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("submitBtn.BackgroundImage"))); + this.submitBtn.EnableGroup = false; + this.submitBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.submitBtn.FlatAppearance.BorderSize = 0; + this.submitBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.submitBtn.Font = new System.Drawing.Font("宋体", 15F); + this.submitBtn.ForeColor = System.Drawing.Color.Black; + this.submitBtn.Location = new System.Drawing.Point(249, 134); + this.submitBtn.Name = "submitBtn"; + this.submitBtn.PlaySound = false; + this.submitBtn.SelfControlEnable = false; + this.submitBtn.Size = new System.Drawing.Size(111, 34); + this.submitBtn.SoundType = WinFormControl.SoundType.Click; + this.submitBtn.TabIndex = 23; + this.submitBtn.Text = "提交"; + this.submitBtn.UseVisualStyleBackColor = true; + this.submitBtn.WithStataHode = false; + this.submitBtn.Click += new System.EventHandler(this.submitBtn_Click); + // + // deleteBtn + // + this.deleteBtn.AsClicked = false; + this.deleteBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("deleteBtn.BackgroundImage"))); + this.deleteBtn.EnableGroup = false; + this.deleteBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.deleteBtn.FlatAppearance.BorderSize = 0; + this.deleteBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F); + this.deleteBtn.ForeColor = System.Drawing.Color.Black; + this.deleteBtn.Location = new System.Drawing.Point(129, 134); + this.deleteBtn.Name = "deleteBtn"; + this.deleteBtn.PlaySound = false; + this.deleteBtn.SelfControlEnable = false; + this.deleteBtn.Size = new System.Drawing.Size(111, 34); + this.deleteBtn.SoundType = WinFormControl.SoundType.Click; + this.deleteBtn.TabIndex = 22; + this.deleteBtn.Text = "删除"; + this.deleteBtn.UseVisualStyleBackColor = true; + this.deleteBtn.WithStataHode = false; + this.deleteBtn.Click += new System.EventHandler(this.deleteBtn_Click); + // + // rePrintBtn + // + this.rePrintBtn.AsClicked = false; + this.rePrintBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("rePrintBtn.BackgroundImage"))); + this.rePrintBtn.EnableGroup = false; + this.rePrintBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.rePrintBtn.FlatAppearance.BorderSize = 0; + this.rePrintBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.rePrintBtn.Font = new System.Drawing.Font("宋体", 15F); + this.rePrintBtn.ForeColor = System.Drawing.Color.Black; + this.rePrintBtn.Location = new System.Drawing.Point(9, 134); + this.rePrintBtn.Name = "rePrintBtn"; + this.rePrintBtn.PlaySound = false; + this.rePrintBtn.SelfControlEnable = false; + this.rePrintBtn.Size = new System.Drawing.Size(111, 34); + this.rePrintBtn.SoundType = WinFormControl.SoundType.Click; + this.rePrintBtn.TabIndex = 21; + this.rePrintBtn.Text = "补打"; + this.rePrintBtn.UseVisualStyleBackColor = true; + this.rePrintBtn.WithStataHode = 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) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.historyDataGrid); + this.groupBox1.Controls.Add(this.uLabel3); + this.groupBox1.Location = new System.Drawing.Point(10, 174); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Padding = new System.Windows.Forms.Padding(5); + this.groupBox1.Size = new System.Drawing.Size(531, 330); + this.groupBox1.TabIndex = 5; + this.groupBox1.TabStop = false; + // + // historyDataGrid + // + this.historyDataGrid.AllowUserToAddRows = false; + this.historyDataGrid.AllowUserToDeleteRows = false; + this.historyDataGrid.AllowUserToResizeColumns = false; + this.historyDataGrid.AllowUserToResizeRows = false; + dataGridViewCellStyle28.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle28; + this.historyDataGrid.BackgroundColor = System.Drawing.Color.White; + this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle29.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle29.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle29.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle29; + this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.H_ID, + this.H_RowIndex, + this.H_BarCode, + this.H_Goods_Name, + this.H_Weight}); + this.historyDataGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.historyDataGrid.Location = new System.Drawing.Point(5, 19); + this.historyDataGrid.MultiSelect = false; + this.historyDataGrid.Name = "historyDataGrid"; + this.historyDataGrid.ReadOnly = true; + this.historyDataGrid.RowHeadersVisible = false; + dataGridViewCellStyle30.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle30.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle30; + this.historyDataGrid.RowTemplate.Height = 23; + this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.historyDataGrid.Size = new System.Drawing.Size(521, 306); + this.historyDataGrid.TabIndex = 2; + // + // H_ID + // + this.H_ID.DataPropertyName = "ID"; + this.H_ID.HeaderText = "ID"; + this.H_ID.Name = "H_ID"; + this.H_ID.ReadOnly = true; + this.H_ID.Visible = false; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.flowLayoutPanel1.Location = new System.Drawing.Point(-3, -1); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(547, 70); + this.flowLayoutPanel1.TabIndex = 0; + // + // SegmentProductionAutoForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(1226, 602); + this.Controls.Add(this.splitContainer1); + this.Name = "SegmentProductionAutoForm"; + this.Text = "分割品车间称重计数"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).EndInit(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel1.PerformLayout(); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.DataGridViewTextBoxColumn H_BarCode; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; + private WinFormControl.ULabel uLabel3; + private System.Windows.Forms.GroupBox groupBox2; + private WinFormControl.UDataGridView taskDataGrid; + private System.Windows.Forms.DataGridViewTextBoxColumn T_Item; + private System.Windows.Forms.DataGridViewTextBoxColumn T_Need; + private System.Windows.Forms.DataGridViewTextBoxColumn T_Done; + private System.Windows.Forms.DataGridViewTextBoxColumn T_Last; + private WinFormControl.ULabel GoodsLabel; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Goods_Name; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; + private WinFormControl.UButton goodsSetBtn; + private System.Windows.Forms.DataGridViewTextBoxColumn H_RowIndex; + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.CheckBox barPrintCheck; + private WinFormControl.UButton closeBtn; + private WinFormControl.UTimerLabel uTimerLabel1; + private System.Windows.Forms.ComboBox productBatchSelect; + private System.Windows.Forms.ComboBox workUnitSelect; + private WinFormControl.ULabel uLabel1; + private WinFormControl.ULabel uLabel2; + private WinFormControl.NetStateWatch netStateWatch1; + private WinFormControl.UWeightControl uWeightControl1; + private System.Windows.Forms.SplitContainer splitContainer2; + private WinFormControl.UButton submitBtn; + private WinFormControl.UButton deleteBtn; + private WinFormControl.UButton rePrintBtn; + private System.Windows.Forms.GroupBox groupBox1; + private WinFormControl.UDataGridView historyDataGrid; + private System.Windows.Forms.DataGridViewTextBoxColumn H_ID; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + } +} \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs new file mode 100644 index 0000000..fcd78dc --- /dev/null +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs @@ -0,0 +1,240 @@ +using ButcherFactory.BO; +using ButcherFactory.BO.LocalBL; +using ButcherFactory.BO.Rpcs; +using ButcherFactory.BO.Utils; +using ButcherFactory.Dialogs; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using WinFormControl; +using ButcherFactory.Utils; +using NotAuto = ButcherFactory.SegmentProduction_; + +namespace ButcherFactory.SegmentProductionAuto_ +{ + public partial class SegmentProductionAutoForm : Form, IWithRoleForm + { + public List RoleName + { + get { return new List { (short)设备类别.分割生产自动化 }; } + } + + public Form Generate() + { + return this; + } + + Thread uploadData; + BindingList historyList; + BindingList unSubmitList; + Dictionary> goodsSetDic; + long? workUnitID; + long? batchID; + DateTime? batchDate; + + public SegmentProductionAutoForm() + { + InitializeComponent(); + netStateWatch1.GetConnectState = () => LoginUtil.TestConnection(500); + this.FormClosing += delegate + { + if (uploadData != null && uploadData.IsAlive) + uploadData.Abort(); + }; + workUnitSelect.SelectedIndexChanged += delegate + { + if (workUnitSelect.SelectedValue == null) + workUnitID = null; + else + workUnitID = (long)workUnitSelect.SelectedValue; + XmlUtil.SerializerObjToFile(new NotAuto.SegmentProductionFormConfig { WorkUnitID = workUnitID }); + }; + productBatchSelect.SelectedIndexChanged += delegate + { + if (productBatchSelect.SelectedValue == null) + { + batchID = null; + batchDate = null; + } + else + { + var entity = productBatchSelect.SelectedItem as ProductBatch; + batchID = entity.ID; + batchDate = entity.Date; + } + }; + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + var initTask = new Thread(LoadBind); + initTask.Start(); + + uploadData = new Thread(UpLoadLocalData); + uploadData.Start(); + } + + void LoadBind() + { + this.Invoke(new Action(() => + { + if (netStateWatch1.NetState) + { + BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.分割品); + BaseInfoSyncRpc.SyncBaseInfo(); + BaseInfoSyncRpc.SyncBaseInfo(); + } + productBatchSelect.EBindComboBox(x => x.Date == DateTime.Today, 6, "Date"); + var config = XmlUtil.DeserializeFromFile(); + workUnitSelect.EBindComboBox(x => x.ID == config.WorkUnitID); + + BindGoods(); + BindGrid(); + })); + } + + void BindGoods() + { + goodsSetDic = FormClientGoodsSetBL.GetSelectedDetail(); + flowLayoutPanel1.Controls.Clear(); + flowLayoutPanel2.Controls.Clear(); + foreach (var item in goodsSetDic) + { + var btn = new UButton() { Width = 100, Height = 62, Text = item.Key, Font = new Font("宋体", 15), Margin = new Padding(15, 3, 15, 0), WithStataHode = true, EnableGroup = true }; + btn.Click += GroupGoodsSetClick; + flowLayoutPanel1.Controls.Add(btn); + } + } + + void GroupGoodsSetClick(object sender, EventArgs e) + { + flowLayoutPanel2.Controls.Clear(); + var groupBtn = sender as UButton; + var arr = goodsSetDic[groupBtn.Text]; + foreach (var item in arr) + { + var btn = new UButton() { Width = 127, Height = 75, Text = item.Goods_Name, Tag = item, Font = new Font("宋体", 15), Margin = new Padding(20, 10, 20, 35), PlaySound = true }; + btn.Click += GoodsBtnClick; + flowLayoutPanel2.Controls.Add(btn); + } + } + + void GoodsBtnClick(object sender, EventArgs e) + { + if (batchID == null) + throw new Exception("请先选择批次"); + var btn = sender as UButton; + var detail = btn.Tag as ClientGoodsSet_Detail; + var weight = uWeightControl1.Weight; + if (weight == 0) + throw new Exception("重量不能为0"); + if (detail.StandardWeight.HasValue) + { + if (weight < (detail.StandardWeightLow ?? 0) || weight > (detail.StandardWeightUp ?? 0)) + throw new Exception(string.Format("重量必须在{0:#0.######}-{1:#0.######}之间", detail.StandardWeightLow, detail.StandardWeightUp)); + weight = detail.StandardWeight.Value; + } + var entity = SegmentProductionBL.InsertAndSetGroupID(detail.Goods_ID, weight, workUnitID, batchID.Value, batchDate.Value); + entity.Goods_Name = detail.Goods_Name; + entity.Goods_Spec = detail.Goods_Spec; + GoodsLabel.Text = entity.Goods_Name; + unSubmitList.Insert(0, entity); + historyList.Insert(0, entity); + if (historyList.Count > 100) + historyList.RemoveAt(100); + historyDataGrid.FirstDisplayedScrollingRowIndex = 0; + historyDataGrid.Refresh(); + if (barPrintCheck.Checked) + NotAuto.SegmentProductionPrint.Print(entity, batchDate); + } + + void BindGrid() + { + unSubmitList = SegmentProductionBL.GetListByState(false); + historyList = SegmentProductionBL.GetListByState(true); + foreach (var item in unSubmitList) + historyList.Insert(0, item); + + historyDataGrid.DataSource = historyList; + historyDataGrid.Refresh(); + + var first = unSubmitList.FirstOrDefault(x => x.GroupID == null && x.TrunOutID == null); + if (first != null) + GoodsLabel.Text = first.Goods_Name; + } + + void UpLoadLocalData() + { + while (true) + { + if (this.IsHandleCreated) + { + this.Invoke(new Action(() => + { + if (netStateWatch1.NetState) + SegmentProductionBL.UploadSegmentInfo(); + })); + } + Thread.Sleep(2000); + } + } + + private void closeBtn_Click(object sender, EventArgs e) + { + Close(); + } + + private void goodsSetBtn_Click(object sender, EventArgs e) + { + new ClientGoodsSetDialog().ShowDialog(); + } + + private void rePrintBtn_Click(object sender, EventArgs e) + { + if (barPrintCheck.Checked) + { + if (historyDataGrid.CurrentRow == null) + throw new Exception("请先选择要补打的记录"); + var item = historyDataGrid.CurrentRow.DataBoundItem as SegmentProduction; + NotAuto.SegmentProductionPrint.Print(item, batchDate); + } + } + + private void deleteBtn_Click(object sender, EventArgs e) + { + if (historyDataGrid.CurrentRow == null) + throw new Exception("请先选中要删除的记录"); + var id = (long)historyDataGrid.CurrentRow.Cells[0].Value; + var first = unSubmitList.FirstOrDefault(x => x.ID == id && !x.Submited); + if (first == null) + throw new Exception("已提交,无法删除"); + if (MessageBox.Show(string.Format("确认删除{0} {1}的记录?", first.RowIndex, first.Goods_Name), "删除确认", MessageBoxButtons.OKCancel) == DialogResult.OK) + { + SegmentProductionBL.Delete(id); + unSubmitList.Remove(first); + historyList.Remove(first); + historyDataGrid.Refresh(); + } + } + + private void submitBtn_Click(object sender, EventArgs e) + { + var arrs = unSubmitList.Where(x => x.GroupID.HasValue).ToList(); + if (arrs.Any()) + { + SegmentProductionBL.BatchUpdate(arrs.Select(x => x.ID), new Tuple("Submited", true)); + foreach (var item in arrs) + unSubmitList.Remove(item); + } + UMessageBox.Show("已提交"); + } + } +} diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx new file mode 100644 index 0000000..0173348 --- /dev/null +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + + + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK + goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg + KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK + goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg + KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK + goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg + KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK + goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg + KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK + goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg + KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= + + + + True + + \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.Designer.cs b/ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.Designer.cs index 7526c1b..c4f59f5 100644 --- a/ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.Designer.cs +++ b/ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.Designer.cs @@ -32,13 +32,13 @@ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = 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 dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.barPrintCheck = new System.Windows.Forms.CheckBox(); this.closeBtn = new WinFormControl.UButton(); @@ -55,6 +55,11 @@ this.rePrintBtn = new WinFormControl.UButton(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.historyDataGrid = new WinFormControl.UDataGridView(); + this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.uLabel3 = new WinFormControl.ULabel(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.taskDataGrid = new WinFormControl.UDataGridView(); @@ -70,11 +75,6 @@ this.endBtn = new WinFormControl.UButton(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.startBtn = new WinFormControl.UButton(); - this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -371,6 +371,47 @@ this.historyDataGrid.Size = new System.Drawing.Size(523, 308); this.historyDataGrid.TabIndex = 2; // + // H_ID + // + this.H_ID.DataPropertyName = "ID"; + this.H_ID.HeaderText = "ID"; + this.H_ID.Name = "H_ID"; + this.H_ID.ReadOnly = true; + this.H_ID.Visible = false; + // + // H_RowIndex + // + this.H_RowIndex.DataPropertyName = "RowIndex"; + this.H_RowIndex.HeaderText = "序号"; + this.H_RowIndex.Name = "H_RowIndex"; + this.H_RowIndex.ReadOnly = true; + this.H_RowIndex.Width = 80; + // + // H_BarCode + // + this.H_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.H_BarCode.DataPropertyName = "BarCode"; + this.H_BarCode.HeaderText = "条码"; + this.H_BarCode.Name = "H_BarCode"; + this.H_BarCode.ReadOnly = true; + // + // H_Goods_Name + // + this.H_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.H_Goods_Name.DataPropertyName = "Goods_Name"; + this.H_Goods_Name.HeaderText = "产品"; + this.H_Goods_Name.Name = "H_Goods_Name"; + this.H_Goods_Name.ReadOnly = true; + // + // H_Weight + // + this.H_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle3.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle3; + this.H_Weight.HeaderText = "重量"; + this.H_Weight.Name = "H_Weight"; + this.H_Weight.ReadOnly = true; + // // uLabel3 // this.uLabel3.AutoSize = true; @@ -614,47 +655,6 @@ this.startBtn.WithStataHode = false; this.startBtn.Click += new System.EventHandler(this.startBtn_Click); // - // H_ID - // - this.H_ID.DataPropertyName = "ID"; - this.H_ID.HeaderText = "ID"; - this.H_ID.Name = "H_ID"; - this.H_ID.ReadOnly = true; - this.H_ID.Visible = false; - // - // H_RowIndex - // - this.H_RowIndex.DataPropertyName = "RowIndex"; - this.H_RowIndex.HeaderText = "序号"; - this.H_RowIndex.Name = "H_RowIndex"; - this.H_RowIndex.ReadOnly = true; - this.H_RowIndex.Width = 80; - // - // H_BarCode - // - this.H_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.H_BarCode.DataPropertyName = "BarCode"; - this.H_BarCode.HeaderText = "条码"; - this.H_BarCode.Name = "H_BarCode"; - this.H_BarCode.ReadOnly = true; - // - // H_Goods_Name - // - this.H_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.H_Goods_Name.DataPropertyName = "Goods_Name"; - this.H_Goods_Name.HeaderText = "产品"; - this.H_Goods_Name.Name = "H_Goods_Name"; - this.H_Goods_Name.ReadOnly = true; - // - // H_Weight - // - this.H_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle3.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle3; - this.H_Weight.HeaderText = "重量"; - this.H_Weight.Name = "H_Weight"; - this.H_Weight.ReadOnly = true; - // // SegmentProductionForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -664,6 +664,7 @@ this.Controls.Add(this.splitContainer1); this.Name = "SegmentProductionForm"; this.Text = "分割品车间称重计数"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel1.PerformLayout(); this.splitContainer1.Panel2.ResumeLayout(false); diff --git a/SelfHelpClient/MainForm.Designer.cs b/SelfHelpClient/MainForm.Designer.cs index cd35800..d10760e 100644 --- a/SelfHelpClient/MainForm.Designer.cs +++ b/SelfHelpClient/MainForm.Designer.cs @@ -92,7 +92,7 @@ this.testClose.Size = new System.Drawing.Size(99, 59); this.testClose.SoundType = WinFormControl.SoundType.Click; this.testClose.TabIndex = 1; - this.testClose.Text = "测试用"; + this.testClose.Text = "关闭"; this.testClose.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); this.testClose.UseVisualStyleBackColor = false; this.testClose.Click += new System.EventHandler(this.testClose_Click); diff --git a/SelfHelpClient/ReadCardForm.cs b/SelfHelpClient/ReadCardForm.cs index 3be9270..20d1e1b 100644 --- a/SelfHelpClient/ReadCardForm.cs +++ b/SelfHelpClient/ReadCardForm.cs @@ -36,7 +36,7 @@ namespace SelfHelpClient private void FillViewEntity(string idCard) { - var list = WeightBillBL.GetViewEntity(idCard); + var list = WeightBillBL.GetViewEntity(idCard).OrderByDescending(x => x.Date).ToList(); if (list.Count == 0) { DialogForm.ShowDialog("没有待办理业务", 5);