From 8ea3694e0846e9d25640d2cfc7c850e38c44cfef Mon Sep 17 00:00:00 2001
From: yibo <361071264@qq.com>
Date: Fri, 20 Oct 2017 20:23:57 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E6=89=93=E5=8D=B0=E6=AC=A1=E6=95=B0?=
=?UTF-8?q?=EF=BC=8C=E6=89=93=E5=8D=B0=E5=90=8E=20=E8=A1=8C=E5=BA=95?=
=?UTF-8?q?=E8=89=B2=E5=8F=98=E5=8C=96=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BO/BO/Bill/WeightBill/WeightBill.cs | 3 +
BO/BO/Bill/WeightBill/WeightBillList.cs | 2 +
ButcherWeight/WeightForm.Designer.cs | 231 +++++++++++++-----------
ButcherWeight/WeightForm.cs | 16 ++
ButcherWeight/WeightForm.resx | 3 +
5 files changed, 145 insertions(+), 110 deletions(-)
diff --git a/BO/BO/Bill/WeightBill/WeightBill.cs b/BO/BO/Bill/WeightBill/WeightBill.cs
index 2476ac9..c03eca8 100644
--- a/BO/BO/Bill/WeightBill/WeightBill.cs
+++ b/BO/BO/Bill/WeightBill/WeightBill.cs
@@ -12,6 +12,9 @@ namespace BO.BO
public class WeightBill
{
public int RowVersion { get; set; }
+
+ public int PrintNumber { get; set; }
+
public long ID { get; set; }
public long? B3ID { get; set; }
diff --git a/BO/BO/Bill/WeightBill/WeightBillList.cs b/BO/BO/Bill/WeightBill/WeightBillList.cs
index 50774f5..3121a20 100644
--- a/BO/BO/Bill/WeightBill/WeightBillList.cs
+++ b/BO/BO/Bill/WeightBill/WeightBillList.cs
@@ -31,5 +31,7 @@ namespace BO.BO
public string Remark { get; set; }
public bool FinishWeight { get; set; }
+
+ public int PrintNumber { get; set; }
}
}
diff --git a/ButcherWeight/WeightForm.Designer.cs b/ButcherWeight/WeightForm.Designer.cs
index 8a9e5d7..033a531 100644
--- a/ButcherWeight/WeightForm.Designer.cs
+++ b/ButcherWeight/WeightForm.Designer.cs
@@ -135,18 +135,6 @@
this.S_AbnormalItem_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.S_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.billGrid = new System.Windows.Forms.DataGridView();
- this.M_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.M_FinishWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.M_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.M_Car_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.M_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.M_Employee_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.M_PurchaseType_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.M_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.M_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.M_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.M_SanctionMoney = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.M_Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
@@ -161,6 +149,19 @@
this.farmerMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.farmerDelete = new System.Windows.Forms.ToolStripMenuItem();
this.viewDetailBtn = new System.Windows.Forms.Button();
+ this.M_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.M_FinishWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.M_PrintNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.M_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.M_Car_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.M_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.M_Employee_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.M_PurchaseType_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.M_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.M_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.M_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.M_SanctionMoney = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.M_Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
@@ -1168,6 +1169,7 @@
this.billGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.M_ID,
this.M_FinishWeight,
+ this.M_PrintNumber,
this.M_B3ID,
this.M_Car_Name,
this.M_Supplier_Name,
@@ -1192,104 +1194,6 @@
this.billGrid.TabIndex = 0;
this.billGrid.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.billGrid_CellDoubleClick);
//
- // M_ID
- //
- this.M_ID.DataPropertyName = "ID";
- this.M_ID.HeaderText = "ID";
- this.M_ID.Name = "M_ID";
- this.M_ID.ReadOnly = true;
- this.M_ID.Visible = false;
- //
- // M_FinishWeight
- //
- this.M_FinishWeight.DataPropertyName = "FinishWeight";
- this.M_FinishWeight.HeaderText = "FinishWeight";
- this.M_FinishWeight.Name = "M_FinishWeight";
- this.M_FinishWeight.ReadOnly = true;
- this.M_FinishWeight.Visible = false;
- //
- // M_B3ID
- //
- this.M_B3ID.DataPropertyName = "B3ID";
- this.M_B3ID.HeaderText = "过磅单号";
- this.M_B3ID.Name = "M_B3ID";
- this.M_B3ID.ReadOnly = true;
- //
- // M_Car_Name
- //
- this.M_Car_Name.DataPropertyName = "Car_Name";
- this.M_Car_Name.HeaderText = "车辆";
- this.M_Car_Name.Name = "M_Car_Name";
- this.M_Car_Name.ReadOnly = true;
- this.M_Car_Name.Width = 120;
- //
- // M_Supplier_Name
- //
- this.M_Supplier_Name.DataPropertyName = "Supplier_Name";
- this.M_Supplier_Name.HeaderText = "供应商";
- this.M_Supplier_Name.Name = "M_Supplier_Name";
- this.M_Supplier_Name.ReadOnly = true;
- this.M_Supplier_Name.Width = 120;
- //
- // M_Employee_Name
- //
- this.M_Employee_Name.DataPropertyName = "Employee_Name";
- this.M_Employee_Name.HeaderText = "业务员";
- this.M_Employee_Name.Name = "M_Employee_Name";
- this.M_Employee_Name.ReadOnly = true;
- this.M_Employee_Name.Width = 110;
- //
- // M_PurchaseType_Name
- //
- this.M_PurchaseType_Name.DataPropertyName = "PurchaseType_Name";
- this.M_PurchaseType_Name.HeaderText = "收购类型";
- this.M_PurchaseType_Name.Name = "M_PurchaseType_Name";
- this.M_PurchaseType_Name.ReadOnly = true;
- this.M_PurchaseType_Name.Width = 110;
- //
- // M_Number
- //
- this.M_Number.DataPropertyName = "Number";
- this.M_Number.HeaderText = "收购头数";
- this.M_Number.Name = "M_Number";
- this.M_Number.ReadOnly = true;
- this.M_Number.Width = 110;
- //
- // M_Weight
- //
- this.M_Weight.DataPropertyName = "Weight";
- dataGridViewCellStyle19.Format = "#0.######";
- this.M_Weight.DefaultCellStyle = dataGridViewCellStyle19;
- this.M_Weight.HeaderText = "收购重量";
- this.M_Weight.Name = "M_Weight";
- this.M_Weight.ReadOnly = true;
- this.M_Weight.Width = 120;
- //
- // M_HouseNames
- //
- this.M_HouseNames.DataPropertyName = "HouseNames";
- this.M_HouseNames.HeaderText = "圈舍";
- this.M_HouseNames.Name = "M_HouseNames";
- this.M_HouseNames.ReadOnly = true;
- this.M_HouseNames.Width = 180;
- //
- // M_SanctionMoney
- //
- this.M_SanctionMoney.DataPropertyName = "SanctionMoney";
- dataGridViewCellStyle20.Format = "#0.######";
- this.M_SanctionMoney.DefaultCellStyle = dataGridViewCellStyle20;
- this.M_SanctionMoney.HeaderText = "异常明细";
- this.M_SanctionMoney.Name = "M_SanctionMoney";
- this.M_SanctionMoney.ReadOnly = true;
- //
- // M_Remark
- //
- this.M_Remark.DataPropertyName = "Remark";
- this.M_Remark.HeaderText = "摘要";
- this.M_Remark.Name = "M_Remark";
- this.M_Remark.ReadOnly = true;
- this.M_Remark.Width = 130;
- //
// label15
//
this.label15.AutoSize = true;
@@ -1425,6 +1329,112 @@
this.viewDetailBtn.UseVisualStyleBackColor = true;
this.viewDetailBtn.Click += new System.EventHandler(this.viewDetailBtn_Click);
//
+ // M_ID
+ //
+ this.M_ID.DataPropertyName = "ID";
+ this.M_ID.HeaderText = "ID";
+ this.M_ID.Name = "M_ID";
+ this.M_ID.ReadOnly = true;
+ this.M_ID.Visible = false;
+ //
+ // M_FinishWeight
+ //
+ this.M_FinishWeight.DataPropertyName = "FinishWeight";
+ this.M_FinishWeight.HeaderText = "FinishWeight";
+ this.M_FinishWeight.Name = "M_FinishWeight";
+ this.M_FinishWeight.ReadOnly = true;
+ this.M_FinishWeight.Visible = false;
+ //
+ // M_PrintNumber
+ //
+ this.M_PrintNumber.DataPropertyName = "PrintNumber";
+ this.M_PrintNumber.HeaderText = "PrintNumber";
+ this.M_PrintNumber.Name = "M_PrintNumber";
+ this.M_PrintNumber.ReadOnly = true;
+ this.M_PrintNumber.Visible = false;
+ //
+ // M_B3ID
+ //
+ this.M_B3ID.DataPropertyName = "B3ID";
+ this.M_B3ID.HeaderText = "过磅单号";
+ this.M_B3ID.Name = "M_B3ID";
+ this.M_B3ID.ReadOnly = true;
+ //
+ // M_Car_Name
+ //
+ this.M_Car_Name.DataPropertyName = "Car_Name";
+ this.M_Car_Name.HeaderText = "车辆";
+ this.M_Car_Name.Name = "M_Car_Name";
+ this.M_Car_Name.ReadOnly = true;
+ this.M_Car_Name.Width = 120;
+ //
+ // M_Supplier_Name
+ //
+ this.M_Supplier_Name.DataPropertyName = "Supplier_Name";
+ this.M_Supplier_Name.HeaderText = "供应商";
+ this.M_Supplier_Name.Name = "M_Supplier_Name";
+ this.M_Supplier_Name.ReadOnly = true;
+ this.M_Supplier_Name.Width = 120;
+ //
+ // M_Employee_Name
+ //
+ this.M_Employee_Name.DataPropertyName = "Employee_Name";
+ this.M_Employee_Name.HeaderText = "业务员";
+ this.M_Employee_Name.Name = "M_Employee_Name";
+ this.M_Employee_Name.ReadOnly = true;
+ this.M_Employee_Name.Width = 110;
+ //
+ // M_PurchaseType_Name
+ //
+ this.M_PurchaseType_Name.DataPropertyName = "PurchaseType_Name";
+ this.M_PurchaseType_Name.HeaderText = "收购类型";
+ this.M_PurchaseType_Name.Name = "M_PurchaseType_Name";
+ this.M_PurchaseType_Name.ReadOnly = true;
+ this.M_PurchaseType_Name.Width = 110;
+ //
+ // M_Number
+ //
+ this.M_Number.DataPropertyName = "Number";
+ this.M_Number.HeaderText = "收购头数";
+ this.M_Number.Name = "M_Number";
+ this.M_Number.ReadOnly = true;
+ this.M_Number.Width = 110;
+ //
+ // M_Weight
+ //
+ this.M_Weight.DataPropertyName = "Weight";
+ dataGridViewCellStyle19.Format = "#0.######";
+ this.M_Weight.DefaultCellStyle = dataGridViewCellStyle19;
+ this.M_Weight.HeaderText = "收购重量";
+ this.M_Weight.Name = "M_Weight";
+ this.M_Weight.ReadOnly = true;
+ this.M_Weight.Width = 120;
+ //
+ // M_HouseNames
+ //
+ this.M_HouseNames.DataPropertyName = "HouseNames";
+ this.M_HouseNames.HeaderText = "圈舍";
+ this.M_HouseNames.Name = "M_HouseNames";
+ this.M_HouseNames.ReadOnly = true;
+ this.M_HouseNames.Width = 180;
+ //
+ // M_SanctionMoney
+ //
+ this.M_SanctionMoney.DataPropertyName = "SanctionMoney";
+ dataGridViewCellStyle20.Format = "#0.######";
+ this.M_SanctionMoney.DefaultCellStyle = dataGridViewCellStyle20;
+ this.M_SanctionMoney.HeaderText = "异常明细";
+ this.M_SanctionMoney.Name = "M_SanctionMoney";
+ this.M_SanctionMoney.ReadOnly = true;
+ //
+ // M_Remark
+ //
+ this.M_Remark.DataPropertyName = "Remark";
+ this.M_Remark.HeaderText = "摘要";
+ this.M_Remark.Name = "M_Remark";
+ this.M_Remark.ReadOnly = true;
+ this.M_Remark.Width = 130;
+ //
// WeightForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1574,6 +1584,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn F_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn M_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn M_FinishWeight;
+ private System.Windows.Forms.DataGridViewTextBoxColumn M_PrintNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn M_B3ID;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Car_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Supplier_Name;
diff --git a/ButcherWeight/WeightForm.cs b/ButcherWeight/WeightForm.cs
index c2014d7..155b902 100644
--- a/ButcherWeight/WeightForm.cs
+++ b/ButcherWeight/WeightForm.cs
@@ -115,6 +115,8 @@ namespace ButcherWeight
{
if ((bool)row.Cells["M_FinishWeight"].Value)
row.DefaultCellStyle.BackColor = Color.YellowGreen;
+ if ((int)row.Cells["M_PrintNumber"].Value > 0)
+ row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#CC9999");
}
billGrid.Refresh();
}
@@ -530,6 +532,20 @@ namespace ButcherWeight
ClientPrint.BwpClientPrint print = new ClientPrint.BwpClientPrint("WeightBillPrint.xaml", entity, new DocumentRenderer());
print.PrintDirect();
WeightBillRpc.DoCheck(Dmo.ID);
+ var first = dmoList.FirstOrDefault(x => x.ID == Dmo.ID);
+ if (first != null)
+ {
+ first.PrintNumber += 1;
+ foreach (DataGridViewRow row in billGrid.Rows)
+ {
+ if ((long)row.Cells["M_ID"].Value == Dmo.ID)
+ {
+ row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#CC9999");
+ break;
+ }
+ }
+ billGrid.Refresh();
+ }
}
}
}
\ No newline at end of file
diff --git a/ButcherWeight/WeightForm.resx b/ButcherWeight/WeightForm.resx
index d6319aa..accb5ec 100644
--- a/ButcherWeight/WeightForm.resx
+++ b/ButcherWeight/WeightForm.resx
@@ -204,6 +204,9 @@
True
+
+ True
+
True