Browse Source

过磅单 选择养殖户 加养殖户具体信息,信息不全不允许打印。

分割品称重 加组的概念。一组一称重。
master
yibo 7 years ago
parent
commit
e427a7707c
9 changed files with 435 additions and 220 deletions
  1. +1
    -0
      BO/BO.csproj
  2. +19
    -0
      BO/BO/BaseInfo/Farmer.cs
  3. +8
    -0
      BO/BO/Bill/WeightBill/WeightBill.cs
  4. +7
    -0
      BO/Utils/BillRpc/WeightBillRpc.cs
  5. +113
    -13
      ButcherWeight/WeightForm.Designer.cs
  6. +43
    -2
      ButcherWeight/WeightForm.cs
  7. +183
    -169
      MaterialRequisition/MaterialRequisitionForm.Designer.cs
  8. +46
    -21
      MaterialRequisition/MaterialRequisitionForm.cs
  9. +15
    -15
      MaterialRequisition/MaterialRequisitionForm.resx

+ 1
- 0
BO/BO.csproj View File

@ -69,6 +69,7 @@
<Compile Include="BO\BaseInfo\BodyDiscontItem.cs" /> <Compile Include="BO\BaseInfo\BodyDiscontItem.cs" />
<Compile Include="BO\BaseInfo\Customer.cs" /> <Compile Include="BO\BaseInfo\Customer.cs" />
<Compile Include="BO\BaseInfo\DeliverGoodsLine.cs" /> <Compile Include="BO\BaseInfo\DeliverGoodsLine.cs" />
<Compile Include="BO\BaseInfo\Farmer.cs" />
<Compile Include="BO\Bill\CarcassStateWeight\CarcassStateWeight.cs" /> <Compile Include="BO\Bill\CarcassStateWeight\CarcassStateWeight.cs" />
<Compile Include="BO\Bill\GradeAndWeight\DataConfirmList.cs" /> <Compile Include="BO\Bill\GradeAndWeight\DataConfirmList.cs" />
<Compile Include="BO\Bill\GradeAndWeight\GradeAndWeight.cs" /> <Compile Include="BO\Bill\GradeAndWeight\GradeAndWeight.cs" />


+ 19
- 0
BO/BO/BaseInfo/Farmer.cs View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BO.BO.BaseInfo
{
public class Farmer
{
public string Name { get; set; }
public string IDCard { get; set; }
public string Tel { get; set; }
public string Address { get; set; }
}
}

+ 8
- 0
BO/BO/Bill/WeightBill/WeightBill.cs View File

@ -80,6 +80,14 @@ namespace BO.BO
public string Remark { get; set; } public string Remark { get; set; }
public string Farmer_Name { get; set; }
public string Farmer_IDCard { get; set; }
public string Farmer_Tel { get; set; }
public string Farmer_Address { get; set; }
private List<WeightBill_Detail> _details = new List<WeightBill_Detail>(); private List<WeightBill_Detail> _details = new List<WeightBill_Detail>();
public List<WeightBill_Detail> Details { get { return _details; } set { _details = value; } } public List<WeightBill_Detail> Details { get { return _details; } set { _details = value; } }


+ 7
- 0
BO/Utils/BillRpc/WeightBillRpc.cs View File

@ -1,4 +1,5 @@
using BO.BO; using BO.BO;
using BO.BO.BaseInfo;
using Forks.JsonRpc.Client; using Forks.JsonRpc.Client;
using Forks.JsonRpc.Client.Data; using Forks.JsonRpc.Client.Data;
using System; using System;
@ -118,5 +119,11 @@ namespace BO.Utils.BillRpc
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/GetSupplierBankAccount"; const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/GetSupplierBankAccount";
return RpcFacade.Call<string>(method, id); return RpcFacade.Call<string>(method, id);
} }
public static Farmer GetFarmerInfo(long id)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/GetFarmerInfo";
return serializer.Deserialize<Farmer>(RpcFacade.Call<string>(method, id));
}
} }
} }

+ 113
- 13
ButcherWeight/WeightForm.Designer.cs View File

