Browse Source

货台发货调整。

master
yibo 7 years ago
parent
commit
1b7686dca2
6 changed files with 363 additions and 209 deletions
  1. +3
    -1
      ButcherFactory.BO/Bill/CarcassSaleOut_Detail.cs
  2. +1
    -1
      ButcherFactory.BO/ButcherFactory.BO.csproj
  3. +28
    -9
      ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs
  4. +256
    -196
      ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs
  5. +58
    -2
      ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs
  6. +17
    -0
      ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.resx

+ 3
- 1
ButcherFactory.BO/Bill/CarcassSaleOut_Detail.cs View File

@ -38,6 +38,9 @@ namespace ButcherFactory.BO
public decimal Weight { get; set; } public decimal Weight { get; set; }
[NonDmoProperty]
public int Idx { get;set;}
[NonDmoProperty] [NonDmoProperty]
public decimal? DiffWeight public decimal? DiffWeight
{ {
@ -98,6 +101,5 @@ namespace ButcherFactory.BO
return null; return null;
} }
} }
} }
} }

+ 1
- 1
ButcherFactory.BO/ButcherFactory.BO.csproj View File

@ -40,7 +40,7 @@
</Reference> </Reference>
<Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> <Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\Forks.Utils.dll</HintPath>
<HintPath>..\..\..\tsref\release\Forks.Utils.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=4.0.3.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=4.0.3.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>


+ 28
- 9
ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs View File

@ -57,10 +57,15 @@ namespace ButcherFactory.BO.LocalBL
query.Where.Conditions.Add(DQCondition.IsNull(DQExpression.Field("DetailID"))); query.Where.Conditions.Add(DQCondition.IsNull(DQExpression.Field("DetailID")));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true)); query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true));
var list = query.EExecuteList().Cast<CarcassSaleOut_Detail>().ToList(); var list = query.EExecuteList().Cast<CarcassSaleOut_Detail>().ToList();
var idx = list.Count;
foreach (var item in list)
{
item.Idx = idx;
idx--;
}
return new BindingList<CarcassSaleOut_Detail>(list); return new BindingList<CarcassSaleOut_Detail>(list);
} }
static Dictionary<long, Tuple<string, string>> goodsInfos = new Dictionary<long, Tuple<string, string>>();
public static void FillDetail(CarcassSaleOut_Detail first, string barCode, long? batchID) public static void FillDetail(CarcassSaleOut_Detail first, string barCode, long? batchID)
{ {
using (var session = DmoSession.New()) using (var session = DmoSession.New())
@ -89,6 +94,8 @@ namespace ButcherFactory.BO.LocalBL
var mesInfo = JsonConvert.DeserializeObject<SaleOutCarcassObj>(json); var mesInfo = JsonConvert.DeserializeObject<SaleOutCarcassObj>(json);
if (!string.IsNullOrEmpty(mesInfo.Goods_Code)) if (!string.IsNullOrEmpty(mesInfo.Goods_Code))
{ {
if (mesInfo.Goods_Code == "X002")
mesInfo.Goods_Code = "0001";
var gInfo = GetGoodsInfo(mesInfo.Goods_Code); var gInfo = GetGoodsInfo(mesInfo.Goods_Code);
first.Goods_Code = mesInfo.Goods_Code; first.Goods_Code = mesInfo.Goods_Code;
first.InStoreWeight = mesInfo.InStoreWeight; first.InStoreWeight = mesInfo.InStoreWeight;
@ -118,32 +125,32 @@ namespace ButcherFactory.BO.LocalBL
session.ExecuteNonQuery(update); session.ExecuteNonQuery(update);
} }
static Dictionary<long, Tuple<string, string>> goodsIdInfo = new Dictionary<long, Tuple<string, string>>();
static Tuple<string, string> GetGoodsInfo(long id) static Tuple<string, string> GetGoodsInfo(long id)
{ {
if (!goodsInfos.ContainsKey(id))
if (!goodsIdInfo.ContainsKey(id))
{ {
var json = RpcFacade.Call<string>(RpcPath + "BaseInfoSelectRpc/GetGoodsInfo", "ID", id); var json = RpcFacade.Call<string>(RpcPath + "BaseInfoSelectRpc/GetGoodsInfo", "ID", id);
var g = JsonConvert.DeserializeObject<ExtensionObj>(json); var g = JsonConvert.DeserializeObject<ExtensionObj>(json);
if (g.LongExt1 == null) if (g.LongExt1 == null)
throw new Exception("没有找到存货No." + id); throw new Exception("没有找到存货No." + id);
goodsInfos.Add(id, new Tuple<string, string>(g.StringExt1, g.StringExt2));
goodsIdInfo.Add(id, new Tuple<string, string>(g.StringExt1, g.StringExt2));
} }
return goodsInfos[id];
return goodsIdInfo[id];
} }
static Dictionary<string, Tuple<long, string>> goodsCodeInfo = new Dictionary<string, Tuple<long, string>>();
public static Tuple<long, string> GetGoodsInfo(string code) public static Tuple<long, string> GetGoodsInfo(string code)
{ {
long id = 0;
if (!goodsInfos.Any(x => x.Value.Item2 == code))
if (!goodsCodeInfo.ContainsKey(code))
{ {
var json = RpcFacade.Call<string>(RpcPath + "BaseInfoSelectRpc/GetGoodsInfo", "Code", code); var json = RpcFacade.Call<string>(RpcPath + "BaseInfoSelectRpc/GetGoodsInfo", "Code", code);
var g = JsonConvert.DeserializeObject<ExtensionObj>(json); var g = JsonConvert.DeserializeObject<ExtensionObj>(json);
if (g.LongExt1 == null) if (g.LongExt1 == null)
throw new Exception("没有找到存货编码 " + code); throw new Exception("没有找到存货编码 " + code);
id = g.LongExt1.Value;
goodsInfos.Add(id, new Tuple<string, string>(g.StringExt1, g.StringExt2));
goodsCodeInfo.Add(code, new Tuple<long, string>(g.LongExt1.Value, g.StringExt1));
} }
return new Tuple<long, string>(id, goodsInfos[id].Item1);
return goodsCodeInfo[code];
} }
public static List<ProductBatch> GetBatchFromEMS() public static List<ProductBatch> GetBatchFromEMS()
@ -167,10 +174,22 @@ namespace ButcherFactory.BO.LocalBL
detail.SSecondNumber = (detail.SSecondNumber ?? 0) + details.Sum(x => x.Number); detail.SSecondNumber = (detail.SSecondNumber ?? 0) + details.Sum(x => x.Number);
} }
public static void SaveAssignNum(long id, decimal number)
{
RpcFacade.Call<int>(RpcPath + "SaleOutStoreRpc/SaveAssignNum", id, number);
}
public static void SetGoodsFinish(long id) public static void SetGoodsFinish(long id)
{ {
RpcFacade.Call<int>(RpcPath + "SaleOutStoreRpc/SetFinishAssignState", id); RpcFacade.Call<int>(RpcPath + "SaleOutStoreRpc/SetFinishAssignState", id);
} }
public static void Delete(long id)
{
var delete = new DQDeleteDom(typeof(CarcassSaleOut_Detail));
delete.Where.Conditions.Add(DQCondition.EQ("ID", id));
delete.EExecute();
}
} }
class SaleOutCarcassObj class SaleOutCarcassObj


