Browse Source

加掉猪业务。

master
yibo 8 years ago
parent
commit
bfc88afd12
3 changed files with 120 additions and 91 deletions
  1. +6
    -0
      BO/Utils/BillRpc/OrderDetailRpc.cs
  2. +89
    -89
      DropPigReOrder/ReOrderForm.Designer.cs
  3. +25
    -2
      DropPigReOrder/ReOrderForm.cs

+ 6
- 0
BO/Utils/BillRpc/OrderDetailRpc.cs View File

@ -155,5 +155,11 @@ namespace BO.Utils.BillRpc
result = result.ESerializeDateTime(); result = result.ESerializeDateTime();
return serializer.Deserialize<List<DropPigOrderList>>(result); return serializer.Deserialize<List<DropPigOrderList>>(result);
} }
public static int InsertDropPig(long orderID, int number, short type)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/DropPigRpc/InsertDropPig";
return RpcFacade.Call<int>(method, orderID, number, type);
}
} }
} }

+ 89
- 89
DropPigReOrder/ReOrderForm.Designer.cs View File

@ -28,20 +28,13 @@
/// </summary> /// </summary>
private void InitializeComponent() 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.syncBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.uDatePicker1 = new BWP.WinFormControl.UDatePicker(); this.uDatePicker1 = new BWP.WinFormControl.UDatePicker();
this.orderGridView = new BWP.WinFormControl.UDataGridView(); 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_OrderDetail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Order = 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_HotFadeNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_MaoNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_MaoNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_PlanNumber = 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(); ((System.ComponentModel.ISupportInitialize)(this.orderGridView)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -93,17 +93,17 @@
this.orderGridView.AllowUserToDeleteRows = false; this.orderGridView.AllowUserToDeleteRows = false;
this.orderGridView.AllowUserToResizeColumns = false; this.orderGridView.AllowUserToResizeColumns = false;
this.orderGridView.AllowUserToResizeRows = 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; 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.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.orderGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.orderGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.D_OrderDetail_ID, this.D_OrderDetail_ID,
@ -117,9 +117,9 @@
this.orderGridView.MultiSelect = false; this.orderGridView.MultiSelect = false;
this.orderGridView.Name = "orderGridView"; this.orderGridView.Name = "orderGridView";
this.orderGridView.RowHeadersVisible = false; 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.RowTemplate.Height = 60;
this.orderGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; this.orderGridView.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.orderGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.orderGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@ -127,6 +127,54 @@
this.orderGridView.TabIndex = 13; this.orderGridView.TabIndex = 13;
this.orderGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGridView_CellClick); 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 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
@ -147,23 +195,23 @@
this.label3.TabIndex = 14; this.label3.TabIndex = 14;
this.label3.Text = "掉猪毛剥头数:"; 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 // OkBtn
// //
@ -194,54 +242,6 @@
this.vScrollBar1.Size = new System.Drawing.Size(40, 521); this.vScrollBar1.Size = new System.Drawing.Size(40, 521);
this.vScrollBar1.TabIndex = 53; 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 // ReOrderForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -250,8 +250,8 @@
this.Controls.Add(this.vScrollBar1); this.Controls.Add(this.vScrollBar1);
this.Controls.Add(this.ExistBtn); this.Controls.Add(this.ExistBtn);
this.Controls.Add(this.OkBtn); 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.label3);
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
this.Controls.Add(this.orderGridView); this.Controls.Add(this.orderGridView);
@ -277,8 +277,8 @@
private BWP.WinFormControl.UDataGridView orderGridView; private BWP.WinFormControl.UDataGridView orderGridView;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3; 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 OkBtn;
private System.Windows.Forms.Button ExistBtn; private System.Windows.Forms.Button ExistBtn;
private System.Windows.Forms.VScrollBar vScrollBar1; private System.Windows.Forms.VScrollBar vScrollBar1;


+ 25
- 2
DropPigReOrder/ReOrderForm.cs View File

@ -1,6 +1,7 @@
using BO.BO.Bill; using BO.BO.Bill;
using BO.Utils; using BO.Utils;
using BO.Utils.BillRpc; using BO.Utils.BillRpc;
using BWP.WinFormControl;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@ -122,8 +123,30 @@ namespace DropPigReOrder
{ {
if (lastSelect == null) if (lastSelect == null)
throw new Exception("请选选择掉猪的行记录"); throw new Exception("请选选择掉猪的行记录");
bool ok = false;
List<int> order = new List<int>();
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) private void existBtn_Click(object sender, EventArgs e)


Loading…
Cancel
Save