@ -62,6 +62,14 @@
this.readPiBtn = new System.Windows.Forms.Button(); this.readPiBtn = new System.Windows.Forms.Button();
this.readMaoBtn = new System.Windows.Forms.Button(); this.readMaoBtn = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.yzhAddress = new System.Windows.Forms.Label();
this.yzhTel = new System.Windows.Forms.Label();
this.yzhName = new System.Windows.Forms.Label();
this.yzhIDCard = new System.Windows.Forms.Label();
this.label29 = new System.Windows.Forms.Label();
this.label30 = new System.Windows.Forms.Label();
this.label27 = new System.Windows.Forms.Label();
this.label28 = new System.Windows.Forms.Label();
this.bankAccountLabel = new System.Windows.Forms.Label(); this.bankAccountLabel = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label(); this.label22 = new System.Windows.Forms.Label();
this.discontInput = new System.Windows.Forms.TextBox(); this.discontInput = new System.Windows.Forms.TextBox();
@ -302,6 +310,14 @@
// panel2 // panel2
// //
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.yzhAddress);
this.panel2.Controls.Add(this.yzhTel);
this.panel2.Controls.Add(this.yzhName);
this.panel2.Controls.Add(this.yzhIDCard);
this.panel2.Controls.Add(this.label29);
this.panel2.Controls.Add(this.label30);
this.panel2.Controls.Add(this.label27);
this.panel2.Controls.Add(this.label28);
this.panel2.Controls.Add(this.bankAccountLabel); this.panel2.Controls.Add(this.bankAccountLabel);
this.panel2.Controls.Add(this.label22); this.panel2.Controls.Add(this.label22);
this.panel2.Controls.Add(this.discontInput); this.panel2.Controls.Add(this.discontInput);
@ -342,9 +358,85 @@
this.panel2.Controls.Add(this.tableLayoutPanel2); this.panel2.Controls.Add(this.tableLayoutPanel2);
this.panel2.Location = new System.Drawing.Point(13, 115); this.panel2.Location = new System.Drawing.Point(13, 115);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1251, 170);
this.panel2.Size = new System.Drawing.Size(1251, 205);
this.panel2.TabIndex = 2; this.panel2.TabIndex = 2;
// //
// yzhAddress
//
this.yzhAddress.AutoSize = true;
this.yzhAddress.Font = new System.Drawing.Font("宋体", 11F);
this.yzhAddress.Location = new System.Drawing.Point(850, 176);
this.yzhAddress.Name = "yzhAddress";
this.yzhAddress.Size = new System.Drawing.Size(0, 15);
this.yzhAddress.TabIndex = 53;
//
// yzhTel
//
this.yzhTel.AutoSize = true;
this.yzhTel.Font = new System.Drawing.Font("宋体", 14F);
this.yzhTel.Location = new System.Drawing.Point(595, 176);
this.yzhTel.Name = "yzhTel";
this.yzhTel.Size = new System.Drawing.Size(0, 19);
this.yzhTel.TabIndex = 52;
//
// yzhName
//
this.yzhName.AutoSize = true;
this.yzhName.Font = new System.Drawing.Font("宋体", 14F);
this.yzhName.Location = new System.Drawing.Point(104, 176);
this.yzhName.Name = "yzhName";
this.yzhName.Size = new System.Drawing.Size(0, 19);
this.yzhName.TabIndex = 51;
//
// yzhIDCard
//
this.yzhIDCard.AutoSize = true;
this.yzhIDCard.Font = new System.Drawing.Font("宋体", 11F);
this.yzhIDCard.Location = new System.Drawing.Point(344, 176);
this.yzhIDCard.Name = "yzhIDCard";
this.yzhIDCard.Size = new System.Drawing.Size(0, 15);
this.yzhIDCard.TabIndex = 50;
//
// label29
//
this.label29.AutoSize = true;
this.label29.Font = new System.Drawing.Font("宋体", 14F);
this.label29.Location = new System.Drawing.Point(757, 176);
this.label29.Name = "label29";
this.label29.Size = new System.Drawing.Size(47, 19);
this.label29.TabIndex = 49;
this.label29.Text = "地址";
//
// label30
//
this.label30.AutoSize = true;
this.label30.Font = new System.Drawing.Font("宋体", 14F);
this.label30.Location = new System.Drawing.Point(501, 176);
this.label30.Name = "label30";
this.label30.Size = new System.Drawing.Size(77, 19);
this.label30.TabIndex = 48;
this.label30.Text = "手 机";
//
// label27
//
this.label27.AutoSize = true;
this.label27.Font = new System.Drawing.Font("宋体", 14F);
this.label27.Location = new System.Drawing.Point(251, 176);
this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(85, 19);
this.label27.TabIndex = 45;
this.label27.Text = "身份证号";
//
// label28
//
this.label28.AutoSize = true;
this.label28.Font = new System.Drawing.Font("宋体", 14F);
this.label28.Location = new System.Drawing.Point(6, 176);
this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(66, 19);
this.label28.TabIndex = 44;
this.label28.Text = "养殖户";
//
// bankAccountLabel // bankAccountLabel
// //
this.bankAccountLabel.Font = new System.Drawing.Font("宋体", 14F); this.bankAccountLabel.Font = new System.Drawing.Font("宋体", 14F);
@ -764,9 +856,9 @@
this.panel3.Controls.Add(this.label3); this.panel3.Controls.Add(this.label3);
this.panel3.Controls.Add(this.label18); this.panel3.Controls.Add(this.label18);
this.panel3.Controls.Add(this.weightGrid); this.panel3.Controls.Add(this.weightGrid);
this.panel3.Location = new System.Drawing.Point(12, 318);
this.panel3.Location = new System.Drawing.Point(12, 355);
this.panel3.Name = "panel3"; this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(402, 238);
this.panel3.Size = new System.Drawing.Size(402, 194);
this.panel3.TabIndex = 3; this.panel3.TabIndex = 3;
// //
// farmerSelect // farmerSelect
@ -819,7 +911,7 @@
this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle25; this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle25;
this.farmerGrid.RowTemplate.Height = 23; this.farmerGrid.RowTemplate.Height = 23;
this.farmerGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.farmerGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.farmerGrid.Size = new System.Drawing.Size(400, 112);
this.farmerGrid.Size = new System.Drawing.Size(400, 68);
this.farmerGrid.TabIndex = 8; this.farmerGrid.TabIndex = 8;
this.farmerGrid.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.farmerGrid_CellMouseDown); this.farmerGrid.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.farmerGrid_CellMouseDown);
// //
@ -998,9 +1090,9 @@
// //
this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel4.Controls.Add(this.houseGird); this.panel4.Controls.Add(this.houseGird);
this.panel4.Location = new System.Drawing.Point(438, 318);
this.panel4.Location = new System.Drawing.Point(438, 355);
this.panel4.Name = "panel4"; this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(402, 237);
this.panel4.Size = new System.Drawing.Size(402, 193);
this.panel4.TabIndex = 3; this.panel4.TabIndex = 3;
// //
// houseGird // houseGird
@ -1112,7 +1204,7 @@
this.S_Index, this.S_Index,
this.S_AbnormalItem_Name, this.S_AbnormalItem_Name,
this.S_Number}); this.S_Number});
this.abnormalGrid.Location = new System.Drawing.Point(862, 318);
this.abnormalGrid.Location = new System.Drawing.Point(862, 355);
this.abnormalGrid.MultiSelect = false; this.abnormalGrid.MultiSelect = false;
this.abnormalGrid.Name = "abnormalGrid"; this.abnormalGrid.Name = "abnormalGrid";
this.abnormalGrid.RowHeadersVisible = false; this.abnormalGrid.RowHeadersVisible = false;
@ -1121,7 +1213,7 @@
this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle37; this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle37;
this.abnormalGrid.RowTemplate.Height = 23; this.abnormalGrid.RowTemplate.Height = 23;
this.abnormalGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.abnormalGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.abnormalGrid.Size = new System.Drawing.Size(400, 237);
this.abnormalGrid.Size = new System.Drawing.Size(400, 194);
this.abnormalGrid.TabIndex = 1; this.abnormalGrid.TabIndex = 1;
// //
// S_ID // S_ID
@ -1332,7 +1424,7 @@
this.label15.AutoSize = true; this.label15.AutoSize = true;
this.label15.Font = new System.Drawing.Font("宋体", 15F); this.label15.Font = new System.Drawing.Font("宋体", 15F);
this.label15.ForeColor = System.Drawing.Color.Red; this.label15.ForeColor = System.Drawing.Color.Red;
this.label15.Location = new System.Drawing.Point(9, 297);
this.label15.Location = new System.Drawing.Point(9, 334);
this.label15.Name = "label15"; this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(89, 20); this.label15.Size = new System.Drawing.Size(89, 20);
this.label15.TabIndex = 6; this.label15.TabIndex = 6;
@ -1343,7 +1435,7 @@
this.label16.AutoSize = true; this.label16.AutoSize = true;
this.label16.Font = new System.Drawing.Font("宋体", 15F); this.label16.Font = new System.Drawing.Font("宋体", 15F);
this.label16.ForeColor = System.Drawing.Color.Red; this.label16.ForeColor = System.Drawing.Color.Red;
this.label16.Location = new System.Drawing.Point(434, 297);
this.label16.Location = new System.Drawing.Point(434, 334);
this.label16.Name = "label16"; this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(89, 20); this.label16.Size = new System.Drawing.Size(89, 20);
this.label16.TabIndex = 7; this.label16.TabIndex = 7;
@ -1354,7 +1446,7 @@
this.label17.AutoSize = true; this.label17.AutoSize = true;
this.label17.Font = new System.Drawing.Font("宋体", 15F); this.label17.Font = new System.Drawing.Font("宋体", 15F);
this.label17.ForeColor = System.Drawing.Color.Red; this.label17.ForeColor = System.Drawing.Color.Red;
this.label17.Location = new System.Drawing.Point(858, 297);
this.label17.Location = new System.Drawing.Point(858, 334);
this.label17.Name = "label17"; this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(89, 20); this.label17.Size = new System.Drawing.Size(89, 20);
this.label17.TabIndex = 8; this.label17.TabIndex = 8;
@ -1403,7 +1495,7 @@
// queryBtn // queryBtn
// //
this.queryBtn.Font = new System.Drawing.Font("宋体", 13F); this.queryBtn.Font = new System.Drawing.Font("宋体", 13F);
this.queryBtn.Location = new System.Drawing.Point(711, 559);
this.queryBtn.Location = new System.Drawing.Point(708, 556);
this.queryBtn.Name = "queryBtn"; this.queryBtn.Name = "queryBtn";
this.queryBtn.Size = new System.Drawing.Size(80, 35); this.queryBtn.Size = new System.Drawing.Size(80, 35);
this.queryBtn.TabIndex = 43; this.queryBtn.TabIndex = 43;
@ -1454,7 +1546,7 @@
// viewDetailBtn // viewDetailBtn
// //
this.viewDetailBtn.Font = new System.Drawing.Font("宋体", 15F); this.viewDetailBtn.Font = new System.Drawing.Font("宋体", 15F);
this.viewDetailBtn.Location = new System.Drawing.Point(104, 287);
this.viewDetailBtn.Location = new System.Drawing.Point(104, 324);
this.viewDetailBtn.Name = "viewDetailBtn"; this.viewDetailBtn.Name = "viewDetailBtn";
this.viewDetailBtn.Size = new System.Drawing.Size(80, 30); this.viewDetailBtn.Size = new System.Drawing.Size(80, 30);
this.viewDetailBtn.TabIndex = 44; this.viewDetailBtn.TabIndex = 44;
@ -1652,5 +1744,13 @@
private System.Windows.Forms.Label label22; private System.Windows.Forms.Label label22;
private BWP.WinFormControl.UDatePicker uDatePicker1; private BWP.WinFormControl.UDatePicker uDatePicker1;
private System.Windows.Forms.Label label26; private System.Windows.Forms.Label label26;
private System.Windows.Forms.Label label29;
private System.Windows.Forms.Label label30;
private System.Windows.Forms.Label label27;
private System.Windows.Forms.Label label28;
private System.Windows.Forms.Label yzhAddress;
private System.Windows.Forms.Label yzhTel;
private System.Windows.Forms.Label yzhName;
private System.Windows.Forms.Label yzhIDCard;
} }
} }