+ 256
- 196
ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs View File

@ -29,26 +29,26 @@
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarcassSaleOutForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarcassSaleOutForm));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle46 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle52 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle47 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle48 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle49 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle50 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle51 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle53 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle54 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle60 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle55 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle56 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle57 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle58 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle59 = 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();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = 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 dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = 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 dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
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 dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
this.uWeightControl1 = new WinFormControl.UWeightControl(); this.uWeightControl1 = new WinFormControl.UWeightControl();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.carNumberLabel = new WinFormControl.ULabel(); this.carNumberLabel = new WinFormControl.ULabel();
@ -88,19 +88,13 @@
this.panel4 = new System.Windows.Forms.Panel(); this.panel4 = new System.Windows.Forms.Panel();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.orderGridView = new WinFormControl.UDataGridView(); this.orderGridView = new WinFormControl.UDataGridView();
this.D_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_SaleOutStore_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Customer_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Goods_Code = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_SecondNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_SSecondNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_SNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_DiffNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.sendGridView = new WinFormControl.UDataGridView(); this.sendGridView = new WinFormControl.UDataGridView();
this.commitBtn = new WinFormControl.UButton(); this.commitBtn = new WinFormControl.UButton();
this.alreadyViewBtn = new WinFormControl.UButton();
this.deleteBtn = new WinFormControl.UButton();
this.F_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.F_Idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.F_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.F_GoodsCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_GoodsCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.F_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -109,7 +103,17 @@
this.F_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.F_DiffWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_DiffWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.F_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_Time = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.alreadyViewBtn = new WinFormControl.UButton();
this.D_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_HasSubmit = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_SaleOutStore_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Customer_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Goods_Code = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_SecondNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_SSecondNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_SNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_DiffNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
this.panel3.SuspendLayout(); this.panel3.SuspendLayout();
@ -292,7 +296,7 @@
this.uTimerLabel1.Name = "uTimerLabel1"; this.uTimerLabel1.Name = "uTimerLabel1";
this.uTimerLabel1.Size = new System.Drawing.Size(136, 16); this.uTimerLabel1.Size = new System.Drawing.Size(136, 16);
this.uTimerLabel1.TabIndex = 11; this.uTimerLabel1.TabIndex = 11;
this.uTimerLabel1.Text = "5月22日 11:14:09";
this.uTimerLabel1.Text = "5月22日 18:45:17";
// //
// uScanPanel1 // uScanPanel1
// //
@ -519,17 +523,17 @@
this.mainGridView.AllowUserToDeleteRows = false; this.mainGridView.AllowUserToDeleteRows = false;
this.mainGridView.AllowUserToResizeColumns = false; this.mainGridView.AllowUserToResizeColumns = false;
this.mainGridView.AllowUserToResizeRows = false; this.mainGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle41.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.mainGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle41;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.mainGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.mainGridView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.mainGridView.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)));
this.mainGridView.BackgroundColor = System.Drawing.Color.White; this.mainGridView.BackgroundColor = System.Drawing.Color.White;
this.mainGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.mainGridView.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle42.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle42.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle42.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle42.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mainGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle42;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mainGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.mainGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.mainGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.mainGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.mainGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.M_ID, this.M_ID,
@ -540,18 +544,18 @@
this.mainGridView.MultiSelect = false; this.mainGridView.MultiSelect = false;
this.mainGridView.Name = "mainGridView"; this.mainGridView.Name = "mainGridView";
this.mainGridView.ReadOnly = true; this.mainGridView.ReadOnly = true;
dataGridViewCellStyle43.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle43.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle43.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle43.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle43.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle43.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle43.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mainGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle43;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mainGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.mainGridView.RowHeadersVisible = false; this.mainGridView.RowHeadersVisible = false;
dataGridViewCellStyle44.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle44.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.mainGridView.RowsDefaultCellStyle = dataGridViewCellStyle44;
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.mainGridView.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.mainGridView.RowTemplate.Height = 40; this.mainGridView.RowTemplate.Height = 40;
this.mainGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.mainGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.mainGridView.Size = new System.Drawing.Size(493, 254); this.mainGridView.Size = new System.Drawing.Size(493, 254);
@ -620,18 +624,19 @@
this.orderGridView.AllowUserToDeleteRows = false; this.orderGridView.AllowUserToDeleteRows = false;
this.orderGridView.AllowUserToResizeColumns = false; this.orderGridView.AllowUserToResizeColumns = false;
this.orderGridView.AllowUserToResizeRows = false; this.orderGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle45.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.orderGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle45;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.orderGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
this.orderGridView.BackgroundColor = System.Drawing.Color.White; this.orderGridView.BackgroundColor = System.Drawing.Color.White;
this.orderGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.orderGridView.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle46.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle46.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle46.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle46.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.orderGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle46;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle6.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.orderGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
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_ID, this.D_ID,
this.D_HasSubmit,
this.D_SaleOutStore_ID, this.D_SaleOutStore_ID,
this.D_Customer_Name, this.D_Customer_Name,
this.D_Goods_Code, this.D_Goods_Code,
@ -647,101 +652,15 @@
this.orderGridView.Name = "orderGridView"; this.orderGridView.Name = "orderGridView";
this.orderGridView.ReadOnly = true; this.orderGridView.ReadOnly = true;
this.orderGridView.RowHeadersVisible = false; this.orderGridView.RowHeadersVisible = false;
dataGridViewCellStyle52.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle52.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.orderGridView.RowsDefaultCellStyle = dataGridViewCellStyle52;
dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.orderGridView.RowsDefaultCellStyle = dataGridViewCellStyle12;
this.orderGridView.RowTemplate.Height = 40; this.orderGridView.RowTemplate.Height = 40;
this.orderGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.orderGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.orderGridView.Size = new System.Drawing.Size(789, 200); this.orderGridView.Size = new System.Drawing.Size(789, 200);
this.orderGridView.TabIndex = 0; this.orderGridView.TabIndex = 0;
//
// D_ID
//
this.D_ID.DataPropertyName = "ID";
this.D_ID.HeaderText = "ID";
this.D_ID.Name = "D_ID";
this.D_ID.ReadOnly = true;
this.D_ID.Visible = false;
//
// D_SaleOutStore_ID
//
this.D_SaleOutStore_ID.DataPropertyName = "SaleOutStore_ID";
this.D_SaleOutStore_ID.HeaderText = "单号";
this.D_SaleOutStore_ID.Name = "D_SaleOutStore_ID";
this.D_SaleOutStore_ID.ReadOnly = true;
this.D_SaleOutStore_ID.Width = 90;
//
// D_Customer_Name
//
this.D_Customer_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.D_Customer_Name.DataPropertyName = "Customer_Name";
this.D_Customer_Name.HeaderText = "客户名称";
this.D_Customer_Name.MinimumWidth = 100;
this.D_Customer_Name.Name = "D_Customer_Name";
this.D_Customer_Name.ReadOnly = true;
//
// D_Goods_Code
//
this.D_Goods_Code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.D_Goods_Code.DataPropertyName = "Goods_Code";
this.D_Goods_Code.HeaderText = "产品编码";
this.D_Goods_Code.MinimumWidth = 100;
this.D_Goods_Code.Name = "D_Goods_Code";
this.D_Goods_Code.ReadOnly = true;
//
// D_Goods_Name
//
this.D_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.D_Goods_Name.DataPropertyName = "Goods_Name";
this.D_Goods_Name.HeaderText = "产品名称";
this.D_Goods_Name.MinimumWidth = 100;
this.D_Goods_Name.Name = "D_Goods_Name";
this.D_Goods_Name.ReadOnly = true;
//
// D_SecondNumber
//
this.D_SecondNumber.DataPropertyName = "SecondNumber";
dataGridViewCellStyle47.Format = "#0.######";
this.D_SecondNumber.DefaultCellStyle = dataGridViewCellStyle47;
this.D_SecondNumber.HeaderText = "辅数量";
this.D_SecondNumber.Name = "D_SecondNumber";
this.D_SecondNumber.ReadOnly = true;
//
// D_Number
//
this.D_Number.DataPropertyName = "Number";
dataGridViewCellStyle48.Format = "#0.######";
this.D_Number.DefaultCellStyle = dataGridViewCellStyle48;
this.D_Number.HeaderText = "报价数量";
this.D_Number.Name = "D_Number";
this.D_Number.ReadOnly = true;
//
// D_SSecondNumber
//
this.D_SSecondNumber.DataPropertyName = "SSecondNumber";
dataGridViewCellStyle49.Format = "#0.######";
this.D_SSecondNumber.DefaultCellStyle = dataGridViewCellStyle49;
this.D_SSecondNumber.HeaderText = "配货辅数量";
this.D_SSecondNumber.Name = "D_SSecondNumber";
this.D_SSecondNumber.ReadOnly = true;
//
// D_SNumber
//
this.D_SNumber.DataPropertyName = "SNumber";
dataGridViewCellStyle50.Format = "#0.######";
this.D_SNumber.DefaultCellStyle = dataGridViewCellStyle50;
this.D_SNumber.HeaderText = "配货数量";
this.D_SNumber.Name = "D_SNumber";
this.D_SNumber.ReadOnly = true;
//
// D_DiffNumber
//
this.D_DiffNumber.DataPropertyName = "DiffNumber";
dataGridViewCellStyle51.Format = "#0.######";
this.D_DiffNumber.DefaultCellStyle = dataGridViewCellStyle51;
this.D_DiffNumber.HeaderText = "差异数量";
this.D_DiffNumber.Name = "D_DiffNumber";
this.D_DiffNumber.ReadOnly = true;
this.orderGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGridView_CellClick);
this.orderGridView.RowPrePaint += new System.Windows.Forms.DataGridViewRowPrePaintEventHandler(this.orderGridView_RowPrePaint);
// //
// groupBox2 // groupBox2
// //
@ -760,17 +679,19 @@
this.sendGridView.AllowUserToDeleteRows = false; this.sendGridView.AllowUserToDeleteRows = false;
this.sendGridView.AllowUserToResizeColumns = false; this.sendGridView.AllowUserToResizeColumns = false;
this.sendGridView.AllowUserToResizeRows = false; this.sendGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle53.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.sendGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle53;
dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.sendGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13;
this.sendGridView.BackgroundColor = System.Drawing.Color.White; this.sendGridView.BackgroundColor = System.Drawing.Color.White;
this.sendGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.sendGridView.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle54.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle54.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle54.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle54.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.sendGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle54;
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle14.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.sendGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14;
this.sendGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.sendGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.sendGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.sendGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.F_ID,
this.F_Idx,
this.F_BarCode, this.F_BarCode,
this.F_GoodsCode, this.F_GoodsCode,
this.F_Goods_Name, this.F_Goods_Name,
@ -785,9 +706,9 @@
this.sendGridView.Name = "sendGridView"; this.sendGridView.Name = "sendGridView";
this.sendGridView.ReadOnly = true; this.sendGridView.ReadOnly = true;
this.sendGridView.RowHeadersVisible = false; this.sendGridView.RowHeadersVisible = false;
dataGridViewCellStyle60.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle60.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.sendGridView.RowsDefaultCellStyle = dataGridViewCellStyle60;
dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle20.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.sendGridView.RowsDefaultCellStyle = dataGridViewCellStyle20;
this.sendGridView.RowTemplate.Height = 23; this.sendGridView.RowTemplate.Height = 23;
this.sendGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.sendGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.sendGridView.Size = new System.Drawing.Size(789, 200); this.sendGridView.Size = new System.Drawing.Size(789, 200);
@ -815,6 +736,65 @@
this.commitBtn.WithStataHode = false; this.commitBtn.WithStataHode = false;
this.commitBtn.Click += new System.EventHandler(this.commitBtn_Click); this.commitBtn.Click += new System.EventHandler(this.commitBtn_Click);
// //
// alreadyViewBtn
//
this.alreadyViewBtn.AsClicked = false;
this.alreadyViewBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("alreadyViewBtn.BackgroundImage")));
this.alreadyViewBtn.EnableGroup = false;
this.alreadyViewBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.alreadyViewBtn.FlatAppearance.BorderSize = 0;
this.alreadyViewBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.alreadyViewBtn.ForeColor = System.Drawing.Color.Black;
this.alreadyViewBtn.Location = new System.Drawing.Point(31, 17);
this.alreadyViewBtn.Name = "alreadyViewBtn";
this.alreadyViewBtn.PlaySound = false;
this.alreadyViewBtn.SelfControlEnable = false;
this.alreadyViewBtn.Size = new System.Drawing.Size(100, 30);
this.alreadyViewBtn.SoundType = WinFormControl.SoundType.Click;
this.alreadyViewBtn.TabIndex = 14;
this.alreadyViewBtn.Text = "已配货";
this.alreadyViewBtn.UseVisualStyleBackColor = true;
this.alreadyViewBtn.WithStataHode = false;
this.alreadyViewBtn.Click += new System.EventHandler(this.alreadyViewBtn_Click);
//
// deleteBtn
//
this.deleteBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.deleteBtn.AsClicked = false;
this.deleteBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("deleteBtn.BackgroundImage")));
this.deleteBtn.EnableGroup = false;
this.deleteBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.deleteBtn.FlatAppearance.BorderSize = 0;
this.deleteBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.deleteBtn.ForeColor = System.Drawing.Color.Black;
this.deleteBtn.Location = new System.Drawing.Point(994, 566);
this.deleteBtn.Name = "deleteBtn";
this.deleteBtn.PlaySound = false;
this.deleteBtn.SelfControlEnable = false;
this.deleteBtn.Size = new System.Drawing.Size(100, 30);
this.deleteBtn.SoundType = WinFormControl.SoundType.Click;
this.deleteBtn.TabIndex = 16;
this.deleteBtn.Text = "删除选中";
this.deleteBtn.UseVisualStyleBackColor = true;
this.deleteBtn.WithStataHode = false;
this.deleteBtn.Click += new System.EventHandler(this.deleteBtn_Click);
//
// F_ID
//
this.F_ID.DataPropertyName = "ID";
this.F_ID.HeaderText = "ID";
this.F_ID.Name = "F_ID";
this.F_ID.ReadOnly = true;
this.F_ID.Visible = false;
//
// F_Idx
//
this.F_Idx.DataPropertyName = "Idx";
this.F_Idx.HeaderText = "序号";
this.F_Idx.Name = "F_Idx";
this.F_Idx.ReadOnly = true;
this.F_Idx.Width = 60;
//
// F_BarCode // F_BarCode
// //
this.F_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; this.F_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
@ -845,8 +825,8 @@
// F_Number // F_Number
// //
this.F_Number.DataPropertyName = "Number"; this.F_Number.DataPropertyName = "Number";
dataGridViewCellStyle55.Format = "#0.######";
this.F_Number.DefaultCellStyle = dataGridViewCellStyle55;
dataGridViewCellStyle15.Format = "#0.######";
this.F_Number.DefaultCellStyle = dataGridViewCellStyle15;
this.F_Number.HeaderText = "数量"; this.F_Number.HeaderText = "数量";
this.F_Number.Name = "F_Number"; this.F_Number.Name = "F_Number";
this.F_Number.ReadOnly = true; this.F_Number.ReadOnly = true;
@ -854,8 +834,8 @@
// F_InStoreWeight // F_InStoreWeight
// //
this.F_InStoreWeight.DataPropertyName = "InStoreWeight"; this.F_InStoreWeight.DataPropertyName = "InStoreWeight";
dataGridViewCellStyle56.Format = "#0.######";
this.F_InStoreWeight.DefaultCellStyle = dataGridViewCellStyle56;
dataGridViewCellStyle16.Format = "#0.######";
this.F_InStoreWeight.DefaultCellStyle = dataGridViewCellStyle16;
this.F_InStoreWeight.HeaderText = "入库重量"; this.F_InStoreWeight.HeaderText = "入库重量";
this.F_InStoreWeight.Name = "F_InStoreWeight"; this.F_InStoreWeight.Name = "F_InStoreWeight";
this.F_InStoreWeight.ReadOnly = true; this.F_InStoreWeight.ReadOnly = true;
@ -863,8 +843,8 @@
// F_Weight // F_Weight
// //
this.F_Weight.DataPropertyName = "Weight"; this.F_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle57.Format = "#0.######";
this.F_Weight.DefaultCellStyle = dataGridViewCellStyle57;
dataGridViewCellStyle17.Format = "#0.######";
this.F_Weight.DefaultCellStyle = dataGridViewCellStyle17;
this.F_Weight.HeaderText = "重量"; this.F_Weight.HeaderText = "重量";
this.F_Weight.Name = "F_Weight"; this.F_Weight.Name = "F_Weight";
this.F_Weight.ReadOnly = true; this.F_Weight.ReadOnly = true;
@ -872,8 +852,8 @@
// F_DiffWeight // F_DiffWeight
// //
this.F_DiffWeight.DataPropertyName = "DiffWeight"; this.F_DiffWeight.DataPropertyName = "DiffWeight";
dataGridViewCellStyle58.Format = "#0.######";
this.F_DiffWeight.DefaultCellStyle = dataGridViewCellStyle58;
dataGridViewCellStyle18.Format = "#0.######";
this.F_DiffWeight.DefaultCellStyle = dataGridViewCellStyle18;
this.F_DiffWeight.HeaderText = "差异"; this.F_DiffWeight.HeaderText = "差异";
this.F_DiffWeight.Name = "F_DiffWeight"; this.F_DiffWeight.Name = "F_DiffWeight";
this.F_DiffWeight.ReadOnly = true; this.F_DiffWeight.ReadOnly = true;
@ -881,33 +861,108 @@
// F_Time // F_Time
// //
this.F_Time.DataPropertyName = "Time"; this.F_Time.DataPropertyName = "Time";
dataGridViewCellStyle59.Format = "MM/dd HH:mm:ss";
this.F_Time.DefaultCellStyle = dataGridViewCellStyle59;
dataGridViewCellStyle19.Format = "MM/dd HH:mm:ss";
this.F_Time.DefaultCellStyle = dataGridViewCellStyle19;
this.F_Time.HeaderText = "时间"; this.F_Time.HeaderText = "时间";
this.F_Time.Name = "F_Time"; this.F_Time.Name = "F_Time";
this.F_Time.ReadOnly = true; this.F_Time.ReadOnly = true;
this.F_Time.Width = 120; this.F_Time.Width = 120;
// //
// alreadyViewBtn
// D_ID
// //
this.alreadyViewBtn.AsClicked = false;
this.alreadyViewBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("alreadyViewBtn.BackgroundImage")));
this.alreadyViewBtn.EnableGroup = false;
this.alreadyViewBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.alreadyViewBtn.FlatAppearance.BorderSize = 0;
this.alreadyViewBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.alreadyViewBtn.ForeColor = System.Drawing.Color.Black;
this.alreadyViewBtn.Location = new System.Drawing.Point(31, 17);
this.alreadyViewBtn.Name = "alreadyViewBtn";
this.alreadyViewBtn.PlaySound = false;
this.alreadyViewBtn.SelfControlEnable = false;
this.alreadyViewBtn.Size = new System.Drawing.Size(100, 30);
this.alreadyViewBtn.SoundType = WinFormControl.SoundType.Click;
this.alreadyViewBtn.TabIndex = 14;
this.alreadyViewBtn.Text = "已配货";
this.alreadyViewBtn.UseVisualStyleBackColor = true;
this.alreadyViewBtn.WithStataHode = false;
this.alreadyViewBtn.Click += new System.EventHandler(this.alreadyViewBtn_Click);
this.D_ID.DataPropertyName = "ID";
this.D_ID.HeaderText = "ID";
this.D_ID.Name = "D_ID";
this.D_ID.ReadOnly = true;
this.D_ID.Visible = false;
//
// D_HasSubmit
//
this.D_HasSubmit.DataPropertyName = "HasSubmit";
this.D_HasSubmit.HeaderText = "HasSubmit";
this.D_HasSubmit.Name = "D_HasSubmit";
this.D_HasSubmit.ReadOnly = true;
this.D_HasSubmit.Visible = false;
//
// D_SaleOutStore_ID
//
this.D_SaleOutStore_ID.DataPropertyName = "SaleOutStore_ID";
this.D_SaleOutStore_ID.HeaderText = "单号";
this.D_SaleOutStore_ID.Name = "D_SaleOutStore_ID";
this.D_SaleOutStore_ID.ReadOnly = true;
this.D_SaleOutStore_ID.Width = 90;
//
// D_Customer_Name
//
this.D_Customer_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.D_Customer_Name.DataPropertyName = "Customer_Name";
this.D_Customer_Name.HeaderText = "客户名称";
this.D_Customer_Name.MinimumWidth = 100;
this.D_Customer_Name.Name = "D_Customer_Name";
this.D_Customer_Name.ReadOnly = true;
//
// D_Goods_Code
//
this.D_Goods_Code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.D_Goods_Code.DataPropertyName = "Goods_Code";
this.D_Goods_Code.HeaderText = "产品编码";
this.D_Goods_Code.MinimumWidth = 100;
this.D_Goods_Code.Name = "D_Goods_Code";
this.D_Goods_Code.ReadOnly = true;
//
// D_Goods_Name
//
this.D_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.D_Goods_Name.DataPropertyName = "Goods_Name";
this.D_Goods_Name.HeaderText = "产品名称";
this.D_Goods_Name.MinimumWidth = 100;
this.D_Goods_Name.Name = "D_Goods_Name";
this.D_Goods_Name.ReadOnly = true;
//
// D_SecondNumber
//
this.D_SecondNumber.DataPropertyName = "SecondNumber";
dataGridViewCellStyle7.Format = "#0.######";
this.D_SecondNumber.DefaultCellStyle = dataGridViewCellStyle7;
this.D_SecondNumber.HeaderText = "辅数量";
this.D_SecondNumber.Name = "D_SecondNumber";
this.D_SecondNumber.ReadOnly = true;
//
// D_Number
//
this.D_Number.DataPropertyName = "Number";
dataGridViewCellStyle8.Format = "#0.######";
this.D_Number.DefaultCellStyle = dataGridViewCellStyle8;
this.D_Number.HeaderText = "报价数量";
this.D_Number.Name = "D_Number";
this.D_Number.ReadOnly = true;
//
// D_SSecondNumber
//
this.D_SSecondNumber.DataPropertyName = "SSecondNumber";
dataGridViewCellStyle9.Format = "#0.######";
this.D_SSecondNumber.DefaultCellStyle = dataGridViewCellStyle9;
this.D_SSecondNumber.HeaderText = "配货辅数量";
this.D_SSecondNumber.Name = "D_SSecondNumber";
this.D_SSecondNumber.ReadOnly = true;
//
// D_SNumber
//
this.D_SNumber.DataPropertyName = "SNumber";
dataGridViewCellStyle10.Format = "#0.######";
this.D_SNumber.DefaultCellStyle = dataGridViewCellStyle10;
this.D_SNumber.HeaderText = "配货数量";
this.D_SNumber.Name = "D_SNumber";
this.D_SNumber.ReadOnly = true;
//
// D_DiffNumber
//
this.D_DiffNumber.DataPropertyName = "DiffNumber";
dataGridViewCellStyle11.Format = "#0.######";
this.D_DiffNumber.DefaultCellStyle = dataGridViewCellStyle11;
this.D_DiffNumber.HeaderText = "差异数量";
this.D_DiffNumber.Name = "D_DiffNumber";
this.D_DiffNumber.ReadOnly = true;
// //
// CarcassSaleOutForm // CarcassSaleOutForm
// //
@ -915,6 +970,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White; this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1305, 611); this.ClientSize = new System.Drawing.Size(1305, 611);
this.Controls.Add(this.deleteBtn);
this.Controls.Add(this.commitBtn); this.Controls.Add(this.commitBtn);
this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
@ -985,7 +1041,20 @@
private System.Windows.Forms.DataGridViewTextBoxColumn M_SendTime; private System.Windows.Forms.DataGridViewTextBoxColumn M_SendTime;
private System.Windows.Forms.DataGridViewTextBoxColumn M_DeliverGoodsLine_Name; private System.Windows.Forms.DataGridViewTextBoxColumn M_DeliverGoodsLine_Name;
private WinFormControl.UButton clearBtn; private WinFormControl.UButton clearBtn;
private WinFormControl.UButton alreadyViewBtn;
private WinFormControl.UButton deleteBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn F_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn F_Idx;
private System.Windows.Forms.DataGridViewTextBoxColumn F_BarCode;
private System.Windows.Forms.DataGridViewTextBoxColumn F_GoodsCode;
private System.Windows.Forms.DataGridViewTextBoxColumn F_Goods_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn F_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn F_InStoreWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn F_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn F_DiffWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn F_Time;
private System.Windows.Forms.DataGridViewTextBoxColumn D_ID; private System.Windows.Forms.DataGridViewTextBoxColumn D_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn D_HasSubmit;
private System.Windows.Forms.DataGridViewTextBoxColumn D_SaleOutStore_ID; private System.Windows.Forms.DataGridViewTextBoxColumn D_SaleOutStore_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Customer_Name; private System.Windows.Forms.DataGridViewTextBoxColumn D_Customer_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Goods_Code; private System.Windows.Forms.DataGridViewTextBoxColumn D_Goods_Code;
@ -995,14 +1064,5 @@
private System.Windows.Forms.DataGridViewTextBoxColumn D_SSecondNumber; private System.Windows.Forms.DataGridViewTextBoxColumn D_SSecondNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn D_SNumber; private System.Windows.Forms.DataGridViewTextBoxColumn D_SNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn D_DiffNumber; private System.Windows.Forms.DataGridViewTextBoxColumn D_DiffNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn F_BarCode;
private System.Windows.Forms.DataGridViewTextBoxColumn F_GoodsCode;
private System.Windows.Forms.DataGridViewTextBoxColumn F_Goods_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn F_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn F_InStoreWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn F_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn F_DiffWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn F_Time;
private WinFormControl.UButton alreadyViewBtn;
} }
} }

