Browse Source

修改。

master
yibo 8 years ago
parent
commit
b59b8274f8
7 changed files with 82 additions and 51 deletions
  1. +2
    -0
      BO/BO/Bill/OrderDetail/OrderDetail.cs
  2. +4
    -4
      BO/Utils/BillRpc/OrderDetailRpc.cs
  3. +4
    -4
      BO/Utils/BillRpc/SecondOrderRpc.cs
  4. +1
    -1
      ButcherOrder/ButcherOrderForm.cs
  5. +49
    -38
      QualityAndOrder/QualityOrderForm.Designer.cs
  6. +3
    -0
      QualityAndOrder/QualityOrderForm.resx
  7. +19
    -4
      QualityAndOrder/QualityOrderFormForTab2.cs

+ 2
- 0
BO/BO/Bill/OrderDetail/OrderDetail.cs View File

@ -27,5 +27,7 @@ namespace BO.BO.Bill
public string LiveColonyHouse_Name { get; set; }
public bool IsHurryButcher { get; set; }
public bool SecondarySplit { get; set; }
}
}

+ 4
- 4
BO/Utils/BillRpc/OrderDetailRpc.cs View File

@ -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<int>(method, id, "PlanNumber", number);
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/UpdateNum";
RpcFacade.Call<int>(method, id, number);
}
public static void UpdateHurryFlag(long id, bool flag)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/UpdateOrderProperty";
RpcFacade.Call<int>(method, id, "IsHurryButcher", flag);
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/UpdateHurryFlag";
RpcFacade.Call<int>(method, id, flag);
}
public static void Delete(long id)


+ 4
- 4
BO/Utils/BillRpc/SecondOrderRpc.cs View File

@ -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<long>(method, dJson, mJson);
order.ID = RpcFacade.Call<long>(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<int>(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<long>(method, id, mJson);
var r = RpcFacade.Call<long>(method, id, orderDetailID, mJson);
if (id == 0)
order.ID = r;
}


+ 1
- 1
ButcherOrder/ButcherOrderForm.cs View File

@ -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//查看


+ 49
- 38
QualityAndOrder/QualityOrderForm.Designer.cs View File

@ -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;


+ 3
- 0
QualityAndOrder/QualityOrderForm.resx View File

@ -216,6 +216,9 @@
<metadata name="O_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="O_SecondarySplit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="O_Order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>


+ 19
- 4
QualityAndOrder/QualityOrderFormForTab2.cs View File

@ -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();
}


Loading…
Cancel
Save