+ 43
- 2
ButcherWeight/WeightForm.cs View File

@ -235,9 +235,20 @@ namespace ButcherWeight
private void farmerSelect_SelectedIndexChanged(object sender, EventArgs e) private void farmerSelect_SelectedIndexChanged(object sender, EventArgs e)
{ {
if (farmerSelect.IsEmpty) if (farmerSelect.IsEmpty)
{
yzhName.Text = null;
yzhAddress.Text = null;
yzhTel.Text = null;
yzhAddress.Text = null;
return; return;
}
var detail = new WeightBill_FarmerDetail(); var detail = new WeightBill_FarmerDetail();
detail.Farmer_ID = farmerSelect.LongValue.Value; detail.Farmer_ID = farmerSelect.LongValue.Value;
var info = WeightBillRpc.GetFarmerInfo(detail.Farmer_ID.Value);
yzhName.Text = info.Name;
yzhIDCard.Text = info.IDCard;
yzhTel.Text = info.Tel;
yzhAddress.Text = info.Address;
if (_farmerDetails.Any(x => x.Farmer_ID == detail.Farmer_ID)) if (_farmerDetails.Any(x => x.Farmer_ID == detail.Farmer_ID))
return; return;
detail.Farmer_Name = farmerSelect.DisplayValue; detail.Farmer_Name = farmerSelect.DisplayValue;
@ -268,6 +279,10 @@ namespace ButcherWeight
Dmo.LiveVarieties_Name = liveVarietiesSelect.DisplayValue; Dmo.LiveVarieties_Name = liveVarietiesSelect.DisplayValue;
Dmo.HogGrade_ID = hogGradeSelect.LongValue; Dmo.HogGrade_ID = hogGradeSelect.LongValue;
Dmo.HogGrade_Name = hogGradeSelect.DisplayValue; Dmo.HogGrade_Name = hogGradeSelect.DisplayValue;
Dmo.Farmer_Name = yzhName.Text;
Dmo.Farmer_IDCard = yzhIDCard.Text;
Dmo.Farmer_Tel = yzhTel.Text;
Dmo.Farmer_Address = yzhAddress.Text;
if (!string.IsNullOrEmpty(penWeightInput.Text)) if (!string.IsNullOrEmpty(penWeightInput.Text))
{ {
decimal pw = 0; decimal pw = 0;
@ -394,6 +409,18 @@ namespace ButcherWeight
if (!string.IsNullOrEmpty(Dmo.Remark)) if (!string.IsNullOrEmpty(Dmo.Remark))
remarkInput.Text = Dmo.Remark; remarkInput.Text = Dmo.Remark;
if (!string.IsNullOrEmpty(Dmo.Farmer_Name))
yzhName.Text = Dmo.Farmer_Name;
if (!string.IsNullOrEmpty(Dmo.Farmer_IDCard))
yzhIDCard.Text = Dmo.Farmer_IDCard;
if (!string.IsNullOrEmpty(Dmo.Farmer_Tel))
yzhTel.Text = Dmo.Farmer_Tel;
if (!string.IsNullOrEmpty(Dmo.Farmer_Address))
yzhAddress.Text = Dmo.Farmer_Address;
_farmerDetails = Dmo.FarmerDetails.Where(x => !x.DeleteState).ToList(); _farmerDetails = Dmo.FarmerDetails.Where(x => !x.DeleteState).ToList();
_details = Dmo.Details.ToList(); _details = Dmo.Details.ToList();
_fDelete.Clear(); _fDelete.Clear();
@ -425,6 +452,10 @@ namespace ButcherWeight
testTimeInput.Date = null; testTimeInput.Date = null;
testManInput.Text = null; testManInput.Text = null;
remarkInput.Text = null; remarkInput.Text = null;
yzhName.Text = null;
yzhIDCard.Text = null;
yzhTel.Text = null;
yzhAddress.Text = null;
farmerGrid.DataSource = null; farmerGrid.DataSource = null;
weightGrid.DataSource = null; weightGrid.DataSource = null;
} }
@ -461,7 +492,7 @@ namespace ButcherWeight
private void queryBtn_Click(object sender, EventArgs e) private void queryBtn_Click(object sender, EventArgs e)
{ {
dmoList = WeightBillRpc.GetWeightBillList(qCarSelect.LongValue, qSupplierSelect.LongValue,uDatePicker1.Date.Value);
dmoList = WeightBillRpc.GetWeightBillList(qCarSelect.LongValue, qSupplierSelect.LongValue, uDatePicker1.Date.Value);
BindWeightBill(); BindWeightBill();
} }
@ -555,6 +586,17 @@ namespace ButcherWeight
{ {
if (Dmo.ID == 0) if (Dmo.ID == 0)
throw new Exception("请先保存"); throw new Exception("请先保存");
if (string.IsNullOrEmpty(Dmo.BankAccount))
throw new Exception("银行卡号不能为空");
if (string.IsNullOrEmpty(Dmo.Farmer_Name))
throw new Exception("养殖户不能为空");
if (string.IsNullOrEmpty(Dmo.Farmer_IDCard))
throw new Exception("养殖户身份证号不能为空");
if (string.IsNullOrEmpty(Dmo.Farmer_Tel))
throw new Exception("养殖户电话不能为空");
if (string.IsNullOrEmpty(Dmo.Farmer_Address))
throw new Exception("养殖户地址不能为空");
return;
var entity = WeightBillRpc.GetPrintWeightBill(Dmo.ID); var entity = WeightBillRpc.GetPrintWeightBill(Dmo.ID);
if (string.IsNullOrEmpty(entity.Supplier_Name)) if (string.IsNullOrEmpty(entity.Supplier_Name))
throw new Exception("缺少供应商信息,打印失败"); throw new Exception("缺少供应商信息,打印失败");
@ -583,7 +625,6 @@ namespace ButcherWeight
bankAccountLabel.Text = string.Empty; bankAccountLabel.Text = string.Empty;
else else
bankAccountLabel.Text = WeightBillRpc.GetSupplierBankAccount(supplierSelect.LongValue.Value); bankAccountLabel.Text = WeightBillRpc.GetSupplierBankAccount(supplierSelect.LongValue.Value);
bankAccountLabel.Refresh();
} }
} }
} }