+ 58
- 2
ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs View File

@ -83,6 +83,8 @@ namespace ButcherFactory.CarcassSaleOut_
void CarcassSaleOutForm_Resize(object sender, EventArgs e) void CarcassSaleOutForm_Resize(object sender, EventArgs e)
{ {
if (this.Height < this.MinimumSize.Height)
return;
groupBox1.Height = (this.Height - 200) / 2; groupBox1.Height = (this.Height - 200) / 2;
groupBox2.Height = groupBox1.Height; groupBox2.Height = groupBox1.Height;
groupBox2.Location = new Point(groupBox2.Location.X, groupBox1.Height + 100); groupBox2.Location = new Point(groupBox2.Location.X, groupBox1.Height + 100);
@ -96,6 +98,10 @@ namespace ButcherFactory.CarcassSaleOut_
this.Invoke(new Action(() => this.Invoke(new Action(() =>
{ {
var detail = CarcassSaleOutBL.Insert(weight); var detail = CarcassSaleOutBL.Insert(weight);
if (weightRecord.Any())
detail.Idx = weightRecord.Max(x => x.Idx) + 1;
else
detail.Idx = 1;
weightRecord.Insert(0, detail); weightRecord.Insert(0, detail);
sendGridView.FirstDisplayedScrollingRowIndex = 0; sendGridView.FirstDisplayedScrollingRowIndex = 0;
sendGridView.Refresh(); sendGridView.Refresh();
@ -110,7 +116,8 @@ namespace ButcherFactory.CarcassSaleOut_
throw new Exception("条码错误"); throw new Exception("条码错误");
var first = weightRecord.LastOrDefault(x => !x.Filled); var first = weightRecord.LastOrDefault(x => !x.Filled);
if (first == null) if (first == null)
throw new Exception("请先过磅");
return;
//throw new Exception("请先过磅");
CarcassSaleOutBL.FillDetail(first, barCode, batchID); CarcassSaleOutBL.FillDetail(first, barCode, batchID);
sendGridView.Refresh(); sendGridView.Refresh();
} }
@ -130,10 +137,17 @@ namespace ButcherFactory.CarcassSaleOut_
} }
private void goodsFinishBtn_Click(object sender, EventArgs e) private void goodsFinishBtn_Click(object sender, EventArgs e)
{
{
if (mainGridView.CurrentRow == null) if (mainGridView.CurrentRow == null)
throw new Exception("请选择要配货完成的发货单"); throw new Exception("请选择要配货完成的发货单");
var id = (long)mainGridView.CurrentRow.Cells[0].Value; var id = (long)mainGridView.CurrentRow.Cells[0].Value;
var details = CarcassSaleOutBL.GetSaleOutStoreDetailList(id);
if (details.Any(x => x.SSecondNumber == null || x.SSecondNumber == 0))
{
if (MessageBox.Show("有未配货的明细,确认配货完成?", "配货完成确认", MessageBoxButtons.OKCancel) != DialogResult.OK)
return;
}
CarcassSaleOutBL.SetGoodsFinish(id); CarcassSaleOutBL.SetGoodsFinish(id);
saleOutStoreList.Remove(saleOutStoreList.First(x => x.ID == id)); saleOutStoreList.Remove(saleOutStoreList.First(x => x.ID == id));
mainGridView.Refresh(); mainGridView.Refresh();
@ -271,5 +285,47 @@ namespace ButcherFactory.CarcassSaleOut_
mainGridView.DataSource = saleOutStoreList; mainGridView.DataSource = saleOutStoreList;
mainGridView.Refresh(); mainGridView.Refresh();
} }
private void deleteBtn_Click(object sender, EventArgs e)
{
if (sendGridView.CurrentRow == null)
return;
var id = (long)sendGridView.CurrentRow.Cells[0].Value;
CarcassSaleOutBL.Delete(id);
var tag = weightRecord.First(x => x.ID == id);
weightRecord.Remove(tag);
foreach (var item in weightRecord.Where(x => x.Idx > tag.Idx))
item.Idx -= 1;
sendGridView.Refresh();
}
private void orderGridView_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)
{
DataGridViewRow dgrSingle = orderGridView.Rows[e.RowIndex];
var v = (decimal?)dgrSingle.Cells["D_SNumber"].Value;
if (v.HasValue && v > 0)
{
dgrSingle.DefaultCellStyle.BackColor = Color.YellowGreen;
}
}
private void orderGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < orderGridView.Columns.Count - 3)
return;
var keyBoard = new NumberPad();
if (keyBoard.ShowDialog() == true)
{
decimal n = 0;
if (decimal.TryParse(keyBoard.Result, out n))
{
var d = details.First(x => x.ID == (long)orderGridView.CurrentRow.Cells[0].Value);
CarcassSaleOutBL.SaveAssignNum(d.ID, n);
d.SNumber = n;
orderGridView.Refresh();
}
}
}
} }
} }

+ 17
- 0
ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.resx View File

@ -181,6 +181,9 @@
<metadata name="D_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="D_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="D_HasSubmit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_SaleOutStore_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="D_SaleOutStore_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
@ -208,6 +211,12 @@
<metadata name="D_DiffNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="D_DiffNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="F_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="F_Idx.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="F_BarCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="F_BarCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
@ -238,6 +247,14 @@
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="deleteBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value> </value>
</data> </data>
</root> </root>

Loading…
Cancel
Save