Browse Source

【分割车间称重计数】客户端 增加“完工”按钮

master
yibo 5 years ago
parent
commit
05c873b687
6 changed files with 411 additions and 301 deletions
  1. +28
    -0
      ButcherFactory.BO/Bill/SegmentProduction.cs
  2. +45
    -2
      ButcherFactory.BO/LocalBL/SegmentProductionBL.cs
  3. +16
    -4
      ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs
  4. +165
    -146
      ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.Designer.cs
  5. +23
    -15
      ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.cs
  6. +134
    -134
      ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.resx

+ 28
- 0
ButcherFactory.BO/Bill/SegmentProduction.cs View File

@ -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;
}
}
}
}

+ 45
- 2
ButcherFactory.BO/LocalBL/SegmentProductionBL.cs View File

@ -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<SegmentProduction> GetListByState(bool submited)
{
@ -239,6 +240,48 @@ namespace ButcherFactory.BO.LocalBL
}
}
return local;
}
public static List<ProductTaskFull> GetProductTaskFull(DateTime date,long batchId, IEnumerable<Goods> goods)
{
var code = goods.Select(x => x.Code);
var json = ButcherFactoryUtil.SecondUrlCall<string>(BatchProductTaskRpc, date, code);
var list = JsonConvert.DeserializeObject<List<ProductTaskFull>>(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<Tuple<long, decimal,decimal>> BatchGetLocalProducted(long batchId, IEnumerable<long> goodsIds)
{
var list = new List<Tuple<long, decimal, decimal>>();
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,decimal,decimal>((long)reader[0],(decimal)reader[1],Convert.ToDecimal(reader[2])));
}
}
}
return list;
}
public static void UploadSegmentInfo()


+ 16
- 4
ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs View File

@ -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();
}
}
}

+ 165
- 146
ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.Designer.cs View File

@ -28,156 +28,175 @@
/// </summary>
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;
}
}

+ 23
- 15
ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.cs View File

@ -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<SegmentInStore> list;
public ViewTaskForm()
{
BindingList<ProductTaskFull> list;
DateTime mDate;
long mBatchId;
IEnumerable<Goods> mGoods;
public ViewTaskForm(DateTime date, long batchId, IEnumerable<Goods> 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<ProductTaskFull>(SegmentProductionBL.GetProductTaskFull(mDate, mBatchId, mGoods));
taskGrid.DataSource = list;
taskGrid.Refresh();
}


+ 134
- 134
ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.resx View File

@ -1,135 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="I_OrderNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="I_FinishNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="I_LastNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="I_FinishWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="I_LastWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="I_OrderNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="I_FinishNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="I_LastNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="I_FinishWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="I_LastWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

Loading…
Cancel
Save