+ 183
- 169
MaterialRequisition/MaterialRequisitionForm.Designer.cs View File

@ -28,20 +28,35 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.dataGridViewSubmited = new BWP.WinFormControl.UDataGridView(); this.dataGridViewSubmited = new BWP.WinFormControl.UDataGridView();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.LossWeightColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.dataGridViewUnSubmit = new BWP.WinFormControl.UDataGridView(); this.dataGridViewUnSubmit = new BWP.WinFormControl.UDataGridView();
this.U_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.un条码 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.un编码 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.un名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.un重量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.un单位 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.un数量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.btnCommit = new System.Windows.Forms.Button(); this.btnCommit = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button(); this.btnDelete = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
@ -70,21 +85,7 @@
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.U_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.un条码 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.un编码 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.un名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.un重量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.un单位 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.un数量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.LossWeightColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.readBtn = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
@ -141,19 +142,19 @@
this.dataGridViewSubmited.AllowUserToDeleteRows = false; this.dataGridViewSubmited.AllowUserToDeleteRows = false;
this.dataGridViewSubmited.AllowUserToResizeColumns = false; this.dataGridViewSubmited.AllowUserToResizeColumns = false;
this.dataGridViewSubmited.AllowUserToResizeRows = false; this.dataGridViewSubmited.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dataGridViewSubmited.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dataGridViewSubmited.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle14;
this.dataGridViewSubmited.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.dataGridViewSubmited.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.dataGridViewSubmited.BackgroundColor = System.Drawing.Color.White; this.dataGridViewSubmited.BackgroundColor = System.Drawing.Color.White;
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.dataGridViewSubmited.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewSubmited.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle15;
this.dataGridViewSubmited.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridViewSubmited.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridViewSubmited.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewSubmited.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn1,
@ -169,19 +170,85 @@
this.dataGridViewSubmited.Name = "dataGridViewSubmited"; this.dataGridViewSubmited.Name = "dataGridViewSubmited";
this.dataGridViewSubmited.ReadOnly = true; this.dataGridViewSubmited.ReadOnly = true;
this.dataGridViewSubmited.RowHeadersVisible = false; this.dataGridViewSubmited.RowHeadersVisible = false;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.dataGridViewSubmited.RowsDefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle18.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.dataGridViewSubmited.RowsDefaultCellStyle = dataGridViewCellStyle18;
this.dataGridViewSubmited.RowTemplate.Height = 23; this.dataGridViewSubmited.RowTemplate.Height = 23;
this.dataGridViewSubmited.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridViewSubmited.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridViewSubmited.Size = new System.Drawing.Size(761, 177); this.dataGridViewSubmited.Size = new System.Drawing.Size(761, 177);
this.dataGridViewSubmited.TabIndex = 2; this.dataGridViewSubmited.TabIndex = 2;
// //
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.DataPropertyName = "ID";
this.dataGridViewTextBoxColumn1.HeaderText = "序号";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.ReadOnly = true;
this.dataGridViewTextBoxColumn1.Width = 80;
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.dataGridViewTextBoxColumn2.DataPropertyName = "BarCode";
this.dataGridViewTextBoxColumn2.HeaderText = "条码";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.ReadOnly = true;
this.dataGridViewTextBoxColumn2.Width = 65;
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.DataPropertyName = "Goods_Code";
this.dataGridViewTextBoxColumn3.HeaderText = "编码";
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.ReadOnly = true;
//
// dataGridViewTextBoxColumn4
//
this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.dataGridViewTextBoxColumn4.DataPropertyName = "Goods_Name";
this.dataGridViewTextBoxColumn4.HeaderText = "名称";
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.ReadOnly = true;
this.dataGridViewTextBoxColumn4.Width = 65;
//
// dataGridViewTextBoxColumn5
//
this.dataGridViewTextBoxColumn5.DataPropertyName = "Weight";
dataGridViewCellStyle16.Format = "#0.######";
this.dataGridViewTextBoxColumn5.DefaultCellStyle = dataGridViewCellStyle16;
this.dataGridViewTextBoxColumn5.HeaderText = "重量";
this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
this.dataGridViewTextBoxColumn5.ReadOnly = true;
//
// LossWeightColumn
//
this.LossWeightColumn.DataPropertyName = "LossWeight";
dataGridViewCellStyle17.Format = "#0.######";
this.LossWeightColumn.DefaultCellStyle = dataGridViewCellStyle17;
this.LossWeightColumn.HeaderText = "损耗";
this.LossWeightColumn.Name = "LossWeightColumn";
this.LossWeightColumn.ReadOnly = true;
//
// dataGridViewTextBoxColumn6
//
this.dataGridViewTextBoxColumn6.DataPropertyName = "Goods_MainUnit";
this.dataGridViewTextBoxColumn6.HeaderText = "单位";
this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
this.dataGridViewTextBoxColumn6.ReadOnly = true;
//
// dataGridViewTextBoxColumn7
//
this.dataGridViewTextBoxColumn7.DataPropertyName = "Number";
this.dataGridViewTextBoxColumn7.HeaderText = "数量";
this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
this.dataGridViewTextBoxColumn7.ReadOnly = true;
//
// groupBox1 // groupBox1
// //
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.readBtn);
this.groupBox1.Controls.Add(this.dataGridViewUnSubmit); this.groupBox1.Controls.Add(this.dataGridViewUnSubmit);
this.groupBox1.Controls.Add(this.btnCommit); this.groupBox1.Controls.Add(this.btnCommit);
this.groupBox1.Controls.Add(this.btnDelete); this.groupBox1.Controls.Add(this.btnDelete);
@ -198,20 +265,20 @@
this.dataGridViewUnSubmit.AllowUserToDeleteRows = false; this.dataGridViewUnSubmit.AllowUserToDeleteRows = false;
this.dataGridViewUnSubmit.AllowUserToResizeColumns = false; this.dataGridViewUnSubmit.AllowUserToResizeColumns = false;
this.dataGridViewUnSubmit.AllowUserToResizeRows = false; this.dataGridViewUnSubmit.AllowUserToResizeRows = false;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dataGridViewUnSubmit.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dataGridViewUnSubmit.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
this.dataGridViewUnSubmit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.dataGridViewUnSubmit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.dataGridViewUnSubmit.BackgroundColor = System.Drawing.Color.White; this.dataGridViewUnSubmit.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewUnSubmit.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewUnSubmit.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
this.dataGridViewUnSubmit.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridViewUnSubmit.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridViewUnSubmit.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewUnSubmit.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.U_ID, this.U_ID,
@ -226,14 +293,70 @@
this.dataGridViewUnSubmit.Name = "dataGridViewUnSubmit"; this.dataGridViewUnSubmit.Name = "dataGridViewUnSubmit";
this.dataGridViewUnSubmit.ReadOnly = true; this.dataGridViewUnSubmit.ReadOnly = true;
this.dataGridViewUnSubmit.RowHeadersVisible = false; this.dataGridViewUnSubmit.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.dataGridViewUnSubmit.RowsDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.dataGridViewUnSubmit.RowsDefaultCellStyle = dataGridViewCellStyle13;
this.dataGridViewUnSubmit.RowTemplate.Height = 23; this.dataGridViewUnSubmit.RowTemplate.Height = 23;
this.dataGridViewUnSubmit.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridViewUnSubmit.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridViewUnSubmit.Size = new System.Drawing.Size(761, 189); this.dataGridViewUnSubmit.Size = new System.Drawing.Size(761, 189);
this.dataGridViewUnSubmit.TabIndex = 1; this.dataGridViewUnSubmit.TabIndex = 1;
// //
// U_ID
//
this.U_ID.DataPropertyName = "ID";
this.U_ID.HeaderText = "序号";
this.U_ID.Name = "U_ID";
this.U_ID.ReadOnly = true;
this.U_ID.Width = 80;
//
// un条码
//
this.un条码.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.un条码.DataPropertyName = "BarCode";
this.un条码.HeaderText = "条码";
this.un条码.Name = "un条码";
this.un条码.ReadOnly = true;
this.un条码.Width = 65;
//
// un编码
//
this.un编码.DataPropertyName = "Goods_Code";
this.un编码.HeaderText = "编码";
this.un编码.Name = "un编码";
this.un编码.ReadOnly = true;
//
// un名称
//
this.un名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.un名称.DataPropertyName = "Goods_Name";
this.un名称.HeaderText = "名称";
this.un名称.Name = "un名称";
this.un名称.ReadOnly = true;
this.un名称.Width = 65;
//
// un重量
//
this.un重量.DataPropertyName = "Weight";
dataGridViewCellStyle12.Format = "#0.######";
this.un重量.DefaultCellStyle = dataGridViewCellStyle12;
this.un重量.HeaderText = "重量";
this.un重量.Name = "un重量";
this.un重量.ReadOnly = true;
//
// un单位
//
this.un单位.DataPropertyName = "Goods_MainUnit";
this.un单位.HeaderText = "单位";
this.un单位.Name = "un单位";
this.un单位.ReadOnly = true;
//
// un数量
//
this.un数量.DataPropertyName = "Number";
this.un数量.HeaderText = "数量";
this.un数量.Name = "un数量";
this.un数量.ReadOnly = true;
//
// btnCommit // btnCommit
// //
this.btnCommit.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCommit.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@ -523,126 +646,16 @@
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "条码"; this.label1.Text = "条码";
// //
// U_ID
// readBtn
// //
this.U_ID.DataPropertyName = "ID";
this.U_ID.HeaderText = "序号";
this.U_ID.Name = "U_ID";
this.U_ID.ReadOnly = true;
this.U_ID.Width = 80;
//
// un条码
//
this.un条码.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.un条码.DataPropertyName = "BarCode";
this.un条码.HeaderText = "条码";
this.un条码.Name = "un条码";
this.un条码.ReadOnly = true;
this.un条码.Width = 65;
//
// un编码
//
this.un编码.DataPropertyName = "Goods_Code";
this.un编码.HeaderText = "编码";
this.un编码.Name = "un编码";
this.un编码.ReadOnly = true;
//
// un名称
//
this.un名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.un名称.DataPropertyName = "Goods_Name";
this.un名称.HeaderText = "名称";
this.un名称.Name = "un名称";
this.un名称.ReadOnly = true;
this.un名称.Width = 65;
//
// un重量
//
this.un重量.DataPropertyName = "Weight";
dataGridViewCellStyle8.Format = "#0.######";
this.un重量.DefaultCellStyle = dataGridViewCellStyle8;
this.un重量.HeaderText = "重量";
this.un重量.Name = "un重量";
this.un重量.ReadOnly = true;
//
// un单位
//
this.un单位.DataPropertyName = "Goods_MainUnit";
this.un单位.HeaderText = "单位";
this.un单位.Name = "un单位";
this.un单位.ReadOnly = true;
//
// un数量
//
this.un数量.DataPropertyName = "Number";
this.un数量.HeaderText = "数量";
this.un数量.Name = "un数量";
this.un数量.ReadOnly = true;
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.DataPropertyName = "ID";
this.dataGridViewTextBoxColumn1.HeaderText = "序号";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.ReadOnly = true;
this.dataGridViewTextBoxColumn1.Width = 80;
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.dataGridViewTextBoxColumn2.DataPropertyName = "BarCode";
this.dataGridViewTextBoxColumn2.HeaderText = "条码";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.ReadOnly = true;
this.dataGridViewTextBoxColumn2.Width = 65;
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.DataPropertyName = "Goods_Code";
this.dataGridViewTextBoxColumn3.HeaderText = "编码";
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.ReadOnly = true;
//
// dataGridViewTextBoxColumn4
//
this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.dataGridViewTextBoxColumn4.DataPropertyName = "Goods_Name";
this.dataGridViewTextBoxColumn4.HeaderText = "名称";
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.ReadOnly = true;
this.dataGridViewTextBoxColumn4.Width = 65;
//
// dataGridViewTextBoxColumn5
//
this.dataGridViewTextBoxColumn5.DataPropertyName = "Weight";
dataGridViewCellStyle3.Format = "#0.######";
this.dataGridViewTextBoxColumn5.DefaultCellStyle = dataGridViewCellStyle3;
this.dataGridViewTextBoxColumn5.HeaderText = "重量";
this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
this.dataGridViewTextBoxColumn5.ReadOnly = true;
//
// LossWeightColumn
//
this.LossWeightColumn.DataPropertyName = "LossWeight";
dataGridViewCellStyle4.Format = "#0.######";
this.LossWeightColumn.DefaultCellStyle = dataGridViewCellStyle4;
this.LossWeightColumn.HeaderText = "损耗";
this.LossWeightColumn.Name = "LossWeightColumn";
this.LossWeightColumn.ReadOnly = true;
//
// dataGridViewTextBoxColumn6
//
this.dataGridViewTextBoxColumn6.DataPropertyName = "Goods_MainUnit";
this.dataGridViewTextBoxColumn6.HeaderText = "单位";
this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
this.dataGridViewTextBoxColumn6.ReadOnly = true;
//
// dataGridViewTextBoxColumn7
//
this.dataGridViewTextBoxColumn7.DataPropertyName = "Number";
this.dataGridViewTextBoxColumn7.HeaderText = "数量";
this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
this.dataGridViewTextBoxColumn7.ReadOnly = true;
this.readBtn.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.readBtn.Location = new System.Drawing.Point(243, 21);
this.readBtn.Name = "readBtn";
this.readBtn.Size = new System.Drawing.Size(75, 35);
this.readBtn.TabIndex = 2;
this.readBtn.Text = "读入";
this.readBtn.UseVisualStyleBackColor = true;
this.readBtn.Click += new System.EventHandler(this.readBtn_Click);
// //
// MaterialRequisitionForm // MaterialRequisitionForm
// //
@ -729,6 +742,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn un重量; private System.Windows.Forms.DataGridViewTextBoxColumn un重量;
private System.Windows.Forms.DataGridViewTextBoxColumn un单位; private System.Windows.Forms.DataGridViewTextBoxColumn un单位;
private System.Windows.Forms.DataGridViewTextBoxColumn un数量; private System.Windows.Forms.DataGridViewTextBoxColumn un数量;
private System.Windows.Forms.Button readBtn;
} }
} }

