Browse Source

配货

master
luanhui 8 years ago
parent
commit
ca6c5d3267
4 changed files with 343 additions and 162 deletions
  1. +8
    -0
      BWP.WinFormControl/UDatePicker.cs
  2. +269
    -162
      Distribution/DistributionForm.Designer.cs
  3. +39
    -0
      Distribution/DistributionForm.cs
  4. +27
    -0
      Distribution/DistributionForm.resx

+ 8
- 0
BWP.WinFormControl/UDatePicker.cs View File

@ -56,16 +56,24 @@ namespace BWP.WinFormControl
// Date = DateTime.Now;
//}
public event EventHandler AfterDateChange;
protected override void OnClick(EventArgs e)
{
var cs = new CalendarSelecter();
if (cs.ShowDialog() == true)
{
Date = cs.Result + new TimeSpan(DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second);
if (AfterDateChange != null)
{
AfterDateChange(this,e);
}
}
}
}
public enum DateTimeType
{
Date,


+ 269
- 162
Distribution/DistributionForm.Designer.cs View File

@ -36,18 +36,18 @@
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 dataGridViewCellStyle13 = 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();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.btnSendOver = new System.Windows.Forms.Button();
this.btnPrint = new System.Windows.Forms.Button();
this.btnWeightRecord = new System.Windows.Forms.Button();
this.btnRead = new System.Windows.Forms.Button();
this.dataGridViewSaleOutStore = new BWP.WinFormControl.UDataGridView();
this.panel4 = new System.Windows.Forms.Panel();
this.cbxSelectCustomer = new BWP.WinFormControl.UComboBox2();
this.cbxSelectXianLu = new BWP.WinFormControl.UComboBox2();
this.dateInput = new BWP.WinFormControl.UDatePicker();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
@ -66,9 +66,7 @@
this.btnWeightSet = new System.Windows.Forms.Button();
this.panel6 = new System.Windows.Forms.Panel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.dataGridViewFaHuo = new BWP.WinFormControl.UDataGridView();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.dataGridViewDingHuo = new BWP.WinFormControl.UDataGridView();
this.panel5 = new System.Windows.Forms.Panel();
this.linkLabel2 = new System.Windows.Forms.LinkLabel();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
@ -80,11 +78,26 @@
this.label8 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.dataGridViewSaleOutStore = new BWP.WinFormControl.UDataGridView();
this.cbxSelectCustomer = new BWP.WinFormControl.UComboBox2();
this.cbxSelectXianLu = new BWP.WinFormControl.UComboBox2();
this.dateInput = new BWP.WinFormControl.UDatePicker();
this.dataGridViewFaHuo = new BWP.WinFormControl.UDataGridView();
this.dataGridViewDingHuo = new BWP.WinFormControl.UDataGridView();
this.outstore单号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.outstore客户名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.outstore发货时间 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.outstore状态 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.outstore送货线路 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dinghuo明细号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dinghuo单号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dinghuo客户名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dinghuo产品编码 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dinghuo产品 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dinghuo需求数量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dinghuo需求重量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dinghuo已发数量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dinghuo已发重量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@ -93,16 +106,16 @@
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewSaleOutStore)).BeginInit();
this.panel4.SuspendLayout();
this.panel1.SuspendLayout();
this.panel3.SuspendLayout();
this.panel2.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewFaHuo)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewDingHuo)).BeginInit();
this.panel5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewSaleOutStore)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewFaHuo)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewDingHuo)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
@ -121,7 +134,7 @@
//
this.splitContainer1.Panel2.Controls.Add(this.flowLayoutPanel1);
this.splitContainer1.Size = new System.Drawing.Size(1347, 728);
this.splitContainer1.SplitterDistance = 1080;
this.splitContainer1.SplitterDistance = 1082;
this.splitContainer1.SplitterWidth = 2;
this.splitContainer1.TabIndex = 0;
//
@ -149,7 +162,7 @@
this.splitContainer2.Panel2.Controls.Add(this.groupBox2);
this.splitContainer2.Panel2.Controls.Add(this.groupBox1);
this.splitContainer2.Panel2.Controls.Add(this.panel5);
this.splitContainer2.Size = new System.Drawing.Size(1080, 728);
this.splitContainer2.Size = new System.Drawing.Size(1082, 728);
this.splitContainer2.SplitterDistance = 478;
this.splitContainer2.SplitterWidth = 2;
this.splitContainer2.TabIndex = 0;
@ -198,46 +211,6 @@
this.btnRead.Text = "读入";
this.btnRead.UseVisualStyleBackColor = true;
//
// dataGridViewSaleOutStore
//
this.dataGridViewSaleOutStore.AllowUserToAddRows = false;
this.dataGridViewSaleOutStore.AllowUserToDeleteRows = false;
this.dataGridViewSaleOutStore.AllowUserToResizeColumns = false;
this.dataGridViewSaleOutStore.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dataGridViewSaleOutStore.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridViewSaleOutStore.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.dataGridViewSaleOutStore.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewSaleOutStore.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dataGridViewSaleOutStore.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridViewSaleOutStore.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.outstore单号,
this.outstore客户名称,
this.outstore发货时间,
this.outstore状态,
this.outstore送货线路});
this.dataGridViewSaleOutStore.Location = new System.Drawing.Point(4, 241);
this.dataGridViewSaleOutStore.MultiSelect = false;
this.dataGridViewSaleOutStore.Name = "dataGridViewSaleOutStore";
this.dataGridViewSaleOutStore.ReadOnly = true;
this.dataGridViewSaleOutStore.RowHeadersVisible = false;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.dataGridViewSaleOutStore.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridViewSaleOutStore.RowTemplate.Height = 23;
this.dataGridViewSaleOutStore.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridViewSaleOutStore.Size = new System.Drawing.Size(469, 417);
this.dataGridViewSaleOutStore.TabIndex = 2;
//
// panel4
//
this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@ -254,44 +227,6 @@
this.panel4.Size = new System.Drawing.Size(470, 91);
this.panel4.TabIndex = 1;
//
// cbxSelectCustomer
//
this.cbxSelectCustomer.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cbxSelectCustomer.EnableTopItem = true;
this.cbxSelectCustomer.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbxSelectCustomer.FormattingEnabled = true;
this.cbxSelectCustomer.Location = new System.Drawing.Point(87, 51);
this.cbxSelectCustomer.Name = "cbxSelectCustomer";
this.cbxSelectCustomer.Range = 10;
this.cbxSelectCustomer.Size = new System.Drawing.Size(122, 27);
this.cbxSelectCustomer.TabIndex = 4;
//
// cbxSelectXianLu
//
this.cbxSelectXianLu.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cbxSelectXianLu.EnableTopItem = true;
this.cbxSelectXianLu.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbxSelectXianLu.FormattingEnabled = true;
this.cbxSelectXianLu.Location = new System.Drawing.Point(324, 12);
this.cbxSelectXianLu.Name = "cbxSelectXianLu";
this.cbxSelectXianLu.Range = 10;
this.cbxSelectXianLu.Size = new System.Drawing.Size(121, 27);
this.cbxSelectXianLu.TabIndex = 4;
//
// dateInput
//
this.dateInput.BackColor = System.Drawing.Color.White;
this.dateInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.dateInput.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0);
this.dateInput.Font = new System.Drawing.Font("宋体", 15F);
this.dateInput.Location = new System.Drawing.Point(87, 10);
this.dateInput.Name = "dateInput";
this.dateInput.Size = new System.Drawing.Size(122, 30);
this.dateInput.TabIndex = 3;
this.dateInput.Text = "2017/09/05";
this.dateInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.dateInput.Type = BWP.WinFormControl.DateTimeType.Date;
//
// label3
//
this.label3.AutoSize = true;
@ -358,13 +293,13 @@
this.rbtnDanPin.Name = "rbtnDanPin";
this.rbtnDanPin.Size = new System.Drawing.Size(74, 20);
this.rbtnDanPin.TabIndex = 38;
this.rbtnDanPin.TabStop = true;
this.rbtnDanPin.Text = "按单品";
this.rbtnDanPin.UseVisualStyleBackColor = true;
//
// rbtnXianLu
//
this.rbtnXianLu.AutoSize = true;
this.rbtnXianLu.Checked = true;
this.rbtnXianLu.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rbtnXianLu.Location = new System.Drawing.Point(210, 8);
this.rbtnXianLu.Name = "rbtnXianLu";
@ -476,7 +411,7 @@
this.panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel6.Location = new System.Drawing.Point(3, 459);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(594, 49);
this.panel6.Size = new System.Drawing.Size(598, 49);
this.panel6.TabIndex = 2;
//
// groupBox2
@ -486,42 +421,11 @@
this.groupBox2.Controls.Add(this.dataGridViewFaHuo);
this.groupBox2.Location = new System.Drawing.Point(5, 514);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(584, 213);
this.groupBox2.Size = new System.Drawing.Size(588, 213);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "发货明细";
//
// dataGridViewFaHuo
//
this.dataGridViewFaHuo.AllowUserToAddRows = false;
this.dataGridViewFaHuo.AllowUserToDeleteRows = false;
this.dataGridViewFaHuo.AllowUserToResizeColumns = false;
this.dataGridViewFaHuo.AllowUserToResizeRows = false;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dataGridViewFaHuo.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
this.dataGridViewFaHuo.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewFaHuo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
this.dataGridViewFaHuo.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridViewFaHuo.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridViewFaHuo.Location = new System.Drawing.Point(3, 17);
this.dataGridViewFaHuo.MultiSelect = false;
this.dataGridViewFaHuo.Name = "dataGridViewFaHuo";
this.dataGridViewFaHuo.RowHeadersVisible = false;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.dataGridViewFaHuo.RowsDefaultCellStyle = dataGridViewCellStyle6;
this.dataGridViewFaHuo.RowTemplate.Height = 23;
this.dataGridViewFaHuo.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridViewFaHuo.Size = new System.Drawing.Size(578, 193);
this.dataGridViewFaHuo.TabIndex = 0;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -530,43 +434,11 @@
this.groupBox1.Controls.Add(this.dataGridViewDingHuo);
this.groupBox1.Location = new System.Drawing.Point(4, 143);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(597, 310);
this.groupBox1.Size = new System.Drawing.Size(601, 310);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "订货明细";
//
// dataGridViewDingHuo
//
this.dataGridViewDingHuo.AllowUserToAddRows = false;
this.dataGridViewDingHuo.AllowUserToDeleteRows = false;
this.dataGridViewDingHuo.AllowUserToResizeColumns = false;
this.dataGridViewDingHuo.AllowUserToResizeRows = false;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dataGridViewDingHuo.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
this.dataGridViewDingHuo.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewDingHuo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
this.dataGridViewDingHuo.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridViewDingHuo.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridViewDingHuo.Location = new System.Drawing.Point(3, 17);
this.dataGridViewDingHuo.MultiSelect = false;
this.dataGridViewDingHuo.Name = "dataGridViewDingHuo";
this.dataGridViewDingHuo.ReadOnly = true;
this.dataGridViewDingHuo.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.dataGridViewDingHuo.RowsDefaultCellStyle = dataGridViewCellStyle9;
this.dataGridViewDingHuo.RowTemplate.Height = 23;
this.dataGridViewDingHuo.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridViewDingHuo.Size = new System.Drawing.Size(591, 290);
this.dataGridViewDingHuo.TabIndex = 0;
//
// panel5
//
this.panel5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@ -583,7 +455,7 @@
this.panel5.Controls.Add(this.label4);
this.panel5.Location = new System.Drawing.Point(4, 4);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(598, 132);
this.panel5.Size = new System.Drawing.Size(602, 132);
this.panel5.TabIndex = 0;
//
// linkLabel2
@ -686,9 +558,160 @@
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(263, 726);
this.flowLayoutPanel1.Size = new System.Drawing.Size(261, 726);
this.flowLayoutPanel1.TabIndex = 0;
//
// dataGridViewSaleOutStore
//
this.dataGridViewSaleOutStore.AllowUserToAddRows = false;
this.dataGridViewSaleOutStore.AllowUserToDeleteRows = false;
this.dataGridViewSaleOutStore.AllowUserToResizeColumns = false;
this.dataGridViewSaleOutStore.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dataGridViewSaleOutStore.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridViewSaleOutStore.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.dataGridViewSaleOutStore.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewSaleOutStore.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dataGridViewSaleOutStore.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridViewSaleOutStore.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.outstore单号,
this.outstore客户名称,
this.outstore发货时间,
this.outstore状态,
this.outstore送货线路});
this.dataGridViewSaleOutStore.Location = new System.Drawing.Point(4, 241);
this.dataGridViewSaleOutStore.MultiSelect = false;
this.dataGridViewSaleOutStore.Name = "dataGridViewSaleOutStore";
this.dataGridViewSaleOutStore.ReadOnly = true;
this.dataGridViewSaleOutStore.RowHeadersVisible = false;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.dataGridViewSaleOutStore.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridViewSaleOutStore.RowTemplate.Height = 23;
this.dataGridViewSaleOutStore.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridViewSaleOutStore.Size = new System.Drawing.Size(469, 417);
this.dataGridViewSaleOutStore.TabIndex = 2;
this.dataGridViewSaleOutStore.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewSaleOutStore_CellClick);
//
// cbxSelectCustomer
//
this.cbxSelectCustomer.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cbxSelectCustomer.EnableTopItem = true;
this.cbxSelectCustomer.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbxSelectCustomer.FormattingEnabled = true;
this.cbxSelectCustomer.Location = new System.Drawing.Point(87, 51);
this.cbxSelectCustomer.Name = "cbxSelectCustomer";
this.cbxSelectCustomer.Range = 10;
this.cbxSelectCustomer.Size = new System.Drawing.Size(122, 27);
this.cbxSelectCustomer.TabIndex = 4;
//
// cbxSelectXianLu
//
this.cbxSelectXianLu.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cbxSelectXianLu.EnableTopItem = true;
this.cbxSelectXianLu.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbxSelectXianLu.FormattingEnabled = true;
this.cbxSelectXianLu.Location = new System.Drawing.Point(324, 12);
this.cbxSelectXianLu.Name = "cbxSelectXianLu";
this.cbxSelectXianLu.Range = 10;
this.cbxSelectXianLu.Size = new System.Drawing.Size(121, 27);
this.cbxSelectXianLu.TabIndex = 4;
//
// dateInput
//
this.dateInput.BackColor = System.Drawing.Color.White;
this.dateInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.dateInput.Date = null;
this.dateInput.Font = new System.Drawing.Font("宋体", 15F);
this.dateInput.Location = new System.Drawing.Point(87, 10);
this.dateInput.Name = "dateInput";
this.dateInput.Size = new System.Drawing.Size(122, 30);
this.dateInput.TabIndex = 3;
this.dateInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.dateInput.Type = BWP.WinFormControl.DateTimeType.Date;
//
// dataGridViewFaHuo
//
this.dataGridViewFaHuo.AllowUserToAddRows = false;
this.dataGridViewFaHuo.AllowUserToDeleteRows = false;
this.dataGridViewFaHuo.AllowUserToResizeColumns = false;
this.dataGridViewFaHuo.AllowUserToResizeRows = false;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dataGridViewFaHuo.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
this.dataGridViewFaHuo.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewFaHuo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
this.dataGridViewFaHuo.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridViewFaHuo.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridViewFaHuo.Location = new System.Drawing.Point(3, 17);
this.dataGridViewFaHuo.MultiSelect = false;
this.dataGridViewFaHuo.Name = "dataGridViewFaHuo";
this.dataGridViewFaHuo.RowHeadersVisible = false;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.dataGridViewFaHuo.RowsDefaultCellStyle = dataGridViewCellStyle6;
this.dataGridViewFaHuo.RowTemplate.Height = 23;
this.dataGridViewFaHuo.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridViewFaHuo.Size = new System.Drawing.Size(582, 193);
this.dataGridViewFaHuo.TabIndex = 0;
//
// dataGridViewDingHuo
//
this.dataGridViewDingHuo.AllowUserToAddRows = false;
this.dataGridViewDingHuo.AllowUserToDeleteRows = false;
this.dataGridViewDingHuo.AllowUserToResizeColumns = false;
this.dataGridViewDingHuo.AllowUserToResizeRows = false;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dataGridViewDingHuo.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
this.dataGridViewDingHuo.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewDingHuo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
this.dataGridViewDingHuo.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridViewDingHuo.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dinghuo明细号,
this.dinghuo单号,
this.dinghuo客户名称,
this.dinghuo产品编码,
this.dinghuo产品,
this.dinghuo需求数量,
this.dinghuo需求重量,
this.dinghuo已发数量,
this.dinghuo已发重量});
this.dataGridViewDingHuo.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridViewDingHuo.Location = new System.Drawing.Point(3, 17);
this.dataGridViewDingHuo.MultiSelect = false;
this.dataGridViewDingHuo.Name = "dataGridViewDingHuo";
this.dataGridViewDingHuo.ReadOnly = true;
this.dataGridViewDingHuo.RowHeadersVisible = false;
dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.dataGridViewDingHuo.RowsDefaultCellStyle = dataGridViewCellStyle13;
this.dataGridViewDingHuo.RowTemplate.Height = 23;
this.dataGridViewDingHuo.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridViewDingHuo.Size = new System.Drawing.Size(595, 290);
this.dataGridViewDingHuo.TabIndex = 0;
//
// outstore单号
//
this.outstore单号.DataPropertyName = "SaleOutStore_ID";
@ -700,11 +723,12 @@
//
// outstore客户名称
//
this.outstore客户名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.outstore客户名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.outstore客户名称.DataPropertyName = "Customer_Name";
this.outstore客户名称.HeaderText = "客户名称";
this.outstore客户名称.Name = "outstore客户名称";
this.outstore客户名称.ReadOnly = true;
this.outstore客户名称.Width = 97;
//
// outstore发货时间
//
@ -727,6 +751,80 @@
this.outstore送货线路.Name = "outstore送货线路";
this.outstore送货线路.ReadOnly = true;
//
// dinghuo明细号
//
this.dinghuo明细号.DataPropertyName = "SaleOutStoreDetail_ID";
this.dinghuo明细号.HeaderText = "明细号";
this.dinghuo明细号.Name = "dinghuo明细号";
this.dinghuo明细号.ReadOnly = true;
this.dinghuo明细号.Visible = false;
//
// dinghuo单号
//
this.dinghuo单号.DataPropertyName = "SaleOutStore_ID";
this.dinghuo单号.HeaderText = "单号";
this.dinghuo单号.Name = "dinghuo单号";
this.dinghuo单号.ReadOnly = true;
this.dinghuo单号.Width = 60;
//
// dinghuo客户名称
//
this.dinghuo客户名称.DataPropertyName = "Customer_Name";
this.dinghuo客户名称.HeaderText = "客户名称";
this.dinghuo客户名称.Name = "dinghuo客户名称";
this.dinghuo客户名称.ReadOnly = true;
this.dinghuo客户名称.Visible = false;
//
// dinghuo产品编码
//
this.dinghuo产品编码.DataPropertyName = "Goods_Code";
this.dinghuo产品编码.HeaderText = "产品编码";
this.dinghuo产品编码.Name = "dinghuo产品编码";
this.dinghuo产品编码.ReadOnly = true;
//
// dinghuo产品
//
this.dinghuo产品.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.dinghuo产品.DataPropertyName = "Goods_Name";
this.dinghuo产品.HeaderText = "产品";
this.dinghuo产品.Name = "dinghuo产品";
this.dinghuo产品.ReadOnly = true;
this.dinghuo产品.Width = 60;
//
// dinghuo需求数量
//
this.dinghuo需求数量.DataPropertyName = "SecondNumber";
dataGridViewCellStyle9.Format = "#0.######";
this.dinghuo需求数量.DefaultCellStyle = dataGridViewCellStyle9;
this.dinghuo需求数量.HeaderText = "需求数量";
this.dinghuo需求数量.Name = "dinghuo需求数量";
this.dinghuo需求数量.ReadOnly = true;
//
// dinghuo需求重量
//
this.dinghuo需求重量.DataPropertyName = "UnitNum";
dataGridViewCellStyle10.Format = "#0.######";
this.dinghuo需求重量.DefaultCellStyle = dataGridViewCellStyle10;
this.dinghuo需求重量.HeaderText = "需求重量";
this.dinghuo需求重量.Name = "dinghuo需求重量";
this.dinghuo需求重量.ReadOnly = true;
//
// dinghuo已发数量
//
dataGridViewCellStyle11.Format = "#0.######";
this.dinghuo已发数量.DefaultCellStyle = dataGridViewCellStyle11;
this.dinghuo已发数量.HeaderText = "已发数量";
this.dinghuo已发数量.Name = "dinghuo已发数量";
this.dinghuo已发数量.ReadOnly = true;
//
// dinghuo已发重量
//
dataGridViewCellStyle12.Format = "#0.######";
this.dinghuo已发重量.DefaultCellStyle = dataGridViewCellStyle12;
this.dinghuo已发重量.HeaderText = "已发重量";
this.dinghuo已发重量.Name = "dinghuo已发重量";
this.dinghuo已发重量.ReadOnly = true;
//
// DistributionForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -747,7 +845,6 @@
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridViewSaleOutStore)).EndInit();
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.panel1.ResumeLayout(false);
@ -757,11 +854,12 @@
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.groupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridViewFaHuo)).EndInit();
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridViewDingHuo)).EndInit();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewSaleOutStore)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewFaHuo)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewDingHuo)).EndInit();
this.ResumeLayout(false);
}
@ -816,5 +914,14 @@
private System.Windows.Forms.DataGridViewTextBoxColumn outstore发货时间;
private System.Windows.Forms.DataGridViewTextBoxColumn outstore状态;
private System.Windows.Forms.DataGridViewTextBoxColumn outstore送货线路;
private System.Windows.Forms.DataGridViewTextBoxColumn dinghuo明细号;
private System.Windows.Forms.DataGridViewTextBoxColumn dinghuo单号;
private System.Windows.Forms.DataGridViewTextBoxColumn dinghuo客户名称;
private System.Windows.Forms.DataGridViewTextBoxColumn dinghuo产品编码;
private System.Windows.Forms.DataGridViewTextBoxColumn dinghuo产品;
private System.Windows.Forms.DataGridViewTextBoxColumn dinghuo需求数量;
private System.Windows.Forms.DataGridViewTextBoxColumn dinghuo需求重量;
private System.Windows.Forms.DataGridViewTextBoxColumn dinghuo已发数量;
private System.Windows.Forms.DataGridViewTextBoxColumn dinghuo已发重量;
}
}

