diff --git a/ButcherFactory.BO/Bill/SegmentProduction.cs b/ButcherFactory.BO/Bill/SegmentProduction.cs index a55e5e8..e23d0b2 100644 --- a/ButcherFactory.BO/Bill/SegmentProduction.cs +++ b/ButcherFactory.BO/Bill/SegmentProduction.cs @@ -116,5 +116,33 @@ namespace ButcherFactory.BO return null; } } + } + + public class ProductTaskFull + { + public string Goods_Name { get; set; } + public string Goods_Code { get; set; } + public decimal? OrderNumber { get; set; } + public decimal FinishNumber { get; set; } + public decimal? LastNumber + { + get + { + if (OrderNumber.HasValue) + return OrderNumber.Value - FinishNumber; + return null; + } + } + public decimal? OrderWeight { get; set; } + public decimal FinishWeight { get; set; } + public decimal? LastWeight + { + get + { + if (OrderWeight.HasValue) + return OrderWeight.Value - FinishWeight; + return null; + } + } } } diff --git a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs index 3c1f5ca..e023046 100644 --- a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs @@ -15,8 +15,9 @@ namespace ButcherFactory.BO.LocalBL { public static class SegmentProductionBL { - const string RpcPath = @"/MainSystem/B3ClientService/Rpcs/SegmentProductionRpc/"; - const string ProductTaskRpc = @"/MainSystem/B3Sale/Rpcs/SaleOutStoreRpc/GetSaleOutStoreNumber"; + const string RpcPath = @"/MainSystem/B3ClientService/Rpcs/SegmentProductionRpc/"; + const string ProductTaskRpc = @"/MainSystem/B3Sale/Rpcs/SaleOutStoreRpc/GetSaleOutStoreNumber"; + const string BatchProductTaskRpc = @"/MainSystem/B3Sale/Rpcs/SaleOutStoreRpc/BatchGetSaleOutStoreNumber"; public static BindingList GetListByState(bool submited) { @@ -239,6 +240,48 @@ namespace ButcherFactory.BO.LocalBL } } return local; + } + + public static List GetProductTaskFull(DateTime date,long batchId, IEnumerable goods) + { + var code = goods.Select(x => x.Code); + var json = ButcherFactoryUtil.SecondUrlCall(BatchProductTaskRpc, date, code); + var list = JsonConvert.DeserializeObject>(json); + var local = BatchGetLocalProducted(batchId, goods.Select(x => x.ID)); + foreach (var item in list) + { + var g=goods.First(x=>x.Code==item.Goods_Code); + item.Goods_Name=g.Name; + var first = local.FirstOrDefault(x => x.Item1 == g.ID); + if (first != null) + { + item.FinishWeight = first.Item2; + item.FinishNumber = first.Item3; + } + } + return list; + } + + private static List> BatchGetLocalProducted(long batchId, IEnumerable goodsIds) + { + var list = new List>(); + var query = new DQueryDom(new JoinAlias(typeof(SegmentProduction))); + query.Columns.Add(DQSelectColumn.Field("Goods_ID")); + query.Columns.Add(DQSelectColumn.Sum("Weight")); + query.Columns.Add(DQSelectColumn.Count()); + query.GroupBy.Expressions.Add(DQExpression.Field("Goods_ID")); + query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Delete", false), DQCondition.EQ("ProductBatch_ID", batchId), DQCondition.InList(DQExpression.Field("Goods_ID"), goodsIds.Select(x => DQExpression.Value(x)).ToArray()))); + using (var session = DmoSession.New()) + { + using (var reader = session.ExecuteReader(query)) + { + while (reader.Read()) + { + list.Add(new Tuple((long)reader[0],(decimal)reader[1],Convert.ToDecimal(reader[2]))); + } + } + } + return list; } public static void UploadSegmentInfo() diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs index f86ad5f..54fe261 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs @@ -167,12 +167,14 @@ namespace ButcherFactory.SegmentProductionAuto_ } } - Color goodsColor = Color.FromArgb(250, 120, 24); + Color goodsColor = Color.FromArgb(250, 120, 24); + string groupKey = string.Empty; void GroupGoodsSetClick(object sender, EventArgs e) { flowLayoutPanel2.Controls.Clear(); - var groupBtn = sender as ColorButton; - var arr = goodsSetDic[groupBtn.Text]; + var groupBtn = sender as ColorButton; + groupKey = groupBtn.Text; + var arr = goodsSetDic[groupKey]; foreach (var item in arr) { var btn = new ColorButton() { Width = 140, Height = 90, Text = item.Goods_Name, Tag = item, Font = new Font("黑体", 15, FontStyle.Bold), BackColor = Color.Black, Margin = new Padding(20, 10, 20, 35), PlaySound = true, ForeColor = Color.White }; @@ -391,7 +393,17 @@ namespace ButcherFactory.SegmentProductionAuto_ private void ViewTaskBtn_Click(object sender, EventArgs e) { - + if (string.IsNullOrEmpty(groupKey)) + throw new Exception("请选择存货分组"); + if (batchID == null) + throw new Exception("请先选择批次"); + if (goodsSetDic == null) + throw new Exception("请选择存货分组"); + var arr = goodsSetDic[groupKey]; + if(arr.Count==0) + throw new Exception("分组中没有任何存货"); + var goods = arr.Select(x => new Goods { Code = x.Goods_Code, Name = x.Goods_Name, ID = x.Goods_ID }); + new ViewTaskForm(batchDate ?? DateTime.Today, batchID.Value, goods).ShowDialog(); } } } diff --git a/ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.Designer.cs b/ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.Designer.cs index 7974a7e..eac34c5 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.Designer.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.Designer.cs @@ -28,156 +28,175 @@ /// private void InitializeComponent() { - 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(); - this.closeBtn = new WinFormControl.NButton(); - this.taskGrid = new WinFormControl.UDataGridView(); - this.I_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.I_OrderNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.I_FinishNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.I_LastNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.I_OrderWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.I_FinishWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.I_LastWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - ((System.ComponentModel.ISupportInitialize)(this.taskGrid)).BeginInit(); - this.SuspendLayout(); - // - // 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)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); - this.closeBtn.ClickColor = System.Drawing.Color.YellowGreen; - this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); - this.closeBtn.ForeColor = System.Drawing.Color.White; - this.closeBtn.Location = new System.Drawing.Point(780, 7); - this.closeBtn.Name = "closeBtn"; - this.closeBtn.PlaySound = false; - this.closeBtn.Size = new System.Drawing.Size(90, 45); - this.closeBtn.SoundType = WinFormControl.SoundType.Click; - this.closeBtn.TabIndex = 13; - this.closeBtn.Text = "关闭"; - this.closeBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); - this.closeBtn.UseVisualStyleBackColor = false; - this.closeBtn.Click += new System.EventHandler(this.CloseBtn_Click); - // - // taskGrid - // - this.taskGrid.AllowUserToAddRows = false; - this.taskGrid.AllowUserToDeleteRows = false; - this.taskGrid.AllowUserToResizeColumns = false; - this.taskGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.taskGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.taskGrid.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.taskGrid.BackgroundColor = System.Drawing.Color.White; - this.taskGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.taskGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; - this.taskGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.taskGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.I_Goods_Name, - this.I_OrderNumber, - this.I_FinishNumber, - this.I_LastNumber, - this.I_OrderWeight, - this.I_FinishWeight, - this.I_LastWeight}); - this.taskGrid.Location = new System.Drawing.Point(12, 58); - this.taskGrid.MultiSelect = false; - this.taskGrid.Name = "taskGrid"; - this.taskGrid.ReadOnly = true; - this.taskGrid.RowHeadersVisible = false; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.taskGrid.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.taskGrid.RowTemplate.Height = 23; - this.taskGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.taskGrid.Size = new System.Drawing.Size(858, 539); - this.taskGrid.TabIndex = 12; - // - // I_Goods_Name - // - this.I_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.I_Goods_Name.DataPropertyName = "Goods_Name"; - this.I_Goods_Name.FillWeight = 150F; - this.I_Goods_Name.HeaderText = "产品名称"; - this.I_Goods_Name.Name = "I_Goods_Name"; - this.I_Goods_Name.ReadOnly = true; - // - // I_OrderNumber - // - this.I_OrderNumber.DataPropertyName = "OrderNumber"; - this.I_OrderNumber.HeaderText = "订货数量"; - this.I_OrderNumber.Name = "I_OrderNumber"; - this.I_OrderNumber.ReadOnly = true; - // - // I_FinishNumber - // - this.I_FinishNumber.DataPropertyName = "FinshNumber"; - this.I_FinishNumber.HeaderText = "完工数量"; - this.I_FinishNumber.Name = "I_FinishNumber"; - this.I_FinishNumber.ReadOnly = true; - // - // I_LastNumber - // - this.I_LastNumber.DataPropertyName = "LastNumber"; - this.I_LastNumber.HeaderText = "剩余数量"; - this.I_LastNumber.Name = "I_LastNumber"; - this.I_LastNumber.ReadOnly = true; - // - // I_OrderWeight - // - this.I_OrderWeight.DataPropertyName = "OrderWeight"; - dataGridViewCellStyle3.Format = "#0.######"; - this.I_OrderWeight.DefaultCellStyle = dataGridViewCellStyle3; - this.I_OrderWeight.HeaderText = "订货重量"; - this.I_OrderWeight.Name = "I_OrderWeight"; - this.I_OrderWeight.ReadOnly = true; - // - // I_FinishWeight - // - this.I_FinishWeight.HeaderText = "完工重量"; - this.I_FinishWeight.Name = "I_FinishWeight"; - this.I_FinishWeight.ReadOnly = true; - // - // I_LastWeight - // - this.I_LastWeight.DataPropertyName = "LastWeight"; - this.I_LastWeight.HeaderText = "剩余重量"; - this.I_LastWeight.Name = "I_LastWeight"; - this.I_LastWeight.ReadOnly = true; - // - // ViewTaskForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(882, 604); - this.Controls.Add(this.closeBtn); - this.Controls.Add(this.taskGrid); - this.Name = "ViewTaskForm"; - this.Text = "任务完工情况"; - ((System.ComponentModel.ISupportInitialize)(this.taskGrid)).EndInit(); - this.ResumeLayout(false); - + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = 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(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = 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 dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + this.closeBtn = new WinFormControl.NButton(); + this.taskGrid = new WinFormControl.UDataGridView(); + this.I_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.I_OrderNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.I_FinishNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.I_LastNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.I_OrderWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.I_FinishWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.I_LastWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.taskGrid)).BeginInit(); + this.SuspendLayout(); + // + // 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)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.closeBtn.ClickColor = System.Drawing.Color.YellowGreen; + this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); + this.closeBtn.ForeColor = System.Drawing.Color.White; + this.closeBtn.Location = new System.Drawing.Point(1560, 14); + this.closeBtn.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6); + this.closeBtn.Name = "closeBtn"; + this.closeBtn.PlaySound = false; + this.closeBtn.Size = new System.Drawing.Size(180, 90); + this.closeBtn.SoundType = WinFormControl.SoundType.Click; + this.closeBtn.TabIndex = 13; + this.closeBtn.Text = "关闭"; + this.closeBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.closeBtn.UseVisualStyleBackColor = false; + this.closeBtn.Click += new System.EventHandler(this.CloseBtn_Click); + // + // taskGrid + // + this.taskGrid.AllowUserToAddRows = false; + this.taskGrid.AllowUserToDeleteRows = false; + this.taskGrid.AllowUserToResizeColumns = false; + this.taskGrid.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.taskGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.taskGrid.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.taskGrid.BackgroundColor = System.Drawing.Color.White; + this.taskGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.taskGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.taskGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.taskGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.I_Goods_Name, + this.I_OrderNumber, + this.I_FinishNumber, + this.I_LastNumber, + this.I_OrderWeight, + this.I_FinishWeight, + this.I_LastWeight}); + this.taskGrid.Location = new System.Drawing.Point(24, 116); + this.taskGrid.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6); + this.taskGrid.MultiSelect = false; + this.taskGrid.Name = "taskGrid"; + this.taskGrid.ReadOnly = true; + this.taskGrid.RowHeadersVisible = false; + dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.taskGrid.RowsDefaultCellStyle = dataGridViewCellStyle9; + this.taskGrid.RowTemplate.Height = 23; + this.taskGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.taskGrid.Size = new System.Drawing.Size(1716, 1078); + this.taskGrid.TabIndex = 12; + // + // I_Goods_Name + // + this.I_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.I_Goods_Name.DataPropertyName = "Goods_Name"; + this.I_Goods_Name.FillWeight = 150F; + this.I_Goods_Name.HeaderText = "产品名称"; + this.I_Goods_Name.Name = "I_Goods_Name"; + this.I_Goods_Name.ReadOnly = true; + // + // I_OrderNumber + // + this.I_OrderNumber.DataPropertyName = "OrderNumber"; + dataGridViewCellStyle3.Format = "#0.######"; + this.I_OrderNumber.DefaultCellStyle = dataGridViewCellStyle3; + this.I_OrderNumber.HeaderText = "订货数量"; + this.I_OrderNumber.Name = "I_OrderNumber"; + this.I_OrderNumber.ReadOnly = true; + // + // I_FinishNumber + // + this.I_FinishNumber.DataPropertyName = "FinishNumber"; + dataGridViewCellStyle4.Format = "#0.######"; + this.I_FinishNumber.DefaultCellStyle = dataGridViewCellStyle4; + this.I_FinishNumber.HeaderText = "完工数量"; + this.I_FinishNumber.Name = "I_FinishNumber"; + this.I_FinishNumber.ReadOnly = true; + // + // I_LastNumber + // + this.I_LastNumber.DataPropertyName = "LastNumber"; + dataGridViewCellStyle5.Format = "#0.######"; + this.I_LastNumber.DefaultCellStyle = dataGridViewCellStyle5; + this.I_LastNumber.HeaderText = "剩余数量"; + this.I_LastNumber.Name = "I_LastNumber"; + this.I_LastNumber.ReadOnly = true; + // + // I_OrderWeight + // + this.I_OrderWeight.DataPropertyName = "OrderWeight"; + dataGridViewCellStyle6.Format = "#0.######"; + this.I_OrderWeight.DefaultCellStyle = dataGridViewCellStyle6; + this.I_OrderWeight.HeaderText = "订货重量"; + this.I_OrderWeight.Name = "I_OrderWeight"; + this.I_OrderWeight.ReadOnly = true; + // + // I_FinishWeight + // + this.I_FinishWeight.DataPropertyName = "FinishWeight"; + dataGridViewCellStyle7.Format = "#0.######"; + this.I_FinishWeight.DefaultCellStyle = dataGridViewCellStyle7; + this.I_FinishWeight.HeaderText = "完工重量"; + this.I_FinishWeight.Name = "I_FinishWeight"; + this.I_FinishWeight.ReadOnly = true; + // + // I_LastWeight + // + this.I_LastWeight.DataPropertyName = "LastWeight"; + dataGridViewCellStyle8.Format = "#0.######"; + this.I_LastWeight.DefaultCellStyle = dataGridViewCellStyle8; + this.I_LastWeight.HeaderText = "剩余重量"; + this.I_LastWeight.Name = "I_LastWeight"; + this.I_LastWeight.ReadOnly = true; + // + // ViewTaskForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1764, 1208); + this.Controls.Add(this.closeBtn); + this.Controls.Add(this.taskGrid); + this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6); + this.Name = "ViewTaskForm"; + this.Text = "任务完工情况"; + ((System.ComponentModel.ISupportInitialize)(this.taskGrid)).EndInit(); + this.ResumeLayout(false); + } #endregion - private WinFormControl.NButton closeBtn; - private WinFormControl.UDataGridView taskGrid; - private System.Windows.Forms.DataGridViewTextBoxColumn I_Goods_Name; - private System.Windows.Forms.DataGridViewTextBoxColumn I_OrderNumber; - private System.Windows.Forms.DataGridViewTextBoxColumn I_FinishNumber; - private System.Windows.Forms.DataGridViewTextBoxColumn I_LastNumber; - private System.Windows.Forms.DataGridViewTextBoxColumn I_OrderWeight; - private System.Windows.Forms.DataGridViewTextBoxColumn I_FinishWeight; + private WinFormControl.NButton closeBtn; + private WinFormControl.UDataGridView taskGrid; + private System.Windows.Forms.DataGridViewTextBoxColumn I_Goods_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn I_OrderNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn I_FinishNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn I_LastNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn I_OrderWeight; + private System.Windows.Forms.DataGridViewTextBoxColumn I_FinishWeight; private System.Windows.Forms.DataGridViewTextBoxColumn I_LastWeight; } } \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.cs b/ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.cs index fd5dd0e..582588d 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.cs @@ -1,28 +1,36 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using ButcherFactory.BO; +using ButcherFactory.BO.LocalBL; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; using System.Windows.Forms; namespace ButcherFactory.SegmentProductionAuto_ { public partial class ViewTaskForm : Form - { - BindingList list; - public ViewTaskForm() + { + BindingList list; + DateTime mDate; + long mBatchId; + IEnumerable mGoods; + public ViewTaskForm(DateTime date, long batchId, IEnumerable goods) { - InitializeComponent(); + InitializeComponent(); + mDate = date; + mBatchId = batchId; + mGoods = goods; } protected override void OnLoad(EventArgs e) { - base.OnLoad(e); - - list = SegmentInStoreBL.GetInStoreSummary(); + base.OnLoad(e); + + list = new BindingList(SegmentProductionBL.GetProductTaskFull(mDate, mBatchId, mGoods)); taskGrid.DataSource = list; taskGrid.Refresh(); } diff --git a/ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.resx b/ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.resx index d702043..2362a4a 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.resx +++ b/ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.resx @@ -1,135 +1,135 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - True - - - True - - - True - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + + True + \ No newline at end of file