From bfc88afd1278eabc42c3103255e0ac48cd14f664 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Wed, 15 Nov 2017 16:31:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E6=8E=89=E7=8C=AA=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/Utils/BillRpc/OrderDetailRpc.cs | 6 + DropPigReOrder/ReOrderForm.Designer.cs | 178 ++++++++++++------------- DropPigReOrder/ReOrderForm.cs | 27 +++- 3 files changed, 120 insertions(+), 91 deletions(-) diff --git a/BO/Utils/BillRpc/OrderDetailRpc.cs b/BO/Utils/BillRpc/OrderDetailRpc.cs index 0b869bc..b0ee902 100644 --- a/BO/Utils/BillRpc/OrderDetailRpc.cs +++ b/BO/Utils/BillRpc/OrderDetailRpc.cs @@ -155,5 +155,11 @@ namespace BO.Utils.BillRpc result = result.ESerializeDateTime(); return serializer.Deserialize>(result); } + + public static int InsertDropPig(long orderID, int number, short type) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/DropPigRpc/InsertDropPig"; + return RpcFacade.Call(method, orderID, number, type); + } } } diff --git a/DropPigReOrder/ReOrderForm.Designer.cs b/DropPigReOrder/ReOrderForm.Designer.cs index ba5dac5..48bcbaf 100644 --- a/DropPigReOrder/ReOrderForm.Designer.cs +++ b/DropPigReOrder/ReOrderForm.Designer.cs @@ -28,20 +28,13 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = 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(); this.syncBtn = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); this.uDatePicker1 = new BWP.WinFormControl.UDatePicker(); this.orderGridView = new BWP.WinFormControl.UDataGridView(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.uTextBoxWithPad1 = new BWP.WinFormControl.UTextBoxWithPad(); - this.uTextBoxWithPad2 = new BWP.WinFormControl.UTextBoxWithPad(); - this.OkBtn = new System.Windows.Forms.Button(); - this.ExistBtn = new System.Windows.Forms.Button(); - this.vScrollBar1 = new System.Windows.Forms.VScrollBar(); this.D_OrderDetail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -49,6 +42,13 @@ this.D_HotFadeNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_MaoNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.maoInput = new BWP.WinFormControl.UTextBoxWithPad(); + this.tangInput = new BWP.WinFormControl.UTextBoxWithPad(); + this.OkBtn = new System.Windows.Forms.Button(); + this.ExistBtn = new System.Windows.Forms.Button(); + this.vScrollBar1 = new System.Windows.Forms.VScrollBar(); ((System.ComponentModel.ISupportInitialize)(this.orderGridView)).BeginInit(); this.SuspendLayout(); // @@ -93,17 +93,17 @@ this.orderGridView.AllowUserToDeleteRows = false; this.orderGridView.AllowUserToResizeColumns = false; this.orderGridView.AllowUserToResizeRows = false; - dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.orderGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.orderGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.orderGridView.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.orderGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; + 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.orderGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.orderGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.orderGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.D_OrderDetail_ID, @@ -117,9 +117,9 @@ this.orderGridView.MultiSelect = false; this.orderGridView.Name = "orderGridView"; this.orderGridView.RowHeadersVisible = false; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.orderGridView.RowsDefaultCellStyle = dataGridViewCellStyle9; + 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.orderGridView.RowsDefaultCellStyle = dataGridViewCellStyle3; this.orderGridView.RowTemplate.Height = 60; this.orderGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; this.orderGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -127,6 +127,54 @@ this.orderGridView.TabIndex = 13; this.orderGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGridView_CellClick); // + // D_OrderDetail_ID + // + this.D_OrderDetail_ID.DataPropertyName = "OrderDetail_ID"; + this.D_OrderDetail_ID.HeaderText = "OrderDetail_ID"; + this.D_OrderDetail_ID.Name = "D_OrderDetail_ID"; + this.D_OrderDetail_ID.Visible = false; + // + // D_IsDrop + // + this.D_IsDrop.DataPropertyName = "IsDrop"; + this.D_IsDrop.HeaderText = "IsDrop"; + this.D_IsDrop.Name = "D_IsDrop"; + this.D_IsDrop.Visible = false; + // + // D_Order + // + this.D_Order.DataPropertyName = "Order"; + this.D_Order.HeaderText = "序号"; + this.D_Order.Name = "D_Order"; + // + // D_B3WeighBill_ID + // + this.D_B3WeighBill_ID.DataPropertyName = "B3WeighBill_ID"; + this.D_B3WeighBill_ID.HeaderText = "磅单号"; + this.D_B3WeighBill_ID.Name = "D_B3WeighBill_ID"; + this.D_B3WeighBill_ID.Width = 110; + // + // D_HotFadeNumber + // + this.D_HotFadeNumber.DataPropertyName = "HotFadeNumber"; + this.D_HotFadeNumber.HeaderText = "烫褪头数"; + this.D_HotFadeNumber.Name = "D_HotFadeNumber"; + this.D_HotFadeNumber.Width = 110; + // + // D_MaoNumber + // + this.D_MaoNumber.DataPropertyName = "MaoNumber"; + this.D_MaoNumber.HeaderText = "毛剥头数"; + this.D_MaoNumber.Name = "D_MaoNumber"; + this.D_MaoNumber.Width = 110; + // + // D_PlanNumber + // + this.D_PlanNumber.DataPropertyName = "PlanNumber"; + this.D_PlanNumber.HeaderText = "头数"; + this.D_PlanNumber.Name = "D_PlanNumber"; + this.D_PlanNumber.Width = 110; + // // label2 // this.label2.AutoSize = true; @@ -147,23 +195,23 @@ this.label3.TabIndex = 14; this.label3.Text = "掉猪毛剥头数:"; // - // uTextBoxWithPad1 + // maoInput // - this.uTextBoxWithPad1.Font = new System.Drawing.Font("宋体", 20F); - this.uTextBoxWithPad1.Location = new System.Drawing.Point(817, 184); - this.uTextBoxWithPad1.Name = "uTextBoxWithPad1"; - this.uTextBoxWithPad1.Size = new System.Drawing.Size(129, 38); - this.uTextBoxWithPad1.TabIndex = 15; - this.uTextBoxWithPad1.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number; + this.maoInput.Font = new System.Drawing.Font("宋体", 20F); + this.maoInput.Location = new System.Drawing.Point(817, 184); + this.maoInput.Name = "maoInput"; + this.maoInput.Size = new System.Drawing.Size(129, 38); + this.maoInput.TabIndex = 15; + this.maoInput.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number; // - // uTextBoxWithPad2 + // tangInput // - this.uTextBoxWithPad2.Font = new System.Drawing.Font("宋体", 20F); - this.uTextBoxWithPad2.Location = new System.Drawing.Point(817, 94); - this.uTextBoxWithPad2.Name = "uTextBoxWithPad2"; - this.uTextBoxWithPad2.Size = new System.Drawing.Size(129, 38); - this.uTextBoxWithPad2.TabIndex = 15; - this.uTextBoxWithPad2.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number; + this.tangInput.Font = new System.Drawing.Font("宋体", 20F); + this.tangInput.Location = new System.Drawing.Point(817, 94); + this.tangInput.Name = "tangInput"; + this.tangInput.Size = new System.Drawing.Size(129, 38); + this.tangInput.TabIndex = 15; + this.tangInput.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number; // // OkBtn // @@ -194,54 +242,6 @@ this.vScrollBar1.Size = new System.Drawing.Size(40, 521); this.vScrollBar1.TabIndex = 53; // - // D_OrderDetail_ID - // - this.D_OrderDetail_ID.DataPropertyName = "OrderDetail_ID"; - this.D_OrderDetail_ID.HeaderText = "OrderDetail_ID"; - this.D_OrderDetail_ID.Name = "D_OrderDetail_ID"; - this.D_OrderDetail_ID.Visible = false; - // - // D_IsDrop - // - this.D_IsDrop.DataPropertyName = "IsDrop"; - this.D_IsDrop.HeaderText = "IsDrop"; - this.D_IsDrop.Name = "D_IsDrop"; - this.D_IsDrop.Visible = false; - // - // D_Order - // - this.D_Order.DataPropertyName = "Order"; - this.D_Order.HeaderText = "序号"; - this.D_Order.Name = "D_Order"; - // - // D_B3WeighBill_ID - // - this.D_B3WeighBill_ID.DataPropertyName = "B3WeighBill_ID"; - this.D_B3WeighBill_ID.HeaderText = "磅单号"; - this.D_B3WeighBill_ID.Name = "D_B3WeighBill_ID"; - this.D_B3WeighBill_ID.Width = 110; - // - // D_HotFadeNumber - // - this.D_HotFadeNumber.DataPropertyName = "HotFadeNumber"; - this.D_HotFadeNumber.HeaderText = "烫褪头数"; - this.D_HotFadeNumber.Name = "D_HotFadeNumber"; - this.D_HotFadeNumber.Width = 110; - // - // D_MaoNumber - // - this.D_MaoNumber.DataPropertyName = "MaoNumber"; - this.D_MaoNumber.HeaderText = "毛剥头数"; - this.D_MaoNumber.Name = "D_MaoNumber"; - this.D_MaoNumber.Width = 110; - // - // D_PlanNumber - // - this.D_PlanNumber.DataPropertyName = "PlanNumber"; - this.D_PlanNumber.HeaderText = "头数"; - this.D_PlanNumber.Name = "D_PlanNumber"; - this.D_PlanNumber.Width = 110; - // // ReOrderForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -250,8 +250,8 @@ this.Controls.Add(this.vScrollBar1); this.Controls.Add(this.ExistBtn); this.Controls.Add(this.OkBtn); - this.Controls.Add(this.uTextBoxWithPad2); - this.Controls.Add(this.uTextBoxWithPad1); + this.Controls.Add(this.tangInput); + this.Controls.Add(this.maoInput); this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.Controls.Add(this.orderGridView); @@ -277,8 +277,8 @@ private BWP.WinFormControl.UDataGridView orderGridView; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private BWP.WinFormControl.UTextBoxWithPad uTextBoxWithPad1; - private BWP.WinFormControl.UTextBoxWithPad uTextBoxWithPad2; + private BWP.WinFormControl.UTextBoxWithPad maoInput; + private BWP.WinFormControl.UTextBoxWithPad tangInput; private System.Windows.Forms.Button OkBtn; private System.Windows.Forms.Button ExistBtn; private System.Windows.Forms.VScrollBar vScrollBar1; diff --git a/DropPigReOrder/ReOrderForm.cs b/DropPigReOrder/ReOrderForm.cs index 6dbd3ad..dad4c82 100644 --- a/DropPigReOrder/ReOrderForm.cs +++ b/DropPigReOrder/ReOrderForm.cs @@ -1,6 +1,7 @@ using BO.BO.Bill; using BO.Utils; using BO.Utils.BillRpc; +using BWP.WinFormControl; using System; using System.Collections.Generic; using System.ComponentModel; @@ -122,8 +123,30 @@ namespace DropPigReOrder { if (lastSelect == null) throw new Exception("请选选择掉猪的行记录"); - - + bool ok = false; + List order = new List(); + if (string.IsNullOrEmpty(tangInput.Text)) + { + var num = int.Parse(tangInput.Text); + if (num != 0) + { + ok = true; + order.Add(OrderDetailRpc.InsertDropPig(lastSelect.OrderDetail_ID, num, 0)); + } + } + if (string.IsNullOrEmpty(maoInput.Text)) + { + var num = int.Parse(maoInput.Text); + if (num != 0) + { + ok = true; + order.Add(OrderDetailRpc.InsertDropPig(lastSelect.OrderDetail_ID, num, 1)); + } + } + if (ok) + UMessageBox.Show(string.Format("处理成功!新的排宰顺序号为:{0}", string.Join("、", order)), "成功提示"); + else + UMessageBox.Show("请输入烫褪或毛剥头数", "错误"); } private void existBtn_Click(object sender, EventArgs e)