+ 39
- 0
Distribution/DistributionForm.cs View File

@ -30,6 +30,8 @@ namespace Distribution
private BindingList<SaleOutStore> mSaleOutStoreList;
private BindingList<SaleOutStore> mSaleOutStoreAllList;
private BindingList<SaleOutStore> mSaleOutStoreDingHuoList;
public DistributionForm()
{
InitializeComponent();
@ -41,6 +43,13 @@ namespace Distribution
cbxSelectXianLu.Init(x => DeliverGoodsLineRpc.SyncListForDropDown(x,!mIsDeliverGoodsLineSynced));
dateInput.Date=DateTime.Today;
dateInput.Text = DateTime.Today.ToString("yyyy/MM/dd");
dateInput.AfterDateChange += delegate
{
//每次日期变了之后要设置 mIsFirstSearch = true;
mIsFirstSearch = true;
};
mBackgroundWorkerSyncBaseInfo =new BackgroundWorker();
mBackgroundWorkerSyncBaseInfo.DoWork += backgroundWorkerSyncBaseInfo_DoWork;
mBackgroundWorkerSyncBaseInfo.RunWorkerCompleted += backgroundWorkerSyncBaseInfo_RunWorkerCompleted;
@ -68,10 +77,40 @@ namespace Distribution
private void btnSearch_Click(object sender, EventArgs e)
{
btnSearch.Enabled = false;
Application.DoEvents();
mSaleOutStoreAllList = SaleOutStoreRpc.SyncList(dateInput.Date.Value, cbxSelectCustomer.Text, cbxSelectXianLu.Text, "", mIsFirstSearch);
SetSaleOutStoreList();
dataGridViewSaleOutStore.DataSource = mSaleOutStoreList;
mIsFirstSearch = false;
btnSearch.Enabled = true;
}
private void dataGridViewSaleOutStore_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
{
return;
}
var currentRow = dataGridViewSaleOutStore.CurrentRow.DataBoundItem as SaleOutStore;
//按线路配货
if (rbtnXianLu.Checked)
{
mSaleOutStoreDingHuoList=new BindingList<SaleOutStore>();
foreach (SaleOutStore outStore in mSaleOutStoreAllList.Where(x=>x.SaleOutStore_ID==currentRow.SaleOutStore_ID))
{
//已发货数量直接查本地数据库
mSaleOutStoreDingHuoList.Add(outStore);
}
dataGridViewDingHuo.DataSource = mSaleOutStoreDingHuoList;
dataGridViewDingHuo.CurrentCell = null;
}
else if (rbtnDanPin.Checked)
{//按单品配货
}
//rbtnDanPin
}
void SetSaleOutStoreList()


+ 27
- 0
Distribution/DistributionForm.resx View File

@ -132,4 +132,31 @@
<metadata name="outstore送货线路.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dinghuo明细号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dinghuo单号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dinghuo客户名称.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dinghuo产品编码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dinghuo产品.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dinghuo需求数量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dinghuo需求重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dinghuo已发数量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dinghuo已发重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

Loading…
Cancel
Save