+ 46
- 21
MaterialRequisition/MaterialRequisitionForm.cs View File

@ -519,11 +519,11 @@ namespace MaterialRequisition
this.Invoke(new Action(delegate() this.Invoke(new Action(delegate()
{ {
lblChengZhong.Text = string.Format(format, decimal.Parse(str)); lblChengZhong.Text = string.Format(format, decimal.Parse(str));
if (str != "0")
{
//AddWeightDetail(decimal.Parse(lblChengZhong.Text));
doInsertUnSubmit(decimal.Parse(lblChengZhong.Text));
}
//if (str != "0")
//{
// //AddWeightDetail(decimal.Parse(lblChengZhong.Text));
// //doInsertUnSubmit(decimal.Parse(lblChengZhong.Text));
//}
})); }));
} }
else else
@ -542,12 +542,12 @@ namespace MaterialRequisition
{ {
this.Invoke(new Action(delegate() this.Invoke(new Action(delegate()
{ {
//lblChengZhong.Text = string.Format(format, num);
if (str != "0")
{
doInsertUnSubmit(decimal.Parse(string.Format(format, num)));
//AddWeightDetail(decimal.Parse(string.Format(format, num)));
}
lblChengZhong.Text = string.Format(format, num);
//if (str != "0")
//{
// //doInsertUnSubmit(decimal.Parse(string.Format(format, num)));
// //AddWeightDetail(decimal.Parse(string.Format(format, num)));
//}
})); }));
} }
} }
@ -569,19 +569,36 @@ namespace MaterialRequisition
{ {
//称重 //称重
//找到称重为空条码不为空的 //找到称重为空条码不为空的
var fd = unSubmitList.LastOrDefault(x => x.Weight == null);
if (fd == null)
{
//todo 记录一个异常
// record.ID = unSumbitList.Max(x => x.ID) + 1;
// unSumbitList.Add(record);
}
else
var all = unSubmitList.Where(x => x.Weight == null);
if (all.Any())
{ {
RpcFacade.Call<int>(BaseRpcUrl + "FillWeight", fd.ID, weight);
fd.Weight = weight;
var id = unSubmitList.Last().ID;
var ids = unSubmitList.Select(x => x.ID).ToList().Remove(id);
RpcFacade.Call<int>(BaseRpcUrl + "FillWeight", id, weight, ids);
foreach (var item in all)
{
if (item.ID == id)
item.Weight = weight;
else
item.Weight = 0;
}
dataGridViewUnSubmit.Refresh(); dataGridViewUnSubmit.Refresh();
} }
//var fd = unSubmitList.LastOrDefault(x => x.Weight == null);
//if (fd == null)
//{
// //todo 记录一个异常
// // record.ID = unSumbitList.Max(x => x.ID) + 1;
// // unSumbitList.Add(record);
//}
//else
//{
// RpcFacade.Call<int>(BaseRpcUrl + "FillWeight", fd.ID, weight);
// fd.Weight = weight;
// dataGridViewUnSubmit.Refresh();
//}
} }
} }
@ -697,5 +714,13 @@ namespace MaterialRequisition
unSubmitList.Remove(first); unSubmitList.Remove(first);
dataGridViewUnSubmit.Refresh(); dataGridViewUnSubmit.Refresh();
} }
private void readBtn_Click(object sender, EventArgs e)
{
var weight = decimal.Parse(lblChengZhong.Text);
if (weight == 0)
throw new Exception("重量为0");
doInsertUnSubmit(weight);
}
} }
} }

+ 15
- 15
MaterialRequisition/MaterialRequisitionForm.resx View File

@ -117,49 +117,49 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="U_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="un条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="un编码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="un名称.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="dataGridViewTextBoxColumn5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="un重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="LossWeightColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="un单位.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="dataGridViewTextBoxColumn6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="un数量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="dataGridViewTextBoxColumn7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="U_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="un条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="un编码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="un名称.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="dataGridViewTextBoxColumn5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="un重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="LossWeightColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="un单位.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="dataGridViewTextBoxColumn6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="un数量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="dataGridViewTextBoxColumn7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
</root> </root>

Loading…
Cancel
Save