diff --git a/BO/BO.csproj b/BO/BO.csproj index 8bd7cf5..217555b 100644 --- a/BO/BO.csproj +++ b/BO/BO.csproj @@ -58,6 +58,7 @@ + diff --git a/BO/BO/Bill/OrderDetail/HurryRecord.cs b/BO/BO/Bill/OrderDetail/HurryRecord.cs new file mode 100644 index 0000000..11fcd92 --- /dev/null +++ b/BO/BO/Bill/OrderDetail/HurryRecord.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.BO.Bill +{ + public class HurryRecord + { + public long ID { get; set; } + + public long FromOrderDetail_ID { get; set; } + + public long? B3WeighBill_ID { get; set; } + + public int? Order { get; set; } + + public int HurryNumber { get; set; } + + public DateTime Time { get; set; } + } +} diff --git a/BO/BO/Bill/OrderDetail/OrderDetail.cs b/BO/BO/Bill/OrderDetail/OrderDetail.cs index 11a7187..3d4a1c5 100644 --- a/BO/BO/Bill/OrderDetail/OrderDetail.cs +++ b/BO/BO/Bill/OrderDetail/OrderDetail.cs @@ -20,10 +20,14 @@ namespace BO.BO.Bill public long? B3WeighBill_ID { get; set; } + public string Supplier_Name { get; set; } + public int Order { get; set; } public int PlanNumber { get; set; } + public int HurryNumber { get; set; } + public string LiveColonyHouse_Name { get; set; } public bool IsHurryButcher { get; set; } diff --git a/BO/Utils/BillRpc/OrderDetailRpc.cs b/BO/Utils/BillRpc/OrderDetailRpc.cs index a8fdb04..514a914 100644 --- a/BO/Utils/BillRpc/OrderDetailRpc.cs +++ b/BO/Utils/BillRpc/OrderDetailRpc.cs @@ -39,10 +39,10 @@ namespace BO.Utils.BillRpc return RpcFacade.Call(method, id); } - public static List GetOrderDetail(DateTime date, int? minOrder = null) + public static List GetOrderDetail(DateTime date,bool onlyNormal) { const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetOrderDetail"; - var result = RpcFacade.Call(method, date, minOrder); + var result = RpcFacade.Call(method, date, onlyNormal); result = result.ESerializeDateTime(); return serializer.Deserialize>(result); } @@ -61,12 +61,6 @@ namespace BO.Utils.BillRpc RpcFacade.Call(method, id, number); } - public static void UpdateHurryFlag(long id, bool flag) - { - const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/UpdateHurryFlag"; - RpcFacade.Call(method, id, flag); - } - public static void Delete(long id) { const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/Delete"; @@ -78,5 +72,29 @@ namespace BO.Utils.BillRpc const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/ChangeShowType"; RpcFacade.Call(method, weightBillID, show); } + + public static List GetHurryRecordList(long orderID) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetHurryRecords"; + var result = RpcFacade.Call(method, orderID); + result = result.ESerializeDateTime(); + return serializer.Deserialize>(result); + } + + public static void DeleteHurryRecord(long id) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/DeleteHurryRecord"; + RpcFacade.Call(method, id); + } + + public static int InsertHurryRecord(OrderDetail entity) + { + var detail = new HurryRecord(); + detail.HurryNumber = entity.HurryNumber; + detail.Time = DateTime.Now; + detail.FromOrderDetail_ID = entity.ID; + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/InsertHurryRecord"; + return RpcFacade.Call(method, serializer.Serialize(detail)); + } } } diff --git a/ButcherOrder/ButcherOrderForm.cs b/ButcherOrder/ButcherOrderForm.cs index f467b86..44f3645 100644 --- a/ButcherOrder/ButcherOrderForm.cs +++ b/ButcherOrder/ButcherOrderForm.cs @@ -201,6 +201,7 @@ namespace ButcherOrder var view = new ViewDetail(entity); if (view.ShowDialog() == DialogResult.OK) { + entity.HotFadeNumber = view.HotFadeNumber; secondOrderGridView.Refresh(); } } diff --git a/ButcherOrder/ViewDetail.cs b/ButcherOrder/ViewDetail.cs index 97bd9ed..7ad2fa2 100644 --- a/ButcherOrder/ViewDetail.cs +++ b/ButcherOrder/ViewDetail.cs @@ -56,5 +56,7 @@ namespace ButcherOrder detailGridView1.DataSource = details; detailGridView1.Refresh(); } + + public int HotFadeNumber { get { return secondOrder.HotFadeNumber; } } } } diff --git a/ButcherWeight/RecordView.Designer.cs b/ButcherWeight/RecordView.Designer.cs index f428bb2..aee2163 100644 --- a/ButcherWeight/RecordView.Designer.cs +++ b/ButcherWeight/RecordView.Designer.cs @@ -33,13 +33,13 @@ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); this.detailGridView = new BWP.WinFormControl.UDataGridView(); - this.closeBtn = new System.Windows.Forms.Button(); this.D_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_WeightBill_Detail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_Tpye = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_Delete = new System.Windows.Forms.DataGridViewButtonColumn(); + this.closeBtn = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.detailGridView)).BeginInit(); this.SuspendLayout(); // @@ -82,17 +82,6 @@ this.detailGridView.TabIndex = 0; this.detailGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.detailGridView_CellContentClick); // - // closeBtn - // - this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); - this.closeBtn.Location = new System.Drawing.Point(212, 372); - this.closeBtn.Name = "closeBtn"; - this.closeBtn.Size = new System.Drawing.Size(146, 52); - this.closeBtn.TabIndex = 1; - this.closeBtn.Text = "关闭"; - this.closeBtn.UseVisualStyleBackColor = true; - this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); - // // D_ID // this.D_ID.DataPropertyName = "ID"; @@ -142,6 +131,17 @@ this.D_Delete.UseColumnTextForButtonValue = true; this.D_Delete.Width = 140; // + // closeBtn + // + this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); + this.closeBtn.Location = new System.Drawing.Point(212, 372); + this.closeBtn.Name = "closeBtn"; + this.closeBtn.Size = new System.Drawing.Size(146, 52); + this.closeBtn.TabIndex = 1; + this.closeBtn.Text = "关闭"; + this.closeBtn.UseVisualStyleBackColor = true; + this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); + // // RecordView // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -151,7 +151,6 @@ this.Controls.Add(this.closeBtn); this.Controls.Add(this.detailGridView); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.MaximizeBox = false; this.Name = "RecordView"; this.Text = "过磅明细"; ((System.ComponentModel.ISupportInitialize)(this.detailGridView)).EndInit(); diff --git a/OrderConfirm/OrderConfirmForm.cs b/OrderConfirm/OrderConfirmForm.cs index a9db9ac..efa4cf1 100644 --- a/OrderConfirm/OrderConfirmForm.cs +++ b/OrderConfirm/OrderConfirmForm.cs @@ -78,7 +78,7 @@ namespace OrderConfirm ConfirmOrder last; private void BindOrderGrid() { - uDataGridView1.DataSource = list.OrderBy(x => x.Order).OrderBy(x => x.Confirmed).ToList(); + uDataGridView1.DataSource = list.OrderByDescending(x => x.Order).OrderBy(x => x.Confirmed).ToList(); if (last == null && uDataGridView1.CurrentRow != null) { last = uDataGridView1.CurrentRow.DataBoundItem as ConfirmOrder; diff --git a/QualityAndOrder/HurryRecordView.Designer.cs b/QualityAndOrder/HurryRecordView.Designer.cs new file mode 100644 index 0000000..22a7a65 --- /dev/null +++ b/QualityAndOrder/HurryRecordView.Designer.cs @@ -0,0 +1,206 @@ +namespace QualityAndOrder +{ + partial class HurryRecordView + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = 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(); + this.closeBtn = new System.Windows.Forms.Button(); + this.recordGridView = new BWP.WinFormControl.UDataGridView(); + this.R_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_FromOrderDetail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_B3WeighBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_HurryNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_Delete = new System.Windows.Forms.DataGridViewButtonColumn(); + this.R_Print = new System.Windows.Forms.DataGridViewButtonColumn(); + ((System.ComponentModel.ISupportInitialize)(this.recordGridView)).BeginInit(); + this.SuspendLayout(); + // + // closeBtn + // + this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); + this.closeBtn.Location = new System.Drawing.Point(282, 361); + this.closeBtn.Name = "closeBtn"; + this.closeBtn.Size = new System.Drawing.Size(146, 52); + this.closeBtn.TabIndex = 3; + this.closeBtn.Text = "关闭"; + this.closeBtn.UseVisualStyleBackColor = true; + this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); + // + // recordGridView + // + this.recordGridView.AllowUserToAddRows = false; + this.recordGridView.AllowUserToDeleteRows = false; + this.recordGridView.AllowUserToResizeColumns = false; + this.recordGridView.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.recordGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.recordGridView.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.recordGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.recordGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.recordGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.R_ID, + this.R_FromOrderDetail_ID, + this.R_B3WeighBill_ID, + this.R_Order, + this.R_HurryNumber, + this.R_Time, + this.R_Delete, + this.R_Print}); + this.recordGridView.Location = new System.Drawing.Point(31, 19); + this.recordGridView.MultiSelect = false; + this.recordGridView.Name = "recordGridView"; + this.recordGridView.ReadOnly = true; + this.recordGridView.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.recordGridView.RowsDefaultCellStyle = dataGridViewCellStyle6; + this.recordGridView.RowTemplate.Height = 60; + this.recordGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.recordGridView.Size = new System.Drawing.Size(635, 323); + this.recordGridView.TabIndex = 2; + this.recordGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.recordGridView_CellClick); + // + // R_ID + // + this.R_ID.DataPropertyName = "ID"; + this.R_ID.HeaderText = "ID"; + this.R_ID.Name = "R_ID"; + this.R_ID.ReadOnly = true; + this.R_ID.Visible = false; + // + // R_FromOrderDetail_ID + // + this.R_FromOrderDetail_ID.DataPropertyName = "FromOrderDetail_ID"; + this.R_FromOrderDetail_ID.HeaderText = "FromOrderDetail_ID"; + this.R_FromOrderDetail_ID.Name = "R_FromOrderDetail_ID"; + this.R_FromOrderDetail_ID.ReadOnly = true; + this.R_FromOrderDetail_ID.Visible = false; + // + // R_B3WeighBill_ID + // + this.R_B3WeighBill_ID.DataPropertyName = "B3WeighBill_ID"; + this.R_B3WeighBill_ID.HeaderText = "磅单号"; + this.R_B3WeighBill_ID.Name = "R_B3WeighBill_ID"; + this.R_B3WeighBill_ID.ReadOnly = true; + this.R_B3WeighBill_ID.Width = 90; + // + // R_Order + // + this.R_Order.DataPropertyName = "Order"; + this.R_Order.HeaderText = "序号"; + this.R_Order.Name = "R_Order"; + this.R_Order.ReadOnly = true; + this.R_Order.Width = 80; + // + // R_HurryNumber + // + this.R_HurryNumber.DataPropertyName = "HurryNumber"; + dataGridViewCellStyle3.Format = "#0.######"; + this.R_HurryNumber.DefaultCellStyle = dataGridViewCellStyle3; + this.R_HurryNumber.HeaderText = "头数"; + this.R_HurryNumber.Name = "R_HurryNumber"; + this.R_HurryNumber.ReadOnly = true; + this.R_HurryNumber.Width = 80; + // + // R_Time + // + this.R_Time.DataPropertyName = "Time"; + this.R_Time.HeaderText = "时间"; + this.R_Time.Name = "R_Time"; + this.R_Time.ReadOnly = true; + this.R_Time.Width = 140; + // + // R_Delete + // + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10); + this.R_Delete.DefaultCellStyle = dataGridViewCellStyle4; + this.R_Delete.HeaderText = "删除"; + this.R_Delete.Name = "R_Delete"; + this.R_Delete.ReadOnly = true; + this.R_Delete.Text = "删除"; + this.R_Delete.UseColumnTextForButtonValue = true; + this.R_Delete.Width = 120; + // + // R_Print + // + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10); + this.R_Print.DefaultCellStyle = dataGridViewCellStyle5; + this.R_Print.HeaderText = "打印"; + this.R_Print.Name = "R_Print"; + this.R_Print.ReadOnly = true; + this.R_Print.Text = "打印"; + this.R_Print.UseColumnTextForButtonValue = true; + this.R_Print.Width = 120; + // + // HurryRecordView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(696, 436); + this.ControlBox = false; + this.Controls.Add(this.closeBtn); + this.Controls.Add(this.recordGridView); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "HurryRecordView"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "急宰记录"; + ((System.ComponentModel.ISupportInitialize)(this.recordGridView)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button closeBtn; + private BWP.WinFormControl.UDataGridView recordGridView; + private System.Windows.Forms.DataGridViewTextBoxColumn R_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn R_FromOrderDetail_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn R_B3WeighBill_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn R_Order; + private System.Windows.Forms.DataGridViewTextBoxColumn R_HurryNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn R_Time; + private System.Windows.Forms.DataGridViewButtonColumn R_Delete; + private System.Windows.Forms.DataGridViewButtonColumn R_Print; + } +} \ No newline at end of file diff --git a/QualityAndOrder/HurryRecordView.cs b/QualityAndOrder/HurryRecordView.cs new file mode 100644 index 0000000..344c58a --- /dev/null +++ b/QualityAndOrder/HurryRecordView.cs @@ -0,0 +1,60 @@ +using BO.BO.Bill; +using BO.Utils.BillRpc; +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 QualityAndOrder +{ + public partial class HurryRecordView : Form + { + bool changed = false; + List mRecords; + public HurryRecordView(long fromOrderID) + { + InitializeComponent(); + recordGridView.AutoGenerateColumns = false; + mRecords = OrderDetailRpc.GetHurryRecordList(fromOrderID).OrderBy(x => x.ID).ToList(); + recordGridView.DataSource = null; + recordGridView.DataSource = mRecords; + recordGridView.Refresh(); + } + + private void closeBtn_Click(object sender, EventArgs e) + { + if (changed) + DialogResult = DialogResult.OK; + this.Close(); + } + + private void recordGridView_CellClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex == -1) + return; + if (e.ColumnIndex != recordGridView.ColumnCount - 1) + return; + var entity = recordGridView.CurrentRow.DataBoundItem as HurryRecord; + OrderDetailRpc.DeleteHurryRecord(entity.ID); + _result += entity.HurryNumber; + mRecords.Remove(entity); + if (!changed) + changed = true; + recordGridView.DataSource = null; + if (mRecords.Any()) + recordGridView.DataSource = mRecords; + recordGridView.Refresh(); + } + + private int _result = 0; + public int Result + { + get { return _result; } + } + } +} diff --git a/QualityAndOrder/HurryRecordView.resx b/QualityAndOrder/HurryRecordView.resx new file mode 100644 index 0000000..21438fd --- /dev/null +++ b/QualityAndOrder/HurryRecordView.resx @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + + True + + \ No newline at end of file diff --git a/QualityAndOrder/QualityAndOrder.csproj b/QualityAndOrder/QualityAndOrder.csproj index 470da40..576f250 100644 --- a/QualityAndOrder/QualityAndOrder.csproj +++ b/QualityAndOrder/QualityAndOrder.csproj @@ -45,6 +45,12 @@ + + Form + + + HurryRecordView.cs + Form @@ -55,6 +61,9 @@ Form + + Form + @@ -67,6 +76,9 @@ + + HurryRecordView.cs + QualityOrderForm.cs diff --git a/QualityAndOrder/QualityOrderForm.Designer.cs b/QualityAndOrder/QualityOrderForm.Designer.cs index 8766e47..1878df8 100644 --- a/QualityAndOrder/QualityOrderForm.Designer.cs +++ b/QualityAndOrder/QualityOrderForm.Designer.cs @@ -28,23 +28,27 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle 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(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = 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 dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); this.uTabControl1 = new BWP.WinFormControl.UTabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.vScrollBar1 = new System.Windows.Forms.VScrollBar(); @@ -86,6 +90,9 @@ this.testTimeInput = new BWP.WinFormControl.UDatePicker(); this.label20 = new System.Windows.Forms.Label(); this.tabPage2 = new System.Windows.Forms.TabPage(); + this.butcherSearch = new System.Windows.Forms.Button(); + this.butcherDateInput = new BWP.WinFormControl.UDatePicker(); + this.label3 = new System.Windows.Forms.Label(); this.vScrollBar3 = new System.Windows.Forms.VScrollBar(); this.vScrollBar2 = new System.Windows.Forms.VScrollBar(); this.panel3 = new System.Windows.Forms.Panel(); @@ -110,22 +117,39 @@ this.P_OKBtn = new System.Windows.Forms.DataGridViewButtonColumn(); this.P_Hidden = new System.Windows.Forms.DataGridViewButtonColumn(); this.orderGrid = new BWP.WinFormControl.UDataGridView(); + this.tab2SyncBtn = new System.Windows.Forms.Button(); + this.tab2DateSelect = new BWP.WinFormControl.UDatePicker(); + this.label4 = new System.Windows.Forms.Label(); + this.tabPage5 = new System.Windows.Forms.TabPage(); + this.vScrollBar4 = new System.Windows.Forms.VScrollBar(); + this.tab3SearchBtn = new System.Windows.Forms.Button(); + this.tab3DateSelect = new BWP.WinFormControl.UDatePicker(); + this.label7 = new System.Windows.Forms.Label(); + this.panel4 = new System.Windows.Forms.Panel(); + this.tab3KeyPanel = new System.Windows.Forms.FlowLayoutPanel(); + this.label8 = new System.Windows.Forms.Label(); + this.orderGrid3 = new BWP.WinFormControl.UDataGridView(); + this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_WeightBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_SecondarySplit = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_B3WeighBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_LiveColonyHouse_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_HurryNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewButtonColumn1 = new System.Windows.Forms.DataGridViewButtonColumn(); + this.H_View = new System.Windows.Forms.DataGridViewButtonColumn(); this.O_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.O_IsHurryButcher = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.O_WeightBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.O_SecondarySplit = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.O_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.O_B3WeighBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.O_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.O_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.O_LiveColonyHouse_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.O_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.O_OKBtn = new System.Windows.Forms.DataGridViewButtonColumn(); - this.O_HurryBtn = new System.Windows.Forms.DataGridViewButtonColumn(); - this.tab2SyncBtn = new System.Windows.Forms.Button(); - this.tab2DateSelect = new BWP.WinFormControl.UDatePicker(); - this.label4 = new System.Windows.Forms.Label(); - this.butcherSearch = new System.Windows.Forms.Button(); - this.butcherDateInput = new BWP.WinFormControl.UDatePicker(); - this.label3 = new System.Windows.Forms.Label(); this.uTabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.panel1.SuspendLayout(); @@ -139,12 +163,16 @@ this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.preOrderGrid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.orderGrid)).BeginInit(); + this.tabPage5.SuspendLayout(); + this.panel4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.orderGrid3)).BeginInit(); this.SuspendLayout(); // // uTabControl1 // this.uTabControl1.Controls.Add(this.tabPage1); this.uTabControl1.Controls.Add(this.tabPage2); + this.uTabControl1.Controls.Add(this.tabPage5); this.uTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.uTabControl1.FromRightFlow = false; this.uTabControl1.ItemSize = new System.Drawing.Size(150, 50); @@ -226,17 +254,17 @@ this.sanctionGrid.AllowUserToDeleteRows = false; this.sanctionGrid.AllowUserToResizeColumns = false; this.sanctionGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle29.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.sanctionGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle29; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.sanctionGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.sanctionGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle30.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle30.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle30.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle30.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle30.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle30.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.sanctionGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle30; + 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.sanctionGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.sanctionGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.sanctionGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.S_AbnormalItem_Name1, @@ -257,9 +285,9 @@ this.sanctionGrid.Name = "sanctionGrid"; this.sanctionGrid.ReadOnly = true; this.sanctionGrid.RowHeadersVisible = false; - dataGridViewCellStyle31.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle31.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.sanctionGrid.RowsDefaultCellStyle = dataGridViewCellStyle31; + 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.sanctionGrid.RowsDefaultCellStyle = dataGridViewCellStyle3; this.sanctionGrid.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.sanctionGrid.RowTemplate.Height = 50; this.sanctionGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; @@ -468,17 +496,17 @@ this.weightBillGrid.AllowUserToDeleteRows = false; this.weightBillGrid.AllowUserToResizeColumns = false; this.weightBillGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle32.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.weightBillGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle32; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.weightBillGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; this.weightBillGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle33.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle33.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle33.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle33.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle33.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle33.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle33.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.weightBillGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle33; + 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.weightBillGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; this.weightBillGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.weightBillGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.W_ID, @@ -493,11 +521,11 @@ this.weightBillGrid.Name = "weightBillGrid"; this.weightBillGrid.ReadOnly = true; this.weightBillGrid.RowHeadersVisible = false; - dataGridViewCellStyle34.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle34.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle34.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - dataGridViewCellStyle34.SelectionForeColor = System.Drawing.Color.Black; - this.weightBillGrid.RowsDefaultCellStyle = dataGridViewCellStyle34; + dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle6.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.Black; + this.weightBillGrid.RowsDefaultCellStyle = dataGridViewCellStyle6; this.weightBillGrid.RowTemplate.Height = 40; this.weightBillGrid.ScrollBars = System.Windows.Forms.ScrollBars.None; this.weightBillGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -620,6 +648,41 @@ this.tabPage2.Text = "排宰顺序"; this.tabPage2.UseVisualStyleBackColor = true; // + // butcherSearch + // + this.butcherSearch.Font = new System.Drawing.Font("宋体", 15F); + this.butcherSearch.Location = new System.Drawing.Point(277, 6); + this.butcherSearch.Name = "butcherSearch"; + this.butcherSearch.Size = new System.Drawing.Size(94, 56); + this.butcherSearch.TabIndex = 57; + this.butcherSearch.Text = "查询"; + this.butcherSearch.UseVisualStyleBackColor = true; + this.butcherSearch.Click += new System.EventHandler(this.butcherSearch_Click); + // + // butcherDateInput + // + this.butcherDateInput.BackColor = System.Drawing.Color.White; + this.butcherDateInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.butcherDateInput.Date = new System.DateTime(2017, 9, 8, 0, 0, 0, 0); + this.butcherDateInput.Font = new System.Drawing.Font("宋体", 15F); + this.butcherDateInput.Location = new System.Drawing.Point(124, 16); + this.butcherDateInput.Name = "butcherDateInput"; + this.butcherDateInput.Size = new System.Drawing.Size(135, 30); + this.butcherDateInput.TabIndex = 56; + this.butcherDateInput.Text = "2017/09/08"; + this.butcherDateInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.butcherDateInput.Type = BWP.WinFormControl.DateTimeType.Date; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 14F); + this.label3.Location = new System.Drawing.Point(23, 22); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(104, 19); + this.label3.TabIndex = 55; + this.label3.Text = "宰杀日期:"; + // // vScrollBar3 // this.vScrollBar3.Location = new System.Drawing.Point(1334, 93); @@ -738,17 +801,17 @@ this.preOrderGrid.AllowUserToDeleteRows = false; this.preOrderGrid.AllowUserToResizeColumns = false; this.preOrderGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.preOrderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle18; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.preOrderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; this.preOrderGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.preOrderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle19; + 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.preOrderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; this.preOrderGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.preOrderGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.P_WeightBill_ID, @@ -767,11 +830,11 @@ this.preOrderGrid.Name = "preOrderGrid"; this.preOrderGrid.ReadOnly = true; this.preOrderGrid.RowHeadersVisible = false; - dataGridViewCellStyle23.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle23.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle23.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - dataGridViewCellStyle23.SelectionForeColor = System.Drawing.Color.Black; - this.preOrderGrid.RowsDefaultCellStyle = dataGridViewCellStyle23; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.Color.Black; + this.preOrderGrid.RowsDefaultCellStyle = dataGridViewCellStyle12; this.preOrderGrid.RowTemplate.Height = 60; this.preOrderGrid.ScrollBars = System.Windows.Forms.ScrollBars.None; this.preOrderGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -847,9 +910,9 @@ // P_WeighTime // this.P_WeighTime.DataPropertyName = "WeighTime"; - dataGridViewCellStyle20.Format = "MM/dd HH:mm"; - dataGridViewCellStyle20.NullValue = null; - this.P_WeighTime.DefaultCellStyle = dataGridViewCellStyle20; + dataGridViewCellStyle9.Format = "MM/dd HH:mm"; + dataGridViewCellStyle9.NullValue = null; + this.P_WeighTime.DefaultCellStyle = dataGridViewCellStyle9; this.P_WeighTime.HeaderText = "过磅时间"; this.P_WeighTime.Name = "P_WeighTime"; this.P_WeighTime.ReadOnly = true; @@ -857,9 +920,9 @@ // // P_OKBtn // - dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle21.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10); - this.P_OKBtn.DefaultCellStyle = dataGridViewCellStyle21; + dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle10.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10); + this.P_OKBtn.DefaultCellStyle = dataGridViewCellStyle10; this.P_OKBtn.HeaderText = "排宰"; this.P_OKBtn.Name = "P_OKBtn"; this.P_OKBtn.ReadOnly = true; @@ -871,9 +934,9 @@ // // P_Hidden // - dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle22.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10); - this.P_Hidden.DefaultCellStyle = dataGridViewCellStyle22; + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle11.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10); + this.P_Hidden.DefaultCellStyle = dataGridViewCellStyle11; this.P_Hidden.HeaderText = "隐藏"; this.P_Hidden.Name = "P_Hidden"; this.P_Hidden.ReadOnly = true; @@ -886,17 +949,17 @@ this.orderGrid.AllowUserToDeleteRows = false; this.orderGrid.AllowUserToResizeColumns = false; this.orderGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle24.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.orderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle24; + dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.orderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13; this.orderGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle25.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle25.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle25.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle25.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle25.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.orderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle25; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.orderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14; this.orderGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.orderGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.O_ID, @@ -905,20 +968,20 @@ this.O_SecondarySplit, this.O_Order, this.O_B3WeighBill_ID, - this.O_PlanNumber, + this.O_Supplier_Name, this.O_LiveColonyHouse_Name, - this.O_OKBtn, - this.O_HurryBtn}); + this.O_PlanNumber, + this.O_OKBtn}); this.orderGrid.Location = new System.Drawing.Point(25, 93); this.orderGrid.MultiSelect = false; this.orderGrid.Name = "orderGrid"; this.orderGrid.ReadOnly = true; this.orderGrid.RowHeadersVisible = false; - dataGridViewCellStyle28.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle28.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle28.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - dataGridViewCellStyle28.SelectionForeColor = System.Drawing.Color.Black; - this.orderGrid.RowsDefaultCellStyle = dataGridViewCellStyle28; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.Color.Black; + this.orderGrid.RowsDefaultCellStyle = dataGridViewCellStyle16; this.orderGrid.RowTemplate.Height = 60; this.orderGrid.ScrollBars = System.Windows.Forms.ScrollBars.None; this.orderGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -927,6 +990,270 @@ this.orderGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGrid_CellClick); this.orderGrid.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGrid_CellContentClick); // + // tab2SyncBtn + // + this.tab2SyncBtn.Font = new System.Drawing.Font("宋体", 15F); + this.tab2SyncBtn.Location = new System.Drawing.Point(841, 7); + this.tab2SyncBtn.Name = "tab2SyncBtn"; + this.tab2SyncBtn.Size = new System.Drawing.Size(94, 56); + this.tab2SyncBtn.TabIndex = 37; + this.tab2SyncBtn.Text = "同步"; + this.tab2SyncBtn.UseVisualStyleBackColor = true; + this.tab2SyncBtn.Click += new System.EventHandler(this.tab2SyncBtn_Click); + // + // tab2DateSelect + // + this.tab2DateSelect.BackColor = System.Drawing.Color.White; + this.tab2DateSelect.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tab2DateSelect.Date = new System.DateTime(2017, 9, 8, 0, 0, 0, 0); + this.tab2DateSelect.Font = new System.Drawing.Font("宋体", 15F); + this.tab2DateSelect.Location = new System.Drawing.Point(688, 17); + this.tab2DateSelect.Name = "tab2DateSelect"; + this.tab2DateSelect.Size = new System.Drawing.Size(135, 30); + this.tab2DateSelect.TabIndex = 36; + this.tab2DateSelect.Text = "2017/09/08"; + this.tab2DateSelect.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.tab2DateSelect.Type = BWP.WinFormControl.DateTimeType.Date; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("宋体", 14F); + this.label4.Location = new System.Drawing.Point(587, 23); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(104, 19); + this.label4.TabIndex = 35; + this.label4.Text = "过磅日期:"; + // + // tabPage5 + // + this.tabPage5.Controls.Add(this.vScrollBar4); + this.tabPage5.Controls.Add(this.tab3SearchBtn); + this.tabPage5.Controls.Add(this.tab3DateSelect); + this.tabPage5.Controls.Add(this.label7); + this.tabPage5.Controls.Add(this.panel4); + this.tabPage5.Controls.Add(this.label8); + this.tabPage5.Controls.Add(this.orderGrid3); + this.tabPage5.Location = new System.Drawing.Point(4, 54); + this.tabPage5.Name = "tabPage5"; + this.tabPage5.Padding = new System.Windows.Forms.Padding(3); + this.tabPage5.Size = new System.Drawing.Size(1376, 773); + this.tabPage5.TabIndex = 2; + this.tabPage5.Text = "急宰"; + this.tabPage5.UseVisualStyleBackColor = true; + // + // vScrollBar4 + // + this.vScrollBar4.Location = new System.Drawing.Point(760, 93); + this.vScrollBar4.Name = "vScrollBar4"; + this.vScrollBar4.Size = new System.Drawing.Size(40, 525); + this.vScrollBar4.TabIndex = 64; + // + // tab3SearchBtn + // + this.tab3SearchBtn.Font = new System.Drawing.Font("宋体", 15F); + this.tab3SearchBtn.Location = new System.Drawing.Point(277, 6); + this.tab3SearchBtn.Name = "tab3SearchBtn"; + this.tab3SearchBtn.Size = new System.Drawing.Size(94, 56); + this.tab3SearchBtn.TabIndex = 63; + this.tab3SearchBtn.Text = "查询"; + this.tab3SearchBtn.UseVisualStyleBackColor = true; + this.tab3SearchBtn.Click += new System.EventHandler(this.tab3SearchBtn_Click); + // + // tab3DateSelect + // + this.tab3DateSelect.BackColor = System.Drawing.Color.White; + this.tab3DateSelect.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tab3DateSelect.Date = new System.DateTime(2017, 9, 8, 0, 0, 0, 0); + this.tab3DateSelect.Font = new System.Drawing.Font("宋体", 15F); + this.tab3DateSelect.Location = new System.Drawing.Point(124, 16); + this.tab3DateSelect.Name = "tab3DateSelect"; + this.tab3DateSelect.Size = new System.Drawing.Size(135, 30); + this.tab3DateSelect.TabIndex = 62; + this.tab3DateSelect.Text = "2017/09/08"; + this.tab3DateSelect.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.tab3DateSelect.Type = BWP.WinFormControl.DateTimeType.Date; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("宋体", 14F); + this.label7.Location = new System.Drawing.Point(23, 22); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(104, 19); + this.label7.TabIndex = 61; + this.label7.Text = "宰杀日期:"; + // + // panel4 + // + this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel4.Controls.Add(this.tab3KeyPanel); + this.panel4.Location = new System.Drawing.Point(819, 93); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(530, 243); + this.panel4.TabIndex = 60; + // + // tab3KeyPanel + // + this.tab3KeyPanel.Location = new System.Drawing.Point(38, 0); + this.tab3KeyPanel.Name = "tab3KeyPanel"; + this.tab3KeyPanel.Padding = new System.Windows.Forms.Padding(25, 0, 0, 0); + this.tab3KeyPanel.Size = new System.Drawing.Size(452, 241); + this.tab3KeyPanel.TabIndex = 43; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("宋体", 15F); + this.label8.ForeColor = System.Drawing.Color.Red; + this.label8.Location = new System.Drawing.Point(21, 54); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(89, 20); + this.label8.TabIndex = 59; + this.label8.Text = "排宰明细"; + // + // orderGrid3 + // + this.orderGrid3.AllowUserToAddRows = false; + this.orderGrid3.AllowUserToDeleteRows = false; + this.orderGrid3.AllowUserToResizeColumns = false; + this.orderGrid3.AllowUserToResizeRows = false; + dataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.orderGrid3.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle17; + this.orderGrid3.BackgroundColor = System.Drawing.Color.White; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.orderGrid3.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle18; + this.orderGrid3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.orderGrid3.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.H_ID, + this.H_WeightBill_ID, + this.H_SecondarySplit, + this.H_Order, + this.H_B3WeighBill_ID, + this.H_Supplier_Name, + this.H_LiveColonyHouse_Name, + this.H_PlanNumber, + this.H_HurryNumber, + this.dataGridViewButtonColumn1, + this.H_View}); + this.orderGrid3.Location = new System.Drawing.Point(25, 93); + this.orderGrid3.MultiSelect = false; + this.orderGrid3.Name = "orderGrid3"; + this.orderGrid3.ReadOnly = true; + this.orderGrid3.RowHeadersVisible = false; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.Color.Black; + this.orderGrid3.RowsDefaultCellStyle = dataGridViewCellStyle21; + this.orderGrid3.RowTemplate.Height = 60; + this.orderGrid3.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.orderGrid3.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.orderGrid3.Size = new System.Drawing.Size(735, 525); + this.orderGrid3.TabIndex = 58; + this.orderGrid3.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGrid3_CellClick); + this.orderGrid3.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGrid3_CellContentClick); + // + // H_ID + // + this.H_ID.DataPropertyName = "ID"; + this.H_ID.HeaderText = "ID"; + this.H_ID.Name = "H_ID"; + this.H_ID.ReadOnly = true; + this.H_ID.Visible = false; + // + // H_WeightBill_ID + // + this.H_WeightBill_ID.DataPropertyName = "WeightBill_ID"; + this.H_WeightBill_ID.HeaderText = "WeightBill_ID"; + this.H_WeightBill_ID.Name = "H_WeightBill_ID"; + this.H_WeightBill_ID.ReadOnly = true; + this.H_WeightBill_ID.Visible = false; + // + // H_SecondarySplit + // + this.H_SecondarySplit.DataPropertyName = "SecondarySplit"; + this.H_SecondarySplit.HeaderText = "SecondarySplit"; + this.H_SecondarySplit.Name = "H_SecondarySplit"; + this.H_SecondarySplit.ReadOnly = true; + this.H_SecondarySplit.Visible = false; + // + // H_Order + // + this.H_Order.DataPropertyName = "Order"; + this.H_Order.HeaderText = "序号"; + this.H_Order.Name = "H_Order"; + this.H_Order.ReadOnly = true; + this.H_Order.Width = 70; + // + // H_B3WeighBill_ID + // + this.H_B3WeighBill_ID.DataPropertyName = "B3WeighBill_ID"; + this.H_B3WeighBill_ID.HeaderText = "磅单号"; + this.H_B3WeighBill_ID.Name = "H_B3WeighBill_ID"; + this.H_B3WeighBill_ID.ReadOnly = true; + this.H_B3WeighBill_ID.Width = 80; + // + // H_Supplier_Name + // + this.H_Supplier_Name.DataPropertyName = "Supplier_Name"; + this.H_Supplier_Name.HeaderText = "供应商"; + this.H_Supplier_Name.Name = "H_Supplier_Name"; + this.H_Supplier_Name.ReadOnly = true; + // + // H_LiveColonyHouse_Name + // + this.H_LiveColonyHouse_Name.DataPropertyName = "LiveColonyHouse_Name"; + this.H_LiveColonyHouse_Name.HeaderText = "圈舍"; + this.H_LiveColonyHouse_Name.Name = "H_LiveColonyHouse_Name"; + this.H_LiveColonyHouse_Name.ReadOnly = true; + // + // H_PlanNumber + // + this.H_PlanNumber.DataPropertyName = "PlanNumber"; + this.H_PlanNumber.HeaderText = "头数"; + this.H_PlanNumber.Name = "H_PlanNumber"; + this.H_PlanNumber.ReadOnly = true; + this.H_PlanNumber.Width = 80; + // + // H_HurryNumber + // + this.H_HurryNumber.DataPropertyName = "HurryNumber"; + this.H_HurryNumber.HeaderText = "急宰"; + this.H_HurryNumber.Name = "H_HurryNumber"; + this.H_HurryNumber.ReadOnly = true; + this.H_HurryNumber.Width = 80; + // + // dataGridViewButtonColumn1 + // + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle19.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10); + this.dataGridViewButtonColumn1.DefaultCellStyle = dataGridViewCellStyle19; + this.dataGridViewButtonColumn1.HeaderText = "确定"; + this.dataGridViewButtonColumn1.Name = "dataGridViewButtonColumn1"; + this.dataGridViewButtonColumn1.ReadOnly = true; + this.dataGridViewButtonColumn1.Text = "确定"; + this.dataGridViewButtonColumn1.UseColumnTextForButtonValue = true; + this.dataGridViewButtonColumn1.Width = 110; + // + // H_View + // + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle20.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10); + this.H_View.DefaultCellStyle = dataGridViewCellStyle20; + this.H_View.HeaderText = "查看"; + this.H_View.Name = "H_View"; + this.H_View.ReadOnly = true; + this.H_View.Text = "查看"; + this.H_View.UseColumnTextForButtonValue = true; + this.H_View.Width = 110; + // // O_ID // this.O_ID.DataPropertyName = "ID"; @@ -975,13 +1302,13 @@ this.O_B3WeighBill_ID.ReadOnly = true; this.O_B3WeighBill_ID.Width = 80; // - // O_PlanNumber + // O_Supplier_Name // - this.O_PlanNumber.DataPropertyName = "PlanNumber"; - this.O_PlanNumber.HeaderText = "头数"; - this.O_PlanNumber.Name = "O_PlanNumber"; - this.O_PlanNumber.ReadOnly = true; - this.O_PlanNumber.Width = 70; + this.O_Supplier_Name.DataPropertyName = "Supplier_Name"; + this.O_Supplier_Name.HeaderText = "供应商"; + this.O_Supplier_Name.Name = "O_Supplier_Name"; + this.O_Supplier_Name.ReadOnly = true; + this.O_Supplier_Name.Width = 95; // // O_LiveColonyHouse_Name // @@ -990,11 +1317,19 @@ this.O_LiveColonyHouse_Name.Name = "O_LiveColonyHouse_Name"; this.O_LiveColonyHouse_Name.ReadOnly = true; // + // O_PlanNumber + // + this.O_PlanNumber.DataPropertyName = "PlanNumber"; + this.O_PlanNumber.HeaderText = "头数"; + this.O_PlanNumber.Name = "O_PlanNumber"; + this.O_PlanNumber.ReadOnly = true; + this.O_PlanNumber.Width = 70; + // // O_OKBtn // - dataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle26.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10); - this.O_OKBtn.DefaultCellStyle = dataGridViewCellStyle26; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle15.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10); + this.O_OKBtn.DefaultCellStyle = dataGridViewCellStyle15; this.O_OKBtn.HeaderText = "确定"; this.O_OKBtn.Name = "O_OKBtn"; this.O_OKBtn.ReadOnly = true; @@ -1002,88 +1337,6 @@ this.O_OKBtn.UseColumnTextForButtonValue = true; this.O_OKBtn.Width = 95; // - // O_HurryBtn - // - dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle27.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10); - this.O_HurryBtn.DefaultCellStyle = dataGridViewCellStyle27; - this.O_HurryBtn.HeaderText = "急宰"; - this.O_HurryBtn.Name = "O_HurryBtn"; - this.O_HurryBtn.ReadOnly = true; - this.O_HurryBtn.Text = "急宰"; - this.O_HurryBtn.UseColumnTextForButtonValue = true; - this.O_HurryBtn.Width = 95; - // - // tab2SyncBtn - // - this.tab2SyncBtn.Font = new System.Drawing.Font("宋体", 15F); - this.tab2SyncBtn.Location = new System.Drawing.Point(841, 7); - this.tab2SyncBtn.Name = "tab2SyncBtn"; - this.tab2SyncBtn.Size = new System.Drawing.Size(94, 56); - this.tab2SyncBtn.TabIndex = 37; - this.tab2SyncBtn.Text = "同步"; - this.tab2SyncBtn.UseVisualStyleBackColor = true; - this.tab2SyncBtn.Click += new System.EventHandler(this.tab2SyncBtn_Click); - // - // tab2DateSelect - // - this.tab2DateSelect.BackColor = System.Drawing.Color.White; - this.tab2DateSelect.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.tab2DateSelect.Date = new System.DateTime(2017, 9, 8, 0, 0, 0, 0); - this.tab2DateSelect.Font = new System.Drawing.Font("宋体", 15F); - this.tab2DateSelect.Location = new System.Drawing.Point(688, 17); - this.tab2DateSelect.Name = "tab2DateSelect"; - this.tab2DateSelect.Size = new System.Drawing.Size(135, 30); - this.tab2DateSelect.TabIndex = 36; - this.tab2DateSelect.Text = "2017/09/08"; - this.tab2DateSelect.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.tab2DateSelect.Type = BWP.WinFormControl.DateTimeType.Date; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("宋体", 14F); - this.label4.Location = new System.Drawing.Point(587, 23); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(104, 19); - this.label4.TabIndex = 35; - this.label4.Text = "过磅日期:"; - // - // butcherSearch - // - this.butcherSearch.Font = new System.Drawing.Font("宋体", 15F); - this.butcherSearch.Location = new System.Drawing.Point(277, 6); - this.butcherSearch.Name = "butcherSearch"; - this.butcherSearch.Size = new System.Drawing.Size(94, 56); - this.butcherSearch.TabIndex = 57; - this.butcherSearch.Text = "查询"; - this.butcherSearch.UseVisualStyleBackColor = true; - this.butcherSearch.Click += new System.EventHandler(this.butcherSearch_Click); - // - // butcherDateInput - // - this.butcherDateInput.BackColor = System.Drawing.Color.White; - this.butcherDateInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.butcherDateInput.Date = new System.DateTime(2017, 9, 8, 0, 0, 0, 0); - this.butcherDateInput.Font = new System.Drawing.Font("宋体", 15F); - this.butcherDateInput.Location = new System.Drawing.Point(124, 16); - this.butcherDateInput.Name = "butcherDateInput"; - this.butcherDateInput.Size = new System.Drawing.Size(135, 30); - this.butcherDateInput.TabIndex = 56; - this.butcherDateInput.Text = "2017/09/08"; - this.butcherDateInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.butcherDateInput.Type = BWP.WinFormControl.DateTimeType.Date; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("宋体", 14F); - this.label3.Location = new System.Drawing.Point(23, 22); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(104, 19); - this.label3.TabIndex = 55; - this.label3.Text = "宰杀日期:"; - // // QualityOrderForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -1111,6 +1364,10 @@ this.panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.preOrderGrid)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.orderGrid)).EndInit(); + this.tabPage5.ResumeLayout(false); + this.tabPage5.PerformLayout(); + this.panel4.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.orderGrid3)).EndInit(); this.ResumeLayout(false); } @@ -1185,19 +1442,39 @@ private System.Windows.Forms.DataGridViewTextBoxColumn P_WeighTime; private System.Windows.Forms.DataGridViewButtonColumn P_OKBtn; private System.Windows.Forms.DataGridViewButtonColumn P_Hidden; + private System.Windows.Forms.Button butcherSearch; + private BWP.WinFormControl.UDatePicker butcherDateInput; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TabPage tabPage5; + private System.Windows.Forms.VScrollBar vScrollBar4; + private System.Windows.Forms.Button tab3SearchBtn; + private BWP.WinFormControl.UDatePicker tab3DateSelect; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.FlowLayoutPanel tab3KeyPanel; + private System.Windows.Forms.Label label8; + private BWP.WinFormControl.UDataGridView orderGrid3; + private System.Windows.Forms.DataGridViewTextBoxColumn H_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn H_WeightBill_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn H_SecondarySplit; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Order; + private System.Windows.Forms.DataGridViewTextBoxColumn H_B3WeighBill_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Supplier_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn H_LiveColonyHouse_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn H_PlanNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn H_HurryNumber; + private System.Windows.Forms.DataGridViewButtonColumn dataGridViewButtonColumn1; + private System.Windows.Forms.DataGridViewButtonColumn H_View; private System.Windows.Forms.DataGridViewTextBoxColumn O_ID; private System.Windows.Forms.DataGridViewTextBoxColumn O_IsHurryButcher; private System.Windows.Forms.DataGridViewTextBoxColumn O_WeightBill_ID; private System.Windows.Forms.DataGridViewTextBoxColumn O_SecondarySplit; private System.Windows.Forms.DataGridViewTextBoxColumn O_Order; private System.Windows.Forms.DataGridViewTextBoxColumn O_B3WeighBill_ID; - private System.Windows.Forms.DataGridViewTextBoxColumn O_PlanNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn O_Supplier_Name; private System.Windows.Forms.DataGridViewTextBoxColumn O_LiveColonyHouse_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn O_PlanNumber; private System.Windows.Forms.DataGridViewButtonColumn O_OKBtn; - private System.Windows.Forms.DataGridViewButtonColumn O_HurryBtn; - private System.Windows.Forms.Button butcherSearch; - private BWP.WinFormControl.UDatePicker butcherDateInput; - private System.Windows.Forms.Label label3; diff --git a/QualityAndOrder/QualityOrderForm.cs b/QualityAndOrder/QualityOrderForm.cs index 254e032..13f10fc 100644 --- a/QualityAndOrder/QualityOrderForm.cs +++ b/QualityAndOrder/QualityOrderForm.cs @@ -69,13 +69,16 @@ namespace QualityAndOrder { if (syncThread != null && syncThread.IsAlive) syncThread.Abort(); - if (tb2SyncB3IDThread != null && tb2SyncB3IDThread.IsAlive) - tb2SyncB3IDThread.Abort(); + if (orderSyncTask != null && orderSyncTask.IsAlive) + orderSyncTask.Abort(); if (bt2SyncTask != null && bt2SyncTask.IsAlive) bt2SyncTask.Abort(); + if (bt3SyncTask != null && bt3SyncTask.IsAlive) + bt3SyncTask.Abort(); }; Tab2Init(); + Tab3Init(); } HouseAndSanctionList lastFirstSelect; diff --git a/QualityAndOrder/QualityOrderForm.resx b/QualityAndOrder/QualityOrderForm.resx index 8c66729..ea860f3 100644 --- a/QualityAndOrder/QualityOrderForm.resx +++ b/QualityAndOrder/QualityOrderForm.resx @@ -117,6 +117,63 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + True @@ -168,73 +225,49 @@ True - + True True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True \ No newline at end of file diff --git a/QualityAndOrder/QualityOrderFormForTab2.cs b/QualityAndOrder/QualityOrderFormForTab2.cs index 6d58fa6..3b3cd09 100644 --- a/QualityAndOrder/QualityOrderFormForTab2.cs +++ b/QualityAndOrder/QualityOrderFormForTab2.cs @@ -16,7 +16,7 @@ namespace QualityAndOrder { List needOrderList; List orderList; - Thread tb2SyncB3IDThread; + Thread orderSyncTask; Thread bt2SyncTask; void Tab2Init() @@ -66,28 +66,31 @@ namespace QualityAndOrder void InputPlanNumber(string input) { - if (orderGrid.CurrentCell == null) + if (lastOrderDetail == null) throw new Exception("请选择一条排宰明细"); - var tag = orderGrid.CurrentRow.DataBoundItem as OrderDetail; - tag.PlanNumber = GetAfterNumber(tag.PlanNumber, input) ?? 0; + lastOrderDetail.PlanNumber = GetAfterNumber(lastOrderDetail.PlanNumber, input) ?? 0; orderGrid.Refresh(); } private void butcherSearch_Click(object sender, EventArgs e) { - if (lastOrderDetail != null && lastOrderDetail.Date != butcherDateInput.Date) - lastOrderDetail = null; - BindOrderGrid(); + if (orderSyncTask == null || !orderSyncTask.IsAlive) + { + orderSyncTask = new Thread(OrderSearchTask); + orderSyncTask.Start(); + butcherSearch.BackColor = Color.FromArgb(15, 215, 107); + butcherSearch.ForeColor = Color.White; + } + else + { + orderSyncTask.Abort(); + butcherSearch.BackColor = Color.FromKnownColor(KnownColor.Control); + butcherSearch.ForeColor = Color.FromKnownColor(KnownColor.ControlText); + } } private void tab2SyncBtn_Click(object sender, EventArgs e) { - if (tb2SyncB3IDThread == null) - { - tb2SyncB3IDThread = new Thread(Tab2SyncB3ID); - tb2SyncB3IDThread.Start(); - } - if (bt2SyncTask == null || !bt2SyncTask.IsAlive) { bt2SyncTask = new Thread(Tb2SyncTask); @@ -115,38 +118,14 @@ namespace QualityAndOrder } } - private void Tab2SyncB3ID() + void OrderSearchTask() { while (true) { - if (orderList == null) - { - Thread.Sleep(5000); - continue; - } - bool orderChange = false; - var ids = orderList.Where(x => x.B3WeighBill_ID == null).Select(x => (long?)x.WeightBill_ID).Distinct().ToList(); - if (ids.Any()) - { - var result = WeightBillRpc.SyncBillB3Ids(ids); - foreach (var item in result) - { - var left = orderList.Where(x => x.WeightBill_ID == item.Item1); - foreach (var lEntity in left) - { - lEntity.B3WeighBill_ID = item.Item2; - if (!orderChange) - orderChange = true; - } - } - } - if (orderChange) - { - this.Invoke(new InvokeHandler(delegate() - { - orderGrid.Refresh(); - })); - } + this.Invoke(new InvokeHandler(delegate() + { + BindOrderGrid(); + })); Thread.Sleep(5000); } } @@ -189,7 +168,13 @@ namespace QualityAndOrder OrderDetail lastOrderDetail; void BindOrderGrid() { - orderList = OrderDetailRpc.GetOrderDetail(butcherDateInput.Date.Value); + orderList = OrderDetailRpc.GetOrderDetail(butcherDateInput.Date.Value, false); + if (lastOrderDetail != null) + { + var t = orderList.FirstOrDefault(x => x.ID == lastOrderDetail.ID); + if (t != null) + t.PlanNumber = lastOrderDetail.PlanNumber; + } orderGrid.DataSource = orderList.OrderByDescending(x => x.Order).ToList(); if (lastOrderDetail == null && orderGrid.CurrentRow != null) { @@ -203,16 +188,13 @@ namespace QualityAndOrder row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#6699CC"); if (lastOrderDetail != null && lastOrderDetail.ID == (long)row.Cells["O_ID"].Value) { - var cRow = row; - if (orderGrid.Rows.IndexOf(row) == 1) - cRow = orderGrid.Rows[0]; - lastOrderDetail = cRow.DataBoundItem as OrderDetail; + lastOrderDetail = row.DataBoundItem as OrderDetail; var c = orderGrid.RowsDefaultCellStyle.SelectionBackColor; if (lastOrderDetail.IsHurryButcher) - cRow.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#FF9900"); + row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#FF9900"); if (lastOrderDetail.SecondarySplit) - cRow.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#006699"); - cRow.DefaultCellStyle.SelectionBackColor = c; + row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#006699"); + row.DefaultCellStyle.BackColor = c; } } InitScrollBar2(); @@ -235,10 +217,11 @@ namespace QualityAndOrder return; if (e.ColumnIndex < preOrderGrid.ColumnCount - 2) return; - var entity = preOrderGrid.CurrentRow.DataBoundItem as NeedOrderEntity; if (e.ColumnIndex == preOrderGrid.ColumnCount - 2) { var currentOrder = 0; + if (lastOrderDetail != null && lastOrderDetail.Date != butcherDateInput.Date) + lastOrderDetail = null; if (lastOrderDetail != null) currentOrder = OrderDetailRpc.GetCurrentOrder(lastOrderDetail.ID); else @@ -246,18 +229,19 @@ namespace QualityAndOrder currentOrder++; var order = new OrderDetail(); order.Order = currentOrder; - order.LiveColonyHouse_Name = entity.HouseNames; - order.PlanNumber = entity.LastNumber; - order.WeightBill_ID = entity.WeightBill_ID; - order.B3WeighBill_ID = entity.B3ID; + order.LiveColonyHouse_Name = lastPreOrder.HouseNames; + order.PlanNumber = lastPreOrder.LastNumber; + order.WeightBill_ID = lastPreOrder.WeightBill_ID; + order.B3WeighBill_ID = lastPreOrder.B3ID; order.Date = butcherDateInput.Date.Value; OrderDetailRpc.Insert(order); + lastOrderDetail = order; BindOrderGrid(); } else { - entity.Show = !entity.Show; - OrderDetailRpc.ChangeShowType(entity.WeightBill_ID, entity.Show); + lastPreOrder.Show = !lastPreOrder.Show; + OrderDetailRpc.ChangeShowType(lastPreOrder.WeightBill_ID, lastPreOrder.Show); } BindPreOrderGrid(); } @@ -294,30 +278,24 @@ namespace QualityAndOrder { if (e.RowIndex == -1) return; - if (e.ColumnIndex < orderGrid.ColumnCount - 2) + if (e.ColumnIndex != orderGrid.ColumnCount - 1) return; - var entity = orderGrid.CurrentRow.DataBoundItem as OrderDetail; - if (e.ColumnIndex == orderGrid.ColumnCount - 2)//确定 - { - if (entity.PlanNumber < 0) - throw new Exception("排宰头数不能小于0"); - var lastNumber = OrderDetailRpc.GetLastNumber(entity.WeightBill_ID, entity.ID); + if (lastOrderDetail.PlanNumber < 0) + throw new Exception("排宰头数不能小于0"); + var lastNumber = OrderDetailRpc.GetLastNumber(lastOrderDetail.WeightBill_ID, lastOrderDetail.ID); - if (entity.PlanNumber > lastNumber) - throw new Exception("排宰总头数多余过磅头数"); - if (entity.PlanNumber == lastNumber) - return; - if (entity.PlanNumber == 0) - OrderDetailRpc.Delete(entity.ID); - else - OrderDetailRpc.UpdateNumber(entity.ID, entity.PlanNumber); - BindPreOrderGrid(); - } - else if ((e.ColumnIndex == orderGrid.ColumnCount - 1))//急宰 + if (lastOrderDetail.PlanNumber > lastNumber) + throw new Exception("排宰总头数多余过磅头数"); + if (lastOrderDetail.PlanNumber == lastNumber) + return; + if (lastOrderDetail.PlanNumber == 0) { - entity.IsHurryButcher = !entity.IsHurryButcher; - OrderDetailRpc.UpdateHurryFlag(entity.ID, entity.IsHurryButcher); + OrderDetailRpc.Delete(lastOrderDetail.ID); + lastOrderDetail = null; } + else + OrderDetailRpc.UpdateNumber(lastOrderDetail.ID, lastOrderDetail.PlanNumber); + BindPreOrderGrid(); BindOrderGrid(); } @@ -326,37 +304,30 @@ namespace QualityAndOrder if (e.RowIndex == -1) return; var entity = orderGrid.CurrentRow.DataBoundItem as OrderDetail; - if (e.ColumnIndex == orderGrid.ColumnCount - 2 && entity.PlanNumber == 0)//确定 - { - lastOrderDetail = null; - } - else + if (lastOrderDetail != null) { - if (lastOrderDetail != null) + foreach (DataGridViewRow row in orderGrid.Rows) { - foreach (DataGridViewRow row in orderGrid.Rows) + if (lastOrderDetail.ID == (long)row.Cells["O_ID"].Value) { - if (lastOrderDetail.ID == (long)row.Cells["O_ID"].Value) - { - Color c = orderGrid.RowsDefaultCellStyle.BackColor; - if (lastOrderDetail.IsHurryButcher) - c = ColorTranslator.FromHtml("#CC9999"); - if (lastOrderDetail.SecondarySplit) - c = ColorTranslator.FromHtml("#6699CC"); - row.DefaultCellStyle.BackColor = c; - break; - } + Color c = orderGrid.RowsDefaultCellStyle.BackColor; + if (lastOrderDetail.IsHurryButcher) + c = ColorTranslator.FromHtml("#CC9999"); + if (lastOrderDetail.SecondarySplit) + c = ColorTranslator.FromHtml("#6699CC"); + row.DefaultCellStyle.BackColor = c; + break; } } - lastOrderDetail = entity; - - var bc = orderGrid.RowsDefaultCellStyle.SelectionBackColor; - if (lastOrderDetail.IsHurryButcher) - bc = ColorTranslator.FromHtml("#FF9900"); - if (lastOrderDetail.SecondarySplit) - bc = ColorTranslator.FromHtml("#006699"); - orderGrid.CurrentRow.DefaultCellStyle.SelectionBackColor = bc; } + lastOrderDetail = entity; + + var bc = orderGrid.RowsDefaultCellStyle.SelectionBackColor; + if (lastOrderDetail.IsHurryButcher) + bc = ColorTranslator.FromHtml("#FF9900"); + if (lastOrderDetail.SecondarySplit) + bc = ColorTranslator.FromHtml("#006699"); + orderGrid.CurrentRow.DefaultCellStyle.SelectionBackColor = bc; orderGrid.Refresh(); } diff --git a/QualityAndOrder/QualityOrderFormForTab3.cs b/QualityAndOrder/QualityOrderFormForTab3.cs new file mode 100644 index 0000000..27683cb --- /dev/null +++ b/QualityAndOrder/QualityOrderFormForTab3.cs @@ -0,0 +1,194 @@ +using BO.BO.Bill; +using BO.Utils.BillRpc; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace QualityAndOrder +{ + partial class QualityOrderForm + { + List orderList3; + Thread bt3SyncTask; + + void Tab3Init() + { + tab3DateSelect.Date = DateTime.Today; + orderGrid3.AutoGenerateColumns = false; + orderGrid3.DataSource = null; + + AddKeyPadForTab3(); + } + + private void AddKeyPadForTab3() + { + for (var i = 1; i < 10; i++) + { + var btn = new Button() { Name = "_3" + i, Text = i.ToString(), Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; + btn.Click += (sender, e) => + { + InputHurryNumber(btn.Text); + }; + tab3KeyPanel.Controls.Add(btn); + } + var zero = new Button() { Name = "_30", Text = "0", Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; + zero.Click += (sender, e) => + { + InputHurryNumber(zero.Text); + }; + tab3KeyPanel.Controls.Add(zero); + var back = new Button() { Name = "_3back", Text = "←", Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; + back.Click += (sender, e) => + { + InputHurryNumber(back.Text); + }; + tab3KeyPanel.Controls.Add(back); + + var clear = new Button() { Name = "_3clear", Text = "清空", Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; + clear.Click += (sender, e) => + { + InputHurryNumber(clear.Text); + }; + tab3KeyPanel.Controls.Add(clear); + + } + + void InputHurryNumber(string input) + { + if (lastOrder3Detail == null) + throw new Exception("请选择一条排宰明细"); + lastOrder3Detail.HurryNumber = GetAfterNumber(lastOrder3Detail.HurryNumber, input) ?? 0; + orderGrid3.Refresh(); + } + + private void tab3SearchBtn_Click(object sender, EventArgs e) + { + if (bt3SyncTask == null || !bt3SyncTask.IsAlive) + { + bt3SyncTask = new Thread(Tb3SyncTask); + bt3SyncTask.Start(); + tab3SearchBtn.BackColor = Color.FromArgb(15, 215, 107); + tab3SearchBtn.ForeColor = Color.White; + } + else + { + bt3SyncTask.Abort(); + tab3SearchBtn.BackColor = Color.FromKnownColor(KnownColor.Control); + tab3SearchBtn.ForeColor = Color.FromKnownColor(KnownColor.ControlText); + } + } + + void Tb3SyncTask() + { + while (true) + { + this.Invoke(new InvokeHandler(delegate() + { + BindOrderGrid3(); + })); + Thread.Sleep(5000); + } + } + + OrderDetail lastOrder3Detail; + private void BindOrderGrid3() + { + orderList3 = OrderDetailRpc.GetOrderDetail(tab3DateSelect.Date.Value, true); + if (lastOrder3Detail != null) + { + var t = orderList3.FirstOrDefault(x => x.ID == lastOrder3Detail.ID); + if (t != null) + t.HurryNumber = lastOrder3Detail.HurryNumber; + } + orderGrid3.DataSource = orderList3.OrderByDescending(x => x.Order).ToList(); + + foreach (DataGridViewRow row in orderGrid3.Rows) + { + if (lastOrder3Detail != null && lastOrder3Detail.ID == (long)row.Cells["H_ID"].Value) + { + lastOrder3Detail = row.DataBoundItem as OrderDetail; + row.DefaultCellStyle.BackColor = orderGrid3.RowsDefaultCellStyle.SelectionBackColor; + } + } + InitScrollBar4(); + orderGrid3.ClearSelection(); + try + { + if (r4Roll != -1) + orderGrid3.FirstDisplayedScrollingRowIndex = r4Roll; + } + catch + { + r4Roll = -1; + } + orderGrid3.Refresh(); + } + + private void orderGrid3_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex == -1) + return; + if (e.ColumnIndex < orderGrid3.ColumnCount - 2) + return; + if (e.ColumnIndex == orderGrid3.ColumnCount - 2)//确定 + { + if (lastOrder3Detail.HurryNumber == 0) + return; + if (lastOrder3Detail.HurryNumber > lastOrder3Detail.PlanNumber) + throw new Exception("急宰头数多余排宰头数"); + lastOrder3Detail.HurryNumber = OrderDetailRpc.InsertHurryRecord(lastOrder3Detail); + orderGrid3.Refresh(); + } + else//查看 + { + var view = new HurryRecordView(lastOrder3Detail.ID); + if (view.ShowDialog() == DialogResult.OK) + { + lastOrder3Detail.HurryNumber -= view.Result; + orderGrid3.Refresh(); + } + } + } + + private void orderGrid3_CellClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex == -1) + return; + var entity = orderGrid3.CurrentRow.DataBoundItem as OrderDetail; + + if (lastOrder3Detail != null) + { + foreach (DataGridViewRow row in orderGrid3.Rows) + { + if (lastOrder3Detail.ID == (long)row.Cells["H_ID"].Value) + { + row.DefaultCellStyle.BackColor = orderGrid3.RowsDefaultCellStyle.BackColor; + break; + } + } + } + lastOrder3Detail = entity; + if (e.ColumnIndex != orderGrid3.Columns.Count - 2)//非确定列 + orderGrid3.Refresh(); + } + + int r4Roll = -1; + private void InitScrollBar4() + { + vScrollBar4.Maximum = (orderGrid3.RowCount - orderGrid3.DisplayedRowCount(false) + 30) * orderGrid3.RowTemplate.Height; + vScrollBar4.Minimum = 0; + vScrollBar4.SmallChange = orderGrid3.RowTemplate.Height; + vScrollBar4.LargeChange = orderGrid3.RowTemplate.Height * 30; + this.vScrollBar4.Scroll += (sender, e) => + { + r4Roll = e.NewValue / orderGrid3.RowTemplate.Height; + orderGrid3.FirstDisplayedScrollingRowIndex = r4Roll; + }; + } + } +} diff --git a/Setup/Release/Setup.msi b/Setup/Release/Setup.msi index 8c33277..ee6fcf8 100644 Binary files a/Setup/Release/Setup.msi and b/Setup/Release/Setup.msi differ diff --git a/Setup/Setup.vdproj b/Setup/Setup.vdproj index 7ae353d..b3dfb94 100644 --- a/Setup/Setup.vdproj +++ b/Setup/Setup.vdproj @@ -75,6 +75,12 @@ } "Entry" { + "MsmKey" = "8:_38D34C00AC7904E5D01A35ECF223BE06" + "OwnerKey" = "8:_E562E4F2F1D44477985FD09F62884850" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_490CF6B031F04EA68BE52D3A7EB5FEF9" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -105,6 +111,12 @@ } "Entry" { + "MsmKey" = "8:_863A403291F0637680FF1E9D313B477D" + "OwnerKey" = "8:_E562E4F2F1D44477985FD09F62884850" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44" "OwnerKey" = "8:_EE17E053D2DAEC8711E3F47FB9870675" "MsmSig" = "8:_UNDEFINED" @@ -112,6 +124,18 @@ "Entry" { "MsmKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44" + "OwnerKey" = "8:_38D34C00AC7904E5D01A35ECF223BE06" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44" + "OwnerKey" = "8:_863A403291F0637680FF1E9D313B477D" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44" "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" "MsmSig" = "8:_UNDEFINED" } @@ -135,6 +159,12 @@ } "Entry" { + "MsmKey" = "8:_C494B50E5FAFD6CCFD9EAB828D53CBD9" + "OwnerKey" = "8:_72C299799A4A4FCE805FFC4FC20FAFEF" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_D4A570E8506CE9B608EA798211060C3A" "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" "MsmSig" = "8:_UNDEFINED" @@ -165,6 +195,12 @@ } "Entry" { + "MsmKey" = "8:_E562E4F2F1D44477985FD09F62884850" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_EE17E053D2DAEC8711E3F47FB9870675" "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" "MsmSig" = "8:_UNDEFINED" @@ -202,12 +238,36 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_E562E4F2F1D44477985FD09F62884850" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_38D34C00AC7904E5D01A35ECF223BE06" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_863A403291F0637680FF1E9D313B477D" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_72C299799A4A4FCE805FFC4FC20FAFEF" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_C494B50E5FAFD6CCFD9EAB828D53CBD9" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_5DDE73D6E26642C99C1F3ED80EAAA5D0" "MsmSig" = "8:_UNDEFINED" } @@ -527,6 +587,37 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_38D34C00AC7904E5D01A35ECF223BE06" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:BWP.WinFormControl, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_38D34C00AC7904E5D01A35ECF223BE06" + { + "Name" = "8:BWP.WinFormControl.DLL" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:BWP.WinFormControl.DLL" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_490CF6B031F04EA68BE52D3A7EB5FEF9" { "AssemblyRegister" = "3:1" @@ -651,6 +742,37 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_863A403291F0637680FF1E9D313B477D" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:BO, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_863A403291F0637680FF1E9D313B477D" + { + "Name" = "8:BO.DLL" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:BO.DLL" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_B110F71EA45DE28B9A91C6C8EC87BC44" { "AssemblyRegister" = "3:1" @@ -713,6 +835,37 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_C494B50E5FAFD6CCFD9EAB828D53CBD9" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:BwpClientPrint, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_C494B50E5FAFD6CCFD9EAB828D53CBD9" + { + "Name" = "8:BwpClientPrint.DLL" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:BwpClientPrint.DLL" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_D4A570E8506CE9B608EA798211060C3A" { "AssemblyRegister" = "3:1" @@ -744,6 +897,37 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_E562E4F2F1D44477985FD09F62884850" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:OrderConfirm, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_E562E4F2F1D44477985FD09F62884850" + { + "Name" = "8:OrderConfirm.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:..\\OrderConfirm\\bin\\Release\\OrderConfirm.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_EE17E053D2DAEC8711E3F47FB9870675" { "AssemblyRegister" = "3:1" diff --git a/WeighAndGrading/GradeContext.cs b/WeighAndGrading/GradeContext.cs index 7a76839..5702877 100644 --- a/WeighAndGrading/GradeContext.cs +++ b/WeighAndGrading/GradeContext.cs @@ -76,5 +76,11 @@ namespace WeighAndGrading public string Format { get; set; } public decimal? Discont { get; set; } + + public int WeightType { get; set; } + + public decimal MinWeight { get; set; } + + public decimal MaxWeight { get; set; } } } diff --git a/WeighAndGrading/GradeFrom.cs b/WeighAndGrading/GradeFrom.cs index cc3a206..c92d7e6 100644 --- a/WeighAndGrading/GradeFrom.cs +++ b/WeighAndGrading/GradeFrom.cs @@ -336,16 +336,42 @@ namespace WeighAndGrading string str; if (_dataFormat.ParseAscii(_dataStrBuilder.ToString(), out str, out isStatic)) { - if (string.IsNullOrEmpty(str)) - str = "0"; - this.Invoke(new InvokeHandler(delegate() + if (GradeContext.Config.WeightType == 0) { - lblChengZhong.Text = string.Format(format, decimal.Parse(str)); - if (str != "0") + if (string.IsNullOrEmpty(str)) + str = "0"; + this.Invoke(new InvokeHandler(delegate() { - AddWeightDetail(decimal.Parse(lblChengZhong.Text)); + lblChengZhong.Text = string.Format(format, decimal.Parse(str)); + if (str != "0") + { + AddWeightDetail(decimal.Parse(lblChengZhong.Text)); + } + })); + } + else + { + decimal num = 0; + if (decimal.TryParse(str, out num)) + { + this.Invoke(new InvokeHandler(delegate() + { + lblChengZhong.Text = string.Format(format, num); + })); + WeighAvgControl.Add(num, isStatic); + } + if (WeighAvgControl.TryGetValue(out num)) + { + this.Invoke(new InvokeHandler(delegate() + { + //lblChengZhong.Text = string.Format(format, num); + if (str != "0") + { + AddWeightDetail(decimal.Parse(string.Format(format, num))); + } + })); } - })); + } } _dataStrBuilder.Clear(); } @@ -357,6 +383,48 @@ namespace WeighAndGrading } } + private class WeighAvgControl + { + public static bool TryGetValue(out decimal result) + { + List> list; + if (mWeighList.TryDequeue(out list)) + { + var r = list.Where(x => x.Item2).Select(x => x.Item1).GroupBy(x => x); + var firstOrDefault = r.OrderByDescending(x => x.Count()).FirstOrDefault(); + if (firstOrDefault != null) + { + result = firstOrDefault.Key; + return true; + } + result = 0; + return false; + } + result = 0; + return false; + } + + static ConcurrentQueue>> mWeighList = new ConcurrentQueue>>(); + + static List> _list = new List>(); + + public static void Add(decimal value, bool isStatic) + { + if (value >= GradeContext.Config.MinWeight && value <= GradeContext.Config.MaxWeight) + { + _list.Add(new Tuple(value, isStatic)); + } + else + { + if (_list.Count > 0) + { + mWeighList.Enqueue(_list); + _list = new List>(); + } + } + } + } + void DisableWeight() { _mainProcessIsRun = false; diff --git a/WeighAndGrading/GradeSettingFrom.Designer.cs b/WeighAndGrading/GradeSettingFrom.Designer.cs index c9c2aa3..7c1b88c 100644 --- a/WeighAndGrading/GradeSettingFrom.Designer.cs +++ b/WeighAndGrading/GradeSettingFrom.Designer.cs @@ -42,6 +42,11 @@ this.label6 = new System.Windows.Forms.Label(); this.format = new BWP.WinFormControl.UTextBoxWithPad(); this.discont = new BWP.WinFormControl.UTextBoxWithPad(); + this.weightReadType = new System.Windows.Forms.ComboBox(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.minInput = new BWP.WinFormControl.UTextBoxWithPad(); + this.maxInput = new BWP.WinFormControl.UTextBoxWithPad(); this.SuspendLayout(); // // label5 @@ -57,7 +62,7 @@ // closeBtn // this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); - this.closeBtn.Location = new System.Drawing.Point(189, 326); + this.closeBtn.Location = new System.Drawing.Point(189, 414); this.closeBtn.Name = "closeBtn"; this.closeBtn.Size = new System.Drawing.Size(75, 35); this.closeBtn.TabIndex = 19; @@ -68,7 +73,7 @@ // saveBtn // this.saveBtn.Font = new System.Drawing.Font("宋体", 15F); - this.saveBtn.Location = new System.Drawing.Point(83, 326); + this.saveBtn.Location = new System.Drawing.Point(83, 414); this.saveBtn.Name = "saveBtn"; this.saveBtn.Size = new System.Drawing.Size(75, 35); this.saveBtn.TabIndex = 18; @@ -180,12 +185,64 @@ this.discont.TabIndex = 24; this.discont.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number; // + // weightReadType + // + this.weightReadType.Font = new System.Drawing.Font("宋体", 15F); + this.weightReadType.FormattingEnabled = true; + this.weightReadType.Location = new System.Drawing.Point(173, 321); + this.weightReadType.Name = "weightReadType"; + this.weightReadType.Size = new System.Drawing.Size(121, 28); + this.weightReadType.TabIndex = 26; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("宋体", 15F); + this.label7.Location = new System.Drawing.Point(51, 324); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(109, 20); + this.label7.TabIndex = 25; + this.label7.Text = "读取方式:"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("宋体", 15F); + this.label8.Location = new System.Drawing.Point(51, 368); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(109, 20); + this.label8.TabIndex = 27; + this.label8.Text = "有效区间:"; + // + // minInput + // + this.minInput.Font = new System.Drawing.Font("宋体", 12F); + this.minInput.Location = new System.Drawing.Point(173, 368); + this.minInput.Name = "minInput"; + this.minInput.Size = new System.Drawing.Size(55, 26); + this.minInput.TabIndex = 28; + this.minInput.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number; + // + // maxInput + // + this.maxInput.Font = new System.Drawing.Font("宋体", 12F); + this.maxInput.Location = new System.Drawing.Point(239, 368); + this.maxInput.Name = "maxInput"; + this.maxInput.Size = new System.Drawing.Size(55, 26); + this.maxInput.TabIndex = 29; + this.maxInput.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number; + // // GradeSettingFrom // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(354, 381); + this.ClientSize = new System.Drawing.Size(354, 463); this.ControlBox = false; + this.Controls.Add(this.maxInput); + this.Controls.Add(this.minInput); + this.Controls.Add(this.label8); + this.Controls.Add(this.weightReadType); + this.Controls.Add(this.label7); this.Controls.Add(this.discont); this.Controls.Add(this.format); this.Controls.Add(this.label6); @@ -225,5 +282,10 @@ private System.Windows.Forms.Label label6; private BWP.WinFormControl.UTextBoxWithPad format; private BWP.WinFormControl.UTextBoxWithPad discont; + private System.Windows.Forms.ComboBox weightReadType; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private BWP.WinFormControl.UTextBoxWithPad minInput; + private BWP.WinFormControl.UTextBoxWithPad maxInput; } } \ No newline at end of file diff --git a/WeighAndGrading/GradeSettingFrom.cs b/WeighAndGrading/GradeSettingFrom.cs index fb20f52..2a7bd38 100644 --- a/WeighAndGrading/GradeSettingFrom.cs +++ b/WeighAndGrading/GradeSettingFrom.cs @@ -16,6 +16,7 @@ namespace WeighAndGrading List com = new List { "COM1", "COM2", "COM3", "COM4", "COM5" }; List rate = new List { "4800", "7200", "9600" }; List bit = new List { "5", "6", "7", "8" }; + List weightRead = new List { "稳定读取", "连续发送" }; public GradeSettingFrom() { InitializeComponent(); @@ -23,6 +24,7 @@ namespace WeighAndGrading comSet.DataSource = com; rateSet.DataSource = rate; bitSet.DataSource = bit; + weightReadType.DataSource = weightRead; if (!string.IsNullOrEmpty(GradeContext.Config.WeightSet)) weightSet.SelectedIndex = weight.IndexOf(GradeContext.Config.WeightSet); else @@ -47,6 +49,9 @@ namespace WeighAndGrading discont.Text = "0.00"; else discont.Text = GradeContext.Config.Discont.ToString(); + weightReadType.SelectedIndex = GradeContext.Config.WeightType; + minInput.Text = GradeContext.Config.MinWeight.ToString(); + maxInput.Text = GradeContext.Config.MaxWeight.ToString(); } private void saveBtn_Click(object sender, EventArgs e) @@ -56,6 +61,18 @@ namespace WeighAndGrading GradeContext.Config.RateSet = int.Parse(rate[this.rateSet.SelectedIndex]); GradeContext.Config.BitSet = int.Parse(bit[this.bitSet.SelectedIndex]); GradeContext.Config.Format = format.Text; + GradeContext.Config.WeightType = weightReadType.SelectedIndex; + if (GradeContext.Config.WeightType == 1) + { + decimal min = 0; + decimal max = 0; + if (!decimal.TryParse(minInput.Text.Trim(), out min)) + throw new Exception("连续发送时 必须输入有效区间"); + if (!decimal.TryParse(maxInput.Text.Trim(), out max)) + throw new Exception("连续发送时 必须输入有效区间"); + GradeContext.Config.MinWeight = min; + GradeContext.Config.MaxWeight = max; + } if (!string.IsNullOrEmpty(discont.Text)) { decimal v;