From b59b8274f8d1e3c92ef91982702c8545eb124981 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Thu, 28 Sep 2017 14:51:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/BO/Bill/OrderDetail/OrderDetail.cs | 2 + BO/Utils/BillRpc/OrderDetailRpc.cs | 8 +- BO/Utils/BillRpc/SecondOrderRpc.cs | 8 +- ButcherOrder/ButcherOrderForm.cs | 2 +- QualityAndOrder/QualityOrderForm.Designer.cs | 87 +++++++++++--------- QualityAndOrder/QualityOrderForm.resx | 3 + QualityAndOrder/QualityOrderFormForTab2.cs | 23 +++++- 7 files changed, 82 insertions(+), 51 deletions(-) diff --git a/BO/BO/Bill/OrderDetail/OrderDetail.cs b/BO/BO/Bill/OrderDetail/OrderDetail.cs index ffc7a34..11a7187 100644 --- a/BO/BO/Bill/OrderDetail/OrderDetail.cs +++ b/BO/BO/Bill/OrderDetail/OrderDetail.cs @@ -27,5 +27,7 @@ namespace BO.BO.Bill public string LiveColonyHouse_Name { get; set; } public bool IsHurryButcher { get; set; } + + public bool SecondarySplit { get; set; } } } diff --git a/BO/Utils/BillRpc/OrderDetailRpc.cs b/BO/Utils/BillRpc/OrderDetailRpc.cs index 46d19d8..70edc36 100644 --- a/BO/Utils/BillRpc/OrderDetailRpc.cs +++ b/BO/Utils/BillRpc/OrderDetailRpc.cs @@ -58,14 +58,14 @@ namespace BO.Utils.BillRpc public static void UpdateNumber(long id, int number) { - const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/UpdateOrderProperty"; - RpcFacade.Call(method, id, "PlanNumber", number); + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/UpdateNum"; + RpcFacade.Call(method, id, number); } public static void UpdateHurryFlag(long id, bool flag) { - const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/UpdateOrderProperty"; - RpcFacade.Call(method, id, "IsHurryButcher", flag); + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/UpdateHurryFlag"; + RpcFacade.Call(method, id, flag); } public static void Delete(long id) diff --git a/BO/Utils/BillRpc/SecondOrderRpc.cs b/BO/Utils/BillRpc/SecondOrderRpc.cs index 78a19c9..da57df6 100644 --- a/BO/Utils/BillRpc/SecondOrderRpc.cs +++ b/BO/Utils/BillRpc/SecondOrderRpc.cs @@ -26,22 +26,22 @@ namespace BO.Utils.BillRpc string mJson = string.Empty; if (detail.SecondOrder_ID == 0) mJson = serializer.Serialize(order); - order.ID = RpcFacade.Call(method, dJson, mJson); + order.ID = RpcFacade.Call(method, dJson, mJson, order.OrderDetail_ID); } public static void DeleteDetail(SecondOrder_Detail detail) { - const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/SecondOrderRpc/DetailDetail"; + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/SecondOrderRpc/DeleteDetail"; RpcFacade.Call(method, detail.ID, detail.SecondOrder_ID, detail.Number); } - public static void SetFinish(long id, SecondOrder order) + public static void SetFinish(long id,long orderDetailID, SecondOrder order) { const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/SecondOrderRpc/SetFinish"; string mJson = string.Empty; if (id == 0) mJson = serializer.Serialize(order); - var r = RpcFacade.Call(method, id, mJson); + var r = RpcFacade.Call(method, id, orderDetailID, mJson); if (id == 0) order.ID = r; } diff --git a/ButcherOrder/ButcherOrderForm.cs b/ButcherOrder/ButcherOrderForm.cs index 38af514..f467b86 100644 --- a/ButcherOrder/ButcherOrderForm.cs +++ b/ButcherOrder/ButcherOrderForm.cs @@ -193,7 +193,7 @@ namespace ButcherOrder if (entity.Finish) return; entity.Finish = true; - SecondOrderRpc.SetFinish(entity.ID, entity); + SecondOrderRpc.SetFinish(entity.ID, entity.OrderDetail_ID, entity); BindGrid(); } else//查看 diff --git a/QualityAndOrder/QualityOrderForm.Designer.cs b/QualityAndOrder/QualityOrderForm.Designer.cs index df45fe7..a2d4c35 100644 --- a/QualityAndOrder/QualityOrderForm.Designer.cs +++ b/QualityAndOrder/QualityOrderForm.Designer.cs @@ -110,18 +110,19 @@ 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.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_LiveColonyHouse_Name = 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.uTabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.panel1.SuspendLayout(); @@ -895,6 +896,7 @@ this.O_ID, this.O_IsHurryButcher, this.O_WeightBill_ID, + this.O_SecondarySplit, this.O_Order, this.O_B3WeighBill_ID, this.O_PlanNumber, @@ -919,6 +921,41 @@ 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(277, 9); + 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(124, 19); + 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(23, 25); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(104, 19); + this.label4.TabIndex = 35; + this.label4.Text = "过磅日期:"; + // // O_ID // this.O_ID.DataPropertyName = "ID"; @@ -943,6 +980,14 @@ this.O_WeightBill_ID.ReadOnly = true; this.O_WeightBill_ID.Visible = false; // + // O_SecondarySplit + // + this.O_SecondarySplit.DataPropertyName = "SecondarySplit"; + this.O_SecondarySplit.HeaderText = "SecondarySplit"; + this.O_SecondarySplit.Name = "O_SecondarySplit"; + this.O_SecondarySplit.ReadOnly = true; + this.O_SecondarySplit.Visible = false; + // // O_Order // this.O_Order.DataPropertyName = "Order"; @@ -998,41 +1043,6 @@ 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(277, 9); - 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(124, 19); - 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(23, 25); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(104, 19); - this.label4.TabIndex = 35; - this.label4.Text = "过磅日期:"; - // // QualityOrderForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -1137,6 +1147,7 @@ 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; diff --git a/QualityAndOrder/QualityOrderForm.resx b/QualityAndOrder/QualityOrderForm.resx index f3b08c3..b33eab2 100644 --- a/QualityAndOrder/QualityOrderForm.resx +++ b/QualityAndOrder/QualityOrderForm.resx @@ -216,6 +216,9 @@ True + + True + True diff --git a/QualityAndOrder/QualityOrderFormForTab2.cs b/QualityAndOrder/QualityOrderFormForTab2.cs index fd286b6..f7da826 100644 --- a/QualityAndOrder/QualityOrderFormForTab2.cs +++ b/QualityAndOrder/QualityOrderFormForTab2.cs @@ -211,16 +211,20 @@ namespace QualityAndOrder { if ((bool)row.Cells["O_IsHurryButcher"].Value) row.DefaultCellStyle.BackColor = Color.YellowGreen; + if ((bool)row.Cells["O_SecondarySplit"].Value) + row.DefaultCellStyle.BackColor = Color.OrangeRed; 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; + var c = orderGrid.RowsDefaultCellStyle.SelectionBackColor; if (lastOrderDetail.IsHurryButcher) cRow.DefaultCellStyle.BackColor = Color.Yellow; - else - cRow.DefaultCellStyle.BackColor = orderGrid.RowsDefaultCellStyle.SelectionBackColor; + if (lastOrderDetail.SecondarySplit) + cRow.DefaultCellStyle.BackColor = Color.OrangeRed; + cRow.DefaultCellStyle.BackColor = c; } } InitScrollBar2(); @@ -345,13 +349,24 @@ namespace QualityAndOrder { if (lastOrderDetail.ID == (long)row.Cells["O_ID"].Value) { - row.DefaultCellStyle.BackColor = lastOrderDetail.IsHurryButcher ? Color.YellowGreen : orderGrid.RowsDefaultCellStyle.BackColor; + Color c = orderGrid.RowsDefaultCellStyle.BackColor; + if (lastOrderDetail.IsHurryButcher) + c = Color.YellowGreen; + if (lastOrderDetail.SecondarySplit) + c = Color.OrangeRed; + row.DefaultCellStyle.BackColor = c; break; } } } lastOrderDetail = entity; - orderGrid.CurrentRow.DefaultCellStyle.SelectionBackColor = lastOrderDetail.IsHurryButcher ? Color.Yellow : orderGrid.RowsDefaultCellStyle.SelectionBackColor; + + var bc = orderGrid.RowsDefaultCellStyle.SelectionBackColor; + if (lastOrderDetail.IsHurryButcher) + bc = Color.Yellow; + if (lastOrderDetail.SecondarySplit) + bc = Color.OrangeRed; + orderGrid.CurrentRow.DefaultCellStyle.SelectionBackColor = bc; } orderGrid.Refresh(); }