From c44e61da0664ecd3371e1e4771a5d5de08ffddfb Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Mon, 5 Feb 2018 14:53:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/Utils/AfterLoginUtil.cs | 52 +- MaterialRequisition/App.config | 6 - MaterialRequisition/GoodsSetForm.Designer.cs | 118 ++++ MaterialRequisition/GoodsSetForm.cs | 183 ++++++ MaterialRequisition/GoodsSetForm.resx | 120 ++++ .../MaterialRequisition.csproj | 19 +- .../MaterialRequisitionForm.Designer.cs | 536 ++++++++++-------- .../MaterialRequisitionForm.cs | 118 +++- .../MaterialRequisitionGoodsSet.cs | 14 + MaterialRequisition/Program.cs | 22 - .../TrunksIousOutInStoreForm.cs | 2 +- 11 files changed, 904 insertions(+), 286 deletions(-) delete mode 100644 MaterialRequisition/App.config create mode 100644 MaterialRequisition/GoodsSetForm.Designer.cs create mode 100644 MaterialRequisition/GoodsSetForm.cs create mode 100644 MaterialRequisition/GoodsSetForm.resx create mode 100644 MaterialRequisition/MaterialRequisitionGoodsSet.cs delete mode 100644 MaterialRequisition/Program.cs diff --git a/BO/Utils/AfterLoginUtil.cs b/BO/Utils/AfterLoginUtil.cs index 5762a70..02e7bed 100644 --- a/BO/Utils/AfterLoginUtil.cs +++ b/BO/Utils/AfterLoginUtil.cs @@ -19,33 +19,34 @@ namespace BO.Utils public static class AfterLoginUtil { #if DEBUG -// static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), -// new Tuple("过磅员",@"C:\B3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), -// new Tuple("验质员",@"C:\B3\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), -// new Tuple("定级员",@"C:\\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), -// new Tuple("窒晕员",@"C:\B3\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), -// new Tuple("胴体白条出入库",@"C:\B3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"), -// new Tuple("掉猪处理员",@"C:\B3\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"), -// new Tuple("配货员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\Distribution\bin\Debug\Distribution"), -// new Tuple("分割称重",@"C:\B3\src\B3ButcherManageClient\SegmentationWeight\bin\Debug\SegmentationWeight"), -// new Tuple("分割入库",@"C:\B3\src\B3ButcherManageClient\SegmentationInStore\bin\Debug\SegmentationInStore"), -// new Tuple("定级校验",@"C:\B3\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), -// }; + static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), + new Tuple("过磅员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), + new Tuple("验质员",@"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), + new Tuple("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), + new Tuple("窒晕员",@"C:\BwpB3Project\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), + new Tuple("白条入库",@"C:\BwpB3Project\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"), + new Tuple("掉猪处理员",@"C:\BwpB3Project\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"), + new Tuple("配货员",@"C:\BwpB3Project\src\B3ButcherManageClient\Distribution\bin\Debug\Distribution"), + new Tuple("分割称重",@"C:\BwpB3Project\src\B3ButcherManageClient\SegmentationWeight\bin\Debug\SegmentationWeight"), + new Tuple("分割入库",@"C:\BwpB3Project\src\B3ButcherManageClient\SegmentationInStore\bin\Debug\SegmentationInStore"), + new Tuple("定级校验",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), + new Tuple("领料退料",@"C:\BwpB3Project\src\B3ButcherManageClient\MaterialRequisition\bin\Debug\MaterialRequisition"), + }; //luanhui 公司电脑 - static List> roleToAssemblies = new List>(){ - new Tuple("排宰员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), - new Tuple("过磅员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), - new Tuple("验质员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), - new Tuple("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), - new Tuple("窒晕员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), - new Tuple("白条入库",@"D:\BWP\BWPB3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"), - new Tuple("掉猪处理员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"), - new Tuple("配货员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\Distribution\bin\Debug\Distribution"), - new Tuple("分割称重",@"D:\BWP\BWPB3\src\B3ButcherManageClient\SegmentationWeight\bin\Debug\SegmentationWeight"), - new Tuple("分割入库",@"D:\BWP\BWPB3\src\B3ButcherManageClient\SegmentationInStore\bin\Debug\SegmentationInStore"), - new Tuple("定级校验",@"D:\BWP\BWPB3\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), - }; + //static List> roleToAssemblies = new List>(){ + // new Tuple("排宰员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), + // new Tuple("过磅员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), + // new Tuple("验质员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), + // new Tuple("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), + // new Tuple("窒晕员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), + // new Tuple("白条入库",@"D:\BWP\BWPB3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"), + // new Tuple("掉猪处理员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"), + // new Tuple("配货员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\Distribution\bin\Debug\Distribution"), + // new Tuple("分割称重",@"D:\BWP\BWPB3\src\B3ButcherManageClient\SegmentationWeight\bin\Debug\SegmentationWeight"), + // new Tuple("分割入库",@"D:\BWP\BWPB3\src\B3ButcherManageClient\SegmentationInStore\bin\Debug\SegmentationInStore"), + // new Tuple("定级校验",@"D:\BWP\BWPB3\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), + //}; #else static List> roleToAssemblies = new List>() { @@ -59,6 +60,7 @@ namespace BO.Utils new Tuple("分割入库",@"SegmentationInStore"), new Tuple("定级校验",@"WeighAndGrading"), new Tuple("白条入库",@"TrunksIousOutInStore"), + new Tuple("领料退料",@"MaterialRequisition"), }; #endif diff --git a/MaterialRequisition/App.config b/MaterialRequisition/App.config deleted file mode 100644 index 8e15646..0000000 --- a/MaterialRequisition/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/MaterialRequisition/GoodsSetForm.Designer.cs b/MaterialRequisition/GoodsSetForm.Designer.cs new file mode 100644 index 0000000..16a560c --- /dev/null +++ b/MaterialRequisition/GoodsSetForm.Designer.cs @@ -0,0 +1,118 @@ +namespace MaterialRequisition +{ + partial class GoodsSetForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.flpClass = new System.Windows.Forms.FlowLayoutPanel(); + this.flpGoods = new System.Windows.Forms.FlowLayoutPanel(); + this.btnSave = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.btnSave); + this.splitContainer1.Panel1.Controls.Add(this.flpClass); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.flpGoods); + this.splitContainer1.Size = new System.Drawing.Size(1145, 600); + this.splitContainer1.SplitterDistance = 72; + this.splitContainer1.SplitterWidth = 1; + this.splitContainer1.TabIndex = 0; + // + // flpClass + // + this.flpClass.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flpClass.Location = new System.Drawing.Point(3, 3); + this.flpClass.Name = "flpClass"; + this.flpClass.Size = new System.Drawing.Size(991, 64); + this.flpClass.TabIndex = 0; + // + // flpGoods + // + this.flpGoods.Dock = System.Windows.Forms.DockStyle.Fill; + this.flpGoods.Location = new System.Drawing.Point(0, 0); + this.flpGoods.Name = "flpGoods"; + this.flpGoods.Size = new System.Drawing.Size(1143, 525); + this.flpGoods.TabIndex = 0; + // + // btnSave + // + this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnSave.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.Location = new System.Drawing.Point(1001, 3); + this.btnSave.Name = "btnSave"; + this.btnSave.Size = new System.Drawing.Size(114, 64); + this.btnSave.TabIndex = 1; + this.btnSave.Text = "保存"; + this.btnSave.UseVisualStyleBackColor = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // SegmentationWeightGoodsSetForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1145, 600); + this.Controls.Add(this.splitContainer1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "SegmentationWeightGoodsSetForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "产品配置"; + this.Load += new System.EventHandler(this.SegmentationWeightGoodsSetForm_Load); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.FlowLayoutPanel flpClass; + private System.Windows.Forms.FlowLayoutPanel flpGoods; + private System.Windows.Forms.Button btnSave; + } +} \ No newline at end of file diff --git a/MaterialRequisition/GoodsSetForm.cs b/MaterialRequisition/GoodsSetForm.cs new file mode 100644 index 0000000..72a2a55 --- /dev/null +++ b/MaterialRequisition/GoodsSetForm.cs @@ -0,0 +1,183 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using BO.BO.Dtos; +using BO.Utils; +using BO.Utils.BillRpc; + +namespace MaterialRequisition +{ + public partial class GoodsSetForm : Form + { + public readonly static string MaterialRequisitionGoodsSetFileName = "MaterialRequisitionGoodsSet.xml"; + private List mLocaList; + private List mWillDeleteList; + + public GoodsSetForm() + { + InitializeComponent(); + } + + private void SegmentationWeightGoodsSetForm_Load(object sender, EventArgs e) + { + // CheckAddCreateConfig(); + mLocaList = XmlUtil.DeserializeFromFile>(MaterialRequisitionGoodsSetFileName); + + if (LoginRpcUtil.TestConnection(1000)) + { + var fromRpclist = ClientGoodsSetRpc.GetList(); + foreach (ClientGoodsSetDto rpcSet in fromRpclist) + { + var set = new MaterialRequisitionGoodsSet(); + set.Name = rpcSet.Name; + set.Goods_ID = rpcSet.Goods_ID; + set.Goods_Name = rpcSet.Goods_Name; + set.Goods_Code = rpcSet.Goods_Code; + set.Goods_Spec = rpcSet.Goods_Spec; + set.StandardWeight = rpcSet.StandardWeight; + set.StandardWeightUp = rpcSet.StandardWeightUp; + set.StandardWeightLow = rpcSet.StandardWeightLow; + var fd = mLocaList.FirstOrDefault(x => x.Goods_ID == set.Goods_ID); + if (fd != null) + { + fd.Name = set.Name; + fd.Goods_Name = set.Goods_Name; + fd.Goods_Code = set.Goods_Code; + fd.Goods_Spec = set.Goods_Spec; + fd.StandardWeight = rpcSet.StandardWeight; + fd.StandardWeightUp = rpcSet.StandardWeightUp; + fd.StandardWeightLow = rpcSet.StandardWeightLow; + } + else + { + mLocaList.Add(set); + } + } + var localist = mLocaList.ToList(); + var removeList = new List(); + foreach (MaterialRequisitionGoodsSet segmentationWeightGoodSet in localist) + { + if (fromRpclist.All(x => x.Goods_ID != segmentationWeightGoodSet.Goods_ID)) + { + removeList.Add(segmentationWeightGoodSet); + } + } + + foreach (MaterialRequisitionGoodsSet set in removeList) + { + mLocaList.Remove(set); + } + XmlUtil.SerializerObjToFile(mLocaList, MaterialRequisitionGoodsSetFileName); + } + + InitControl(); + + } + + private void InitControl() + { + flpClass.Controls.Clear(); + foreach (var grouping in mLocaList.GroupBy(x => x.Name)) + { + var btn = CreateClassButton(grouping.Key); + flpClass.Controls.Add(btn); + + } + } + + private Button CreateClassButton(string text) + { + var button = new Button(); + button.Text = text; + button.Click += classButton_Click; + button.Width = 100; + button.Height = 60; + return button; + + } + + private void classButton_Click(object sender, EventArgs e) + { + var btn = sender as Button; + foreach (Button cbutton in flpClass.Controls) + { + if (btn.Text == cbutton.Text) + { + cbutton.BackColor = Color.Aqua; + } + else + { + cbutton.BackColor = SystemColors.Control; + } + } + + + flpGoods.Controls.Clear(); + foreach (MaterialRequisitionGoodsSet set in mLocaList.Where(x => x.Name == btn.Text)) + { + var button = CreateGoodsButton(set); + flpGoods.Controls.Add(button); + } + + } + + private Button CreateGoodsButton(MaterialRequisitionGoodsSet set) + { + var btn=new Button(); + btn.Text = set.Goods_Name; + btn.Tag = set; + btn.Click += GoodsBtn_Click; + btn.Width = 100; + btn.Height = 60; + if (set.IsSelected) + { + btn.BackColor=Color.Aqua; + } + + return btn; + } + + private void GoodsBtn_Click(object sender, EventArgs e) + { + var btn = sender as Button; + var set = btn.Tag as MaterialRequisitionGoodsSet; + if (btn.BackColor == Color.Aqua) + { + set.IsSelected = false; + btn.BackColor = SystemColors.Control; + } + else + { + set.IsSelected = true; + btn.BackColor = Color.Aqua; + } + } + + private void CheckAddCreateConfig() + { + if (!File.Exists(MaterialRequisitionGoodsSetFileName)) + { + var list = new List(); + XmlUtil.SerializerObjToFile(list, MaterialRequisitionGoodsSetFileName); + } + } + + private void btnSave_Click(object sender, EventArgs e) + { + if (mLocaList != null) + { + XmlUtil.SerializerObjToFile(mLocaList, MaterialRequisitionGoodsSetFileName); + DialogResult = DialogResult.OK; + } + Close(); + + } + } +} diff --git a/MaterialRequisition/GoodsSetForm.resx b/MaterialRequisition/GoodsSetForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/MaterialRequisition/GoodsSetForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MaterialRequisition/MaterialRequisition.csproj b/MaterialRequisition/MaterialRequisition.csproj index 073ff44..3046501 100644 --- a/MaterialRequisition/MaterialRequisition.csproj +++ b/MaterialRequisition/MaterialRequisition.csproj @@ -5,7 +5,7 @@ Debug AnyCPU {756CB09C-D46E-4BFD-8417-4EA531102E4A} - WinExe + Library MaterialRequisition MaterialRequisition v4.5 @@ -30,6 +30,9 @@ prompt 4 + + + ..\ButcherManageClient\bin\Debug\AutoMapper.dll @@ -70,11 +73,17 @@ MaterialRequisitionForm.cs + - + + Form + + + GoodsSetForm.cs + MaterialRequisitionForm.cs @@ -87,6 +96,9 @@ True Resources.resx + + GoodsSetForm.cs + SettingsSingleFileGenerator Settings.Designer.cs @@ -97,9 +109,6 @@ True - - - {8968f14a-c7c7-4751-96ce-b114fbfd65ef} diff --git a/MaterialRequisition/MaterialRequisitionForm.Designer.cs b/MaterialRequisition/MaterialRequisitionForm.Designer.cs index 046da38..b2e6547 100644 --- a/MaterialRequisition/MaterialRequisitionForm.Designer.cs +++ b/MaterialRequisition/MaterialRequisitionForm.Designer.cs @@ -28,16 +28,31 @@ /// private void InitializeComponent() { - 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 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 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(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.groupBox2 = new System.Windows.Forms.GroupBox(); + 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.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.dataGridViewUnSubmit = new BWP.WinFormControl.UDataGridView(); + 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.un数量 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.btnCommit = new System.Windows.Forms.Button(); this.btnDelete = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); @@ -54,33 +69,26 @@ this.panel2 = new System.Windows.Forms.Panel(); this.lblChengZhong = new System.Windows.Forms.Label(); this.btnWeightSet = new System.Windows.Forms.Button(); - this.dataGridViewSubmited = new BWP.WinFormControl.UDataGridView(); - 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.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.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel4 = new System.Windows.Forms.Panel(); - this.label1 = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.textBox2 = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); this.textBox3 = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.cbxBatch = new System.Windows.Forms.ComboBox(); + this.cbxStore = new System.Windows.Forms.ComboBox(); + this.lbStore = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.btnGoodsSet = new System.Windows.Forms.Button(); + this.flpGoods = new System.Windows.Forms.FlowLayoutPanel(); + this.flpClass = new System.Windows.Forms.FlowLayoutPanel(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridViewSubmited)).BeginInit(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewUnSubmit)).BeginInit(); this.panel1.SuspendLayout(); @@ -88,7 +96,6 @@ ((System.ComponentModel.ISupportInitialize)(this.picNetStatus)).BeginInit(); this.panel3.SuspendLayout(); this.panel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewSubmited)).BeginInit(); this.panel4.SuspendLayout(); this.SuspendLayout(); // @@ -107,6 +114,9 @@ // // splitContainer1.Panel2 // + this.splitContainer1.Panel2.Controls.Add(this.btnGoodsSet); + this.splitContainer1.Panel2.Controls.Add(this.flpGoods); + this.splitContainer1.Panel2.Controls.Add(this.flpClass); this.splitContainer1.Panel2.Controls.Add(this.panel4); this.splitContainer1.Size = new System.Drawing.Size(1131, 625); this.splitContainer1.SplitterDistance = 782; @@ -124,6 +134,94 @@ this.groupBox2.TabStop = false; this.groupBox2.Text = "历史领料"; // + // dataGridViewSubmited + // + this.dataGridViewSubmited.AllowUserToAddRows = false; + this.dataGridViewSubmited.AllowUserToDeleteRows = false; + this.dataGridViewSubmited.AllowUserToResizeColumns = false; + this.dataGridViewSubmited.AllowUserToResizeRows = false; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.dataGridViewSubmited.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + this.dataGridViewSubmited.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.dataGridViewSubmited.BackgroundColor = System.Drawing.Color.White; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridViewSubmited.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; + this.dataGridViewSubmited.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridViewSubmited.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.dataGridViewTextBoxColumn1, + this.dataGridViewTextBoxColumn2, + this.dataGridViewTextBoxColumn3, + this.dataGridViewTextBoxColumn4, + this.dataGridViewTextBoxColumn5, + this.dataGridViewTextBoxColumn6, + this.dataGridViewTextBoxColumn7}); + this.dataGridViewSubmited.Location = new System.Drawing.Point(6, 21); + this.dataGridViewSubmited.MultiSelect = false; + this.dataGridViewSubmited.Name = "dataGridViewSubmited"; + this.dataGridViewSubmited.ReadOnly = true; + this.dataGridViewSubmited.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.dataGridViewSubmited.RowsDefaultCellStyle = dataGridViewCellStyle9; + this.dataGridViewSubmited.RowTemplate.Height = 23; + this.dataGridViewSubmited.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridViewSubmited.Size = new System.Drawing.Size(761, 177); + this.dataGridViewSubmited.TabIndex = 2; + // + // dataGridViewTextBoxColumn1 + // + 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.HeaderText = "条码"; + this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; + this.dataGridViewTextBoxColumn2.ReadOnly = true; + this.dataGridViewTextBoxColumn2.Width = 65; + // + // dataGridViewTextBoxColumn3 + // + this.dataGridViewTextBoxColumn3.HeaderText = "编码"; + this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; + this.dataGridViewTextBoxColumn3.ReadOnly = true; + // + // dataGridViewTextBoxColumn4 + // + this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.dataGridViewTextBoxColumn4.HeaderText = "名称"; + this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; + this.dataGridViewTextBoxColumn4.ReadOnly = true; + this.dataGridViewTextBoxColumn4.Width = 65; + // + // dataGridViewTextBoxColumn5 + // + this.dataGridViewTextBoxColumn5.HeaderText = "重量"; + this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; + this.dataGridViewTextBoxColumn5.ReadOnly = true; + // + // dataGridViewTextBoxColumn6 + // + this.dataGridViewTextBoxColumn6.HeaderText = "单位"; + this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; + this.dataGridViewTextBoxColumn6.ReadOnly = true; + // + // dataGridViewTextBoxColumn7 + // + this.dataGridViewTextBoxColumn7.HeaderText = "数量"; + this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; + this.dataGridViewTextBoxColumn7.ReadOnly = true; + // // groupBox1 // this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -145,20 +243,20 @@ this.dataGridViewUnSubmit.AllowUserToDeleteRows = false; this.dataGridViewUnSubmit.AllowUserToResizeColumns = false; this.dataGridViewUnSubmit.AllowUserToResizeRows = false; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.dataGridViewUnSubmit.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; + 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) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dataGridViewUnSubmit.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridViewUnSubmit.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; + 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.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.un序号, @@ -173,14 +271,61 @@ this.dataGridViewUnSubmit.Name = "dataGridViewUnSubmit"; this.dataGridViewUnSubmit.ReadOnly = true; this.dataGridViewUnSubmit.RowHeadersVisible = false; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.dataGridViewUnSubmit.RowsDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.dataGridViewUnSubmit.RowsDefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewUnSubmit.RowTemplate.Height = 23; this.dataGridViewUnSubmit.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridViewUnSubmit.Size = new System.Drawing.Size(761, 189); this.dataGridViewUnSubmit.TabIndex = 1; // + // un序号 + // + this.un序号.HeaderText = "序号"; + this.un序号.Name = "un序号"; + this.un序号.ReadOnly = true; + this.un序号.Width = 80; + // + // un条码 + // + this.un条码.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.un条码.HeaderText = "条码"; + this.un条码.Name = "un条码"; + this.un条码.ReadOnly = true; + this.un条码.Width = 65; + // + // un编码 + // + this.un编码.HeaderText = "编码"; + this.un编码.Name = "un编码"; + this.un编码.ReadOnly = true; + // + // un名称 + // + this.un名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.un名称.HeaderText = "名称"; + this.un名称.Name = "un名称"; + this.un名称.ReadOnly = true; + this.un名称.Width = 65; + // + // un重量 + // + this.un重量.HeaderText = "重量"; + this.un重量.Name = "un重量"; + this.un重量.ReadOnly = true; + // + // un单位 + // + this.un单位.HeaderText = "单位"; + this.un单位.Name = "un单位"; + this.un单位.ReadOnly = true; + // + // un数量 + // + this.un数量.HeaderText = "数量"; + this.un数量.Name = "un数量"; + this.un数量.ReadOnly = true; + // // btnCommit // this.btnCommit.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -213,7 +358,7 @@ this.panel1.Controls.Add(this.btnWeightSet); this.panel1.Location = new System.Drawing.Point(8, 8); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(763, 123); + this.panel1.Size = new System.Drawing.Size(763, 125); this.panel1.TabIndex = 3; // // btnEnableWeight @@ -268,13 +413,17 @@ // this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel3.Controls.Add(this.cbxBatch); + this.panel3.Controls.Add(this.cbxStore); + this.panel3.Controls.Add(this.lbStore); + this.panel3.Controls.Add(this.label6); this.panel3.Controls.Add(this.cbxWorkUnit); this.panel3.Controls.Add(this.label5); this.panel3.Controls.Add(this.cbxWorkShop); this.panel3.Controls.Add(this.label4); - this.panel3.Location = new System.Drawing.Point(569, 3); + this.panel3.Location = new System.Drawing.Point(556, 3); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(191, 114); + this.panel3.Size = new System.Drawing.Size(204, 118); this.panel3.TabIndex = 34; // // cbxWorkUnit @@ -282,7 +431,7 @@ this.cbxWorkUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbxWorkUnit.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cbxWorkUnit.FormattingEnabled = true; - this.cbxWorkUnit.Location = new System.Drawing.Point(57, 48); + this.cbxWorkUnit.Location = new System.Drawing.Point(69, 32); this.cbxWorkUnit.Name = "cbxWorkUnit"; this.cbxWorkUnit.Size = new System.Drawing.Size(121, 24); this.cbxWorkUnit.TabIndex = 40; @@ -290,18 +439,18 @@ // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(9, 55); + this.label5.Location = new System.Drawing.Point(3, 38); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(41, 12); + this.label5.Size = new System.Drawing.Size(65, 12); this.label5.TabIndex = 37; - this.label5.Text = "单元:"; + this.label5.Text = "工作单元:"; // // cbxWorkShop // this.cbxWorkShop.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbxWorkShop.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cbxWorkShop.FormattingEnabled = true; - this.cbxWorkShop.Location = new System.Drawing.Point(57, 7); + this.cbxWorkShop.Location = new System.Drawing.Point(69, 4); this.cbxWorkShop.Name = "cbxWorkShop"; this.cbxWorkShop.Size = new System.Drawing.Size(121, 24); this.cbxWorkShop.TabIndex = 41; @@ -309,11 +458,11 @@ // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(9, 11); + this.label4.Location = new System.Drawing.Point(3, 8); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(41, 12); + this.label4.Size = new System.Drawing.Size(65, 12); this.label4.TabIndex = 38; - this.label4.Text = "车间:"; + this.label4.Text = "车 间:"; // // panel2 // @@ -345,141 +494,6 @@ this.btnWeightSet.Text = "称设置"; this.btnWeightSet.UseVisualStyleBackColor = true; // - // dataGridViewSubmited - // - this.dataGridViewSubmited.AllowUserToAddRows = false; - this.dataGridViewSubmited.AllowUserToDeleteRows = false; - this.dataGridViewSubmited.AllowUserToResizeColumns = false; - this.dataGridViewSubmited.AllowUserToResizeRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.dataGridViewSubmited.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewSubmited.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - 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; - this.dataGridViewSubmited.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewSubmited.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.dataGridViewTextBoxColumn1, - this.dataGridViewTextBoxColumn2, - this.dataGridViewTextBoxColumn3, - this.dataGridViewTextBoxColumn4, - this.dataGridViewTextBoxColumn5, - this.dataGridViewTextBoxColumn6, - this.dataGridViewTextBoxColumn7}); - this.dataGridViewSubmited.Location = new System.Drawing.Point(6, 21); - this.dataGridViewSubmited.MultiSelect = false; - this.dataGridViewSubmited.Name = "dataGridViewSubmited"; - this.dataGridViewSubmited.ReadOnly = true; - this.dataGridViewSubmited.RowHeadersVisible = false; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.dataGridViewSubmited.RowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridViewSubmited.RowTemplate.Height = 23; - this.dataGridViewSubmited.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridViewSubmited.Size = new System.Drawing.Size(761, 177); - this.dataGridViewSubmited.TabIndex = 2; - // - // un序号 - // - this.un序号.HeaderText = "序号"; - this.un序号.Name = "un序号"; - this.un序号.ReadOnly = true; - this.un序号.Width = 80; - // - // un条码 - // - this.un条码.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.un条码.HeaderText = "条码"; - this.un条码.Name = "un条码"; - this.un条码.ReadOnly = true; - this.un条码.Width = 65; - // - // un编码 - // - this.un编码.HeaderText = "编码"; - this.un编码.Name = "un编码"; - this.un编码.ReadOnly = true; - // - // un名称 - // - this.un名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.un名称.HeaderText = "名称"; - this.un名称.Name = "un名称"; - this.un名称.ReadOnly = true; - this.un名称.Width = 65; - // - // un重量 - // - this.un重量.HeaderText = "重量"; - this.un重量.Name = "un重量"; - this.un重量.ReadOnly = true; - // - // un单位 - // - this.un单位.HeaderText = "单位"; - this.un单位.Name = "un单位"; - this.un单位.ReadOnly = true; - // - // un数量 - // - this.un数量.HeaderText = "数量"; - this.un数量.Name = "un数量"; - this.un数量.ReadOnly = true; - // - // dataGridViewTextBoxColumn1 - // - 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.HeaderText = "条码"; - this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; - this.dataGridViewTextBoxColumn2.ReadOnly = true; - this.dataGridViewTextBoxColumn2.Width = 65; - // - // dataGridViewTextBoxColumn3 - // - this.dataGridViewTextBoxColumn3.HeaderText = "编码"; - this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; - this.dataGridViewTextBoxColumn3.ReadOnly = true; - // - // dataGridViewTextBoxColumn4 - // - this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.dataGridViewTextBoxColumn4.HeaderText = "名称"; - this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; - this.dataGridViewTextBoxColumn4.ReadOnly = true; - this.dataGridViewTextBoxColumn4.Width = 65; - // - // dataGridViewTextBoxColumn5 - // - this.dataGridViewTextBoxColumn5.HeaderText = "重量"; - this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; - this.dataGridViewTextBoxColumn5.ReadOnly = true; - // - // dataGridViewTextBoxColumn6 - // - this.dataGridViewTextBoxColumn6.HeaderText = "单位"; - this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; - this.dataGridViewTextBoxColumn6.ReadOnly = true; - // - // dataGridViewTextBoxColumn7 - // - this.dataGridViewTextBoxColumn7.HeaderText = "数量"; - this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; - this.dataGridViewTextBoxColumn7.ReadOnly = true; - // // panel4 // this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; @@ -494,23 +508,32 @@ this.panel4.Size = new System.Drawing.Size(339, 197); this.panel4.TabIndex = 0; // - // label1 + // textBox3 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(4, 14); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(29, 12); - this.label1.TabIndex = 0; - this.label1.Text = "条码"; + this.textBox3.Enabled = false; + this.textBox3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.textBox3.Location = new System.Drawing.Point(39, 87); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(113, 26); + this.textBox3.TabIndex = 1; // - // textBox1 + // label3 // - this.textBox1.Enabled = false; - this.textBox1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBox1.Location = new System.Drawing.Point(39, 7); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(290, 26); - this.textBox1.TabIndex = 1; + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(4, 94); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(29, 12); + this.label3.TabIndex = 0; + this.label3.Text = "重量"; + // + // textBox2 + // + this.textBox2.Enabled = false; + this.textBox2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.textBox2.Location = new System.Drawing.Point(39, 44); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(290, 26); + this.textBox2.TabIndex = 1; // // label2 // @@ -521,32 +544,94 @@ this.label2.TabIndex = 0; this.label2.Text = "品名"; // - // textBox2 + // textBox1 // - this.textBox2.Enabled = false; - this.textBox2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBox2.Location = new System.Drawing.Point(39, 44); - this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(290, 26); - this.textBox2.TabIndex = 1; + this.textBox1.Enabled = false; + this.textBox1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.textBox1.Location = new System.Drawing.Point(39, 7); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(290, 26); + this.textBox1.TabIndex = 1; // - // label3 + // label1 // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(4, 94); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(29, 12); - this.label3.TabIndex = 0; - this.label3.Text = "重量"; + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(4, 14); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(29, 12); + this.label1.TabIndex = 0; + this.label1.Text = "条码"; // - // textBox3 + // cbxBatch + // + this.cbxBatch.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbxBatch.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cbxBatch.FormattingEnabled = true; + this.cbxBatch.Location = new System.Drawing.Point(69, 89); + this.cbxBatch.Name = "cbxBatch"; + this.cbxBatch.Size = new System.Drawing.Size(121, 24); + this.cbxBatch.TabIndex = 46; + // + // cbxStore + // + this.cbxStore.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbxStore.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cbxStore.FormattingEnabled = true; + this.cbxStore.Location = new System.Drawing.Point(69, 60); + this.cbxStore.Name = "cbxStore"; + this.cbxStore.Size = new System.Drawing.Size(121, 24); + this.cbxStore.TabIndex = 47; + // + // lbStore + // + this.lbStore.AutoSize = true; + this.lbStore.Location = new System.Drawing.Point(3, 96); + this.lbStore.Name = "lbStore"; + this.lbStore.Size = new System.Drawing.Size(65, 12); + this.lbStore.TabIndex = 44; + this.lbStore.Text = "批 次:"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(3, 67); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(65, 12); + this.label6.TabIndex = 45; + this.label6.Text = "仓 库:"; + // + // btnGoodsSet + // + this.btnGoodsSet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnGoodsSet.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnGoodsSet.Location = new System.Drawing.Point(280, 212); + this.btnGoodsSet.Name = "btnGoodsSet"; + this.btnGoodsSet.Size = new System.Drawing.Size(62, 76); + this.btnGoodsSet.TabIndex = 37; + this.btnGoodsSet.Text = "产品设置"; + this.btnGoodsSet.UseVisualStyleBackColor = true; + this.btnGoodsSet.Click += new System.EventHandler(this.btnGoodsSet_Click); + // + // flpGoods + // + this.flpGoods.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flpGoods.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.flpGoods.Location = new System.Drawing.Point(4, 294); + this.flpGoods.Name = "flpGoods"; + this.flpGoods.Size = new System.Drawing.Size(341, 319); + this.flpGoods.TabIndex = 36; // - this.textBox3.Enabled = false; - this.textBox3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBox3.Location = new System.Drawing.Point(39, 87); - this.textBox3.Name = "textBox3"; - this.textBox3.Size = new System.Drawing.Size(113, 26); - this.textBox3.TabIndex = 1; + // flpClass + // + this.flpClass.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flpClass.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.flpClass.Location = new System.Drawing.Point(3, 212); + this.flpClass.Name = "flpClass"; + this.flpClass.Size = new System.Drawing.Size(271, 76); + this.flpClass.TabIndex = 35; // // MaterialRequisitionForm // @@ -564,6 +649,7 @@ ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); this.groupBox2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridViewSubmited)).EndInit(); this.groupBox1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewUnSubmit)).EndInit(); this.panel1.ResumeLayout(false); @@ -574,7 +660,6 @@ this.panel3.PerformLayout(); this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewSubmited)).EndInit(); this.panel4.ResumeLayout(false); this.panel4.PerformLayout(); this.ResumeLayout(false); @@ -626,6 +711,13 @@ private System.Windows.Forms.Label label2; private System.Windows.Forms.TextBox textBox3; private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox cbxBatch; + private System.Windows.Forms.ComboBox cbxStore; + private System.Windows.Forms.Label lbStore; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Button btnGoodsSet; + private System.Windows.Forms.FlowLayoutPanel flpGoods; + private System.Windows.Forms.FlowLayoutPanel flpClass; } } diff --git a/MaterialRequisition/MaterialRequisitionForm.cs b/MaterialRequisition/MaterialRequisitionForm.cs index a2b87ae..ac9d54c 100644 --- a/MaterialRequisition/MaterialRequisitionForm.cs +++ b/MaterialRequisition/MaterialRequisitionForm.cs @@ -29,7 +29,7 @@ namespace MaterialRequisition { return this; } - + private List mSetList; private readonly string mDropDownSetsFileName = "MaterialRequisition_DropDownSets.xml"; private DropDownSets mDropDownSets; #region weightNeed @@ -70,6 +70,7 @@ namespace MaterialRequisition }; InitCombox(); + InitControl(); _tdSyncLocalToMiddleDb = new Thread(SyncLocalToMiddleDb); _tdSyncLocalToMiddleDb.Start(); @@ -191,9 +192,22 @@ namespace MaterialRequisition { cbxWorkUnit.DataSource = unit.Details; cbxWorkUnit.DisplayMember = "Name"; - cbxWorkUnit.ValueMember = "Code"; + cbxWorkUnit.ValueMember = "ID"; + } + var store = mDropDownSets.Details.FirstOrDefault(x => x.Name == DropDownSets.仓库); + if (store != null) + { + cbxStore.DataSource = store.Details; + cbxStore.DisplayMember = "Name"; + cbxStore.ValueMember = "ID"; + } + var batch = mDropDownSets.Details.FirstOrDefault(x => x.Name == DropDownSets.批次); + if (batch != null) + { + cbxStore.DataSource = batch.Details; + cbxStore.DisplayMember = "Name"; + cbxStore.ValueMember = "ID"; } - } private DropDownSets GetmDropDownSets() @@ -201,13 +215,15 @@ namespace MaterialRequisition var sets = new DropDownSets(); var wrokUnitSet = GetWrokUnitSet(); var wrokShopSet = GetWrokShopSet(); + var storeSet = GetStoreSet(); + var batchSet = GetBatchSet(); sets.Details.Add(wrokUnitSet); sets.Details.Add(wrokShopSet); + sets.Details.Add(storeSet); + sets.Details.Add(batchSet); return sets; } - - private DropDownSet GetWrokShopSet() { var json = RpcFacade.Call("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/GetWorkShopList"); @@ -220,6 +236,30 @@ namespace MaterialRequisition return set; } + private DropDownSet GetStoreSet() + { + var json = RpcFacade.Call("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/GetStoreList"); + var set = new DropDownSet(); + set.Name = DropDownSets.仓库; + foreach (var detail in JsonConvert.DeserializeObject>(json)) + { + set.Details.Add(detail); + } + return set; + } + + private DropDownSet GetBatchSet() + { + var json = RpcFacade.Call("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/GetProductBatchList"); + var set = new DropDownSet(); + set.Name = DropDownSets.批次; + foreach (var detail in JsonConvert.DeserializeObject>(json)) + { + set.Details.Add(detail); + } + return set; + } + private DropDownSet GetWrokUnitSet() { var json = RpcFacade.Call("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/GetWorkUnitList"); @@ -232,7 +272,75 @@ namespace MaterialRequisition return set; } + private void btnGoodsSet_Click(object sender, EventArgs e) + { + var f = new GoodsSetForm(); + if (f.ShowDialog() == DialogResult.OK) + { + InitControl(); + } + } + + private void InitControl() + { + mSetList = XmlUtil.DeserializeFromFile>(GoodsSetForm.MaterialRequisitionGoodsSetFileName).Where(x => x.IsSelected).ToList(); + if (mSetList.Count < 1) + { + return; + } + flpClass.Controls.Clear(); + foreach (IGrouping grouping in mSetList.GroupBy(x => x.Name)) + { + var btnClass = CreateClassButton(grouping.Key); + flpClass.Controls.Add(btnClass); + } + } + + private Button CreateClassButton(string text) + { + var btn = new Button(); + btn.Text = text; + btn.Click += Btn_Click; + btn.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + btn.BackColor = SystemColors.Control; + btn.Width = 100; + btn.Height = 60; + return btn; + } + private void Btn_Click(object sender, EventArgs e) + { + var text = (sender as Button).Text; + foreach (Button cbutton in flpClass.Controls) + { + if (cbutton.Text == text) + { + cbutton.BackColor = Color.Aqua; + } + else + { + cbutton.BackColor = SystemColors.Control; + } + } + flpGoods.Controls.Clear(); + foreach (MaterialRequisitionGoodsSet set in mSetList.Where(x => x.Name == text)) + { + var btnGoods = CreateGoodsButton(set); + flpGoods.Controls.Add(btnGoods); + } + } + private Button CreateGoodsButton(MaterialRequisitionGoodsSet set) + { + var btn = new Button(); + btn.Text = set.Goods_Name; + btn.Tag = set; + btn.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + //btn.Click += BtnGoods_Click; + btn.BackColor = SystemColors.Control; + btn.Width = 140; + btn.Height = 80; + return btn; + } } } diff --git a/MaterialRequisition/MaterialRequisitionGoodsSet.cs b/MaterialRequisition/MaterialRequisitionGoodsSet.cs new file mode 100644 index 0000000..ef23332 --- /dev/null +++ b/MaterialRequisition/MaterialRequisitionGoodsSet.cs @@ -0,0 +1,14 @@ +using BO.BO.Dtos; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MaterialRequisition +{ + public class MaterialRequisitionGoodsSet : ClientGoodsSetDto + { + public bool IsSelected { get; set; } + } +} diff --git a/MaterialRequisition/Program.cs b/MaterialRequisition/Program.cs deleted file mode 100644 index 8ef5ee0..0000000 --- a/MaterialRequisition/Program.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace MaterialRequisition -{ - static class Program - { - /// - /// 应用程序的主入口点。 - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new MaterialRequisitionForm()); - } - } -} diff --git a/TrunksIousOutInStore/TrunksIousOutInStoreForm.cs b/TrunksIousOutInStore/TrunksIousOutInStoreForm.cs index 3b533e5..56a4ca3 100644 --- a/TrunksIousOutInStore/TrunksIousOutInStoreForm.cs +++ b/TrunksIousOutInStore/TrunksIousOutInStoreForm.cs @@ -335,7 +335,7 @@ namespace TrunksIousOutInStore { cbxWorkUnit.DataSource = unit.Details; cbxWorkUnit.DisplayMember = "Name"; - cbxWorkUnit.ValueMember = "Code"; + cbxWorkUnit.ValueMember = "ID"; } var store = mDropDownSets.Details.FirstOrDefault(x => x.Name == DropDownSets.仓库);