diff --git a/B3ButcherManageClient.sln b/B3ButcherManageClient.sln index 8122299..b80ab2d 100644 --- a/B3ButcherManageClient.sln +++ b/B3ButcherManageClient.sln @@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ButcherOrder", "ButcherOrde EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ButcherWeight", "ButcherWeight\ButcherWeight.csproj", "{17F58766-89EB-44C0-8EEF-4787849979EC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QualityAndOrder", "QualityAndOrder\QualityAndOrder.csproj", "{0C26ABF1-A45D-4107-ADC8-0235BCD18043}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -39,6 +41,10 @@ Global {17F58766-89EB-44C0-8EEF-4787849979EC}.Debug|Any CPU.Build.0 = Debug|Any CPU {17F58766-89EB-44C0-8EEF-4787849979EC}.Release|Any CPU.ActiveCfg = Release|Any CPU {17F58766-89EB-44C0-8EEF-4787849979EC}.Release|Any CPU.Build.0 = Release|Any CPU + {0C26ABF1-A45D-4107-ADC8-0235BCD18043}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0C26ABF1-A45D-4107-ADC8-0235BCD18043}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0C26ABF1-A45D-4107-ADC8-0235BCD18043}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0C26ABF1-A45D-4107-ADC8-0235BCD18043}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/BO/Utils/BaseInfoRpcUtil.cs b/BO/Utils/BaseInfoRpcUtil.cs index 7237c67..c6fd97e 100644 --- a/BO/Utils/BaseInfoRpcUtil.cs +++ b/BO/Utils/BaseInfoRpcUtil.cs @@ -11,19 +11,28 @@ namespace BO.Utils { public static class BaseInfoRpcUtil { - //public static List GetBaseInfoEntity(string rpcName) - //{ - // var list = RpcFacade.Call>(string.Format("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/{0}", rpcName)); - // var result = new List(); - // foreach (RpcObject o in list) - // { - // var entity = new BaseInfoEntity(); - // entity.ID = o.Get("ID"); - // entity.Name = o.Get("Name"); - // entity.Spell = o.Get("Spell"); - // result.Add(entity); - // } - // return result; - //} + public static List> GetBaseInfoEntity(string rpcName) + { + var list = RpcFacade.Call>(string.Format("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/{0}", rpcName), null, null, -1); + var result = new List>(); + foreach (RpcObject o in list) + { + var entity = new Tuple(o.Get("PhyName"), o.Get("DisplayName")); + result.Add(entity); + } + return result; + } + + public static List> GetSanctionList() + { + var list = RpcFacade.Call>("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/GetSanctionList"); + var result = new List>(); + foreach (RpcObject o in list) + { + var entity = new Tuple(o.Get("ID"), o.Get("AbnormalItem_ID"), o.Get("AbnormalItem_Name")); + result.Add(entity); + } + return result; + } } } diff --git a/BWP.WinFormControl/BWP.WinFormControl.csproj b/BWP.WinFormControl/BWP.WinFormControl.csproj index b9de86e..301a76d 100644 --- a/BWP.WinFormControl/BWP.WinFormControl.csproj +++ b/BWP.WinFormControl/BWP.WinFormControl.csproj @@ -55,6 +55,9 @@ + + Component + @@ -107,6 +110,9 @@ WeightControl.cs + + + + \ No newline at end of file diff --git a/QualityAndOrder/QualityOrderForm.Designer.cs b/QualityAndOrder/QualityOrderForm.Designer.cs new file mode 100644 index 0000000..6691c37 --- /dev/null +++ b/QualityAndOrder/QualityOrderForm.Designer.cs @@ -0,0 +1,707 @@ +namespace QualityAndOrder +{ + partial class QualityOrderForm + { + /// + /// 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() + { + 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 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(); + 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(); + this.uTabControl1 = new BWP.WinFormControl.UTabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.uDataGridView1 = new BWP.WinFormControl.UDataGridView(); + this.W_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.W_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.W_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.W_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.W_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.syncBtn = new System.Windows.Forms.Button(); + this.testTimeInput = new BWP.WinFormControl.UDatePicker(); + this.label20 = new System.Windows.Forms.Label(); + this.keyBoardPanel = new System.Windows.Forms.FlowLayoutPanel(); + this.label1 = new System.Windows.Forms.Label(); + this.numberBox = new System.Windows.Forms.TextBox(); + this.hogGradePanel = new System.Windows.Forms.FlowLayoutPanel(); + this.commitBtn = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.closeBtn = new System.Windows.Forms.Button(); + this.housePanel = new System.Windows.Forms.FlowLayoutPanel(); + this.uDataGridView2 = new BWP.WinFormControl.UDataGridView(); + this.S_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.S_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.S_Sanction_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.S_AbnormalItem_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.S_AbnormalItem_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.S_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.uDataGridView3 = 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.button1 = new System.Windows.Forms.Button(); + this.uDatePicker1 = new BWP.WinFormControl.UDatePicker(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.uDataGridView4 = new BWP.WinFormControl.UDataGridView(); + this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.label6 = new System.Windows.Forms.Label(); + this.button2 = new System.Windows.Forms.Button(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.uTabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.uDataGridView2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.uDataGridView3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.uDataGridView4)).BeginInit(); + this.SuspendLayout(); + // + // uTabControl1 + // + this.uTabControl1.Controls.Add(this.tabPage1); + this.uTabControl1.Controls.Add(this.tabPage2); + this.uTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.uTabControl1.ItemSize = new System.Drawing.Size(150, 50); + this.uTabControl1.Location = new System.Drawing.Point(0, 0); + this.uTabControl1.Name = "uTabControl1"; + this.uTabControl1.SelectedIndex = 0; + this.uTabControl1.Size = new System.Drawing.Size(1276, 873); + this.uTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; + this.uTabControl1.TabIndex = 0; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.uDataGridView2); + this.tabPage1.Controls.Add(this.label3); + this.tabPage1.Controls.Add(this.label2); + this.tabPage1.Controls.Add(this.hogGradePanel); + this.tabPage1.Controls.Add(this.closeBtn); + this.tabPage1.Controls.Add(this.commitBtn); + this.tabPage1.Controls.Add(this.numberBox); + this.tabPage1.Controls.Add(this.label1); + this.tabPage1.Controls.Add(this.housePanel); + this.tabPage1.Controls.Add(this.keyBoardPanel); + this.tabPage1.Controls.Add(this.uDataGridView1); + this.tabPage1.Controls.Add(this.syncBtn); + this.tabPage1.Controls.Add(this.testTimeInput); + this.tabPage1.Controls.Add(this.label20); + this.tabPage1.Location = new System.Drawing.Point(4, 54); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(1268, 815); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "验质分圈"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.flowLayoutPanel1); + this.tabPage2.Controls.Add(this.button2); + this.tabPage2.Controls.Add(this.label6); + this.tabPage2.Controls.Add(this.label5); + this.tabPage2.Controls.Add(this.uDataGridView4); + this.tabPage2.Controls.Add(this.uDataGridView3); + this.tabPage2.Controls.Add(this.button1); + this.tabPage2.Controls.Add(this.uDatePicker1); + this.tabPage2.Controls.Add(this.label4); + this.tabPage2.Location = new System.Drawing.Point(4, 54); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(1268, 815); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "排宰顺序"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // uDataGridView1 + // + this.uDataGridView1.AllowUserToAddRows = false; + this.uDataGridView1.AllowUserToDeleteRows = false; + this.uDataGridView1.AllowUserToResizeColumns = false; + this.uDataGridView1.AllowUserToResizeRows = false; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; + this.uDataGridView1.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.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; + this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.W_ID, + this.W_B3ID, + this.W_Supplier_Name, + this.W_Number, + this.W_HouseNames}); + this.uDataGridView1.Location = new System.Drawing.Point(25, 77); + this.uDataGridView1.MultiSelect = false; + this.uDataGridView1.Name = "uDataGridView1"; + this.uDataGridView1.RowHeadersVisible = false; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle6; + this.uDataGridView1.RowTemplate.Height = 23; + this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.uDataGridView1.Size = new System.Drawing.Size(452, 365); + this.uDataGridView1.TabIndex = 34; + // + // W_ID + // + this.W_ID.DataPropertyName = "ID"; + this.W_ID.HeaderText = "ID"; + this.W_ID.Name = "W_ID"; + this.W_ID.Visible = false; + // + // W_B3ID + // + this.W_B3ID.DataPropertyName = "B3ID"; + this.W_B3ID.HeaderText = "过磅单号"; + this.W_B3ID.Name = "W_B3ID"; + // + // W_Supplier_Name + // + this.W_Supplier_Name.DataPropertyName = "Supplier_Name"; + this.W_Supplier_Name.HeaderText = "供应商"; + this.W_Supplier_Name.Name = "W_Supplier_Name"; + this.W_Supplier_Name.Width = 120; + // + // W_Number + // + this.W_Number.DataPropertyName = "Number"; + this.W_Number.HeaderText = "头数"; + this.W_Number.Name = "W_Number"; + // + // W_HouseNames + // + this.W_HouseNames.DataPropertyName = "HouseNames"; + this.W_HouseNames.HeaderText = "圈舍"; + this.W_HouseNames.Name = "W_HouseNames"; + this.W_HouseNames.Width = 120; + // + // syncBtn + // + this.syncBtn.Font = new System.Drawing.Font("宋体", 15F); + this.syncBtn.Location = new System.Drawing.Point(233, 9); + this.syncBtn.Name = "syncBtn"; + this.syncBtn.Size = new System.Drawing.Size(94, 56); + this.syncBtn.TabIndex = 33; + this.syncBtn.Text = "同步"; + this.syncBtn.UseVisualStyleBackColor = true; + // + // testTimeInput + // + this.testTimeInput.BackColor = System.Drawing.Color.White; + this.testTimeInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.testTimeInput.Date = new System.DateTime(2017, 9, 8, 0, 0, 0, 0); + this.testTimeInput.Font = new System.Drawing.Font("宋体", 15F); + this.testTimeInput.Location = new System.Drawing.Point(80, 19); + this.testTimeInput.Name = "testTimeInput"; + this.testTimeInput.Size = new System.Drawing.Size(135, 30); + this.testTimeInput.TabIndex = 32; + this.testTimeInput.Text = "2017/09/08"; + this.testTimeInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.testTimeInput.Type = BWP.WinFormControl.DateTimeType.Date; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Font = new System.Drawing.Font("宋体", 14F); + this.label20.Location = new System.Drawing.Point(21, 25); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(66, 19); + this.label20.TabIndex = 31; + this.label20.Text = "日期:"; + // + // keyBoardPanel + // + this.keyBoardPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.keyBoardPanel.Location = new System.Drawing.Point(25, 472); + this.keyBoardPanel.Name = "keyBoardPanel"; + this.keyBoardPanel.Padding = new System.Windows.Forms.Padding(25, 0, 0, 0); + this.keyBoardPanel.Size = new System.Drawing.Size(452, 241); + this.keyBoardPanel.TabIndex = 37; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 15F); + this.label1.Location = new System.Drawing.Point(510, 24); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(69, 20); + this.label1.TabIndex = 38; + this.label1.Text = "头数:"; + // + // numberBox + // + this.numberBox.Font = new System.Drawing.Font("宋体", 15F); + this.numberBox.Location = new System.Drawing.Point(585, 21); + this.numberBox.Name = "numberBox"; + this.numberBox.Size = new System.Drawing.Size(108, 30); + this.numberBox.TabIndex = 39; + // + // hogGradePanel + // + this.hogGradePanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.hogGradePanel.Location = new System.Drawing.Point(514, 77); + this.hogGradePanel.Name = "hogGradePanel"; + this.hogGradePanel.Size = new System.Drawing.Size(733, 73); + this.hogGradePanel.TabIndex = 37; + // + // commitBtn + // + this.commitBtn.Font = new System.Drawing.Font("宋体", 15F); + this.commitBtn.Location = new System.Drawing.Point(1036, 9); + this.commitBtn.Name = "commitBtn"; + this.commitBtn.Size = new System.Drawing.Size(94, 56); + this.commitBtn.TabIndex = 40; + this.commitBtn.Text = "提交"; + this.commitBtn.UseVisualStyleBackColor = true; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("宋体", 15F); + this.label2.Location = new System.Drawing.Point(723, 24); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(109, 20); + this.label2.TabIndex = 41; + this.label2.Text = "已收头数:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 15F); + this.label3.ForeColor = System.Drawing.Color.Red; + this.label3.Location = new System.Drawing.Point(838, 24); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(39, 20); + this.label3.TabIndex = 42; + this.label3.Text = "100"; + // + // closeBtn + // + this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); + this.closeBtn.Location = new System.Drawing.Point(1153, 9); + this.closeBtn.Name = "closeBtn"; + this.closeBtn.Size = new System.Drawing.Size(94, 56); + this.closeBtn.TabIndex = 40; + this.closeBtn.Text = "关闭"; + this.closeBtn.UseVisualStyleBackColor = true; + // + // housePanel + // + this.housePanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.housePanel.Location = new System.Drawing.Point(514, 182); + this.housePanel.Name = "housePanel"; + this.housePanel.Size = new System.Drawing.Size(349, 531); + this.housePanel.TabIndex = 37; + // + // uDataGridView2 + // + this.uDataGridView2.AllowUserToAddRows = false; + this.uDataGridView2.AllowUserToDeleteRows = false; + this.uDataGridView2.AllowUserToResizeColumns = false; + this.uDataGridView2.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.uDataGridView2.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.uDataGridView2.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.uDataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.uDataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.uDataGridView2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.S_ID, + this.S_B3ID, + this.S_Sanction_ID, + this.S_AbnormalItem_ID, + this.S_AbnormalItem_Name, + this.S_Number}); + this.uDataGridView2.Location = new System.Drawing.Point(898, 182); + this.uDataGridView2.MultiSelect = false; + this.uDataGridView2.Name = "uDataGridView2"; + this.uDataGridView2.RowHeadersVisible = false; + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.uDataGridView2.RowsDefaultCellStyle = dataGridViewCellStyle3; + this.uDataGridView2.RowTemplate.Height = 23; + this.uDataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.uDataGridView2.Size = new System.Drawing.Size(349, 531); + this.uDataGridView2.TabIndex = 43; + // + // S_ID + // + this.S_ID.DataPropertyName = "ID"; + this.S_ID.HeaderText = "ID"; + this.S_ID.Name = "S_ID"; + this.S_ID.Visible = false; + // + // S_B3ID + // + this.S_B3ID.DataPropertyName = "B3ID"; + this.S_B3ID.HeaderText = "B3ID"; + this.S_B3ID.Name = "S_B3ID"; + this.S_B3ID.Visible = false; + // + // S_Sanction_ID + // + this.S_Sanction_ID.DataPropertyName = "Sanction_ID"; + this.S_Sanction_ID.HeaderText = "Sanction_ID"; + this.S_Sanction_ID.Name = "S_Sanction_ID"; + this.S_Sanction_ID.Visible = false; + // + // S_AbnormalItem_ID + // + this.S_AbnormalItem_ID.DataPropertyName = "AbnormalItem_ID"; + this.S_AbnormalItem_ID.HeaderText = "AbnormalItem_ID"; + this.S_AbnormalItem_ID.Name = "S_AbnormalItem_ID"; + this.S_AbnormalItem_ID.Visible = false; + // + // S_AbnormalItem_Name + // + this.S_AbnormalItem_Name.DataPropertyName = "AbnormalItem_Name"; + this.S_AbnormalItem_Name.HeaderText = "异常项"; + this.S_AbnormalItem_Name.Name = "S_AbnormalItem_Name"; + this.S_AbnormalItem_Name.Width = 140; + // + // S_Number + // + this.S_Number.DataPropertyName = "Number"; + this.S_Number.HeaderText = "头数"; + this.S_Number.Name = "S_Number"; + this.S_Number.Width = 200; + // + // uDataGridView3 + // + this.uDataGridView3.AllowUserToAddRows = false; + this.uDataGridView3.AllowUserToDeleteRows = false; + this.uDataGridView3.AllowUserToResizeColumns = false; + this.uDataGridView3.AllowUserToResizeRows = false; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.uDataGridView3.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; + this.uDataGridView3.BackgroundColor = System.Drawing.Color.White; + 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.uDataGridView3.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; + this.uDataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.uDataGridView3.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.dataGridViewTextBoxColumn1, + this.dataGridViewTextBoxColumn2, + this.dataGridViewTextBoxColumn3, + this.dataGridViewTextBoxColumn4, + this.dataGridViewTextBoxColumn5}); + this.uDataGridView3.Location = new System.Drawing.Point(25, 93); + this.uDataGridView3.MultiSelect = false; + this.uDataGridView3.Name = "uDataGridView3"; + this.uDataGridView3.RowHeadersVisible = false; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.uDataGridView3.RowsDefaultCellStyle = dataGridViewCellStyle12; + this.uDataGridView3.RowTemplate.Height = 23; + this.uDataGridView3.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.uDataGridView3.Size = new System.Drawing.Size(454, 437); + this.uDataGridView3.TabIndex = 38; + // + // dataGridViewTextBoxColumn1 + // + this.dataGridViewTextBoxColumn1.DataPropertyName = "ID"; + this.dataGridViewTextBoxColumn1.HeaderText = "ID"; + this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; + this.dataGridViewTextBoxColumn1.Visible = false; + // + // dataGridViewTextBoxColumn2 + // + this.dataGridViewTextBoxColumn2.DataPropertyName = "B3ID"; + this.dataGridViewTextBoxColumn2.HeaderText = "过磅单号"; + this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; + // + // dataGridViewTextBoxColumn3 + // + this.dataGridViewTextBoxColumn3.DataPropertyName = "Supplier_Name"; + this.dataGridViewTextBoxColumn3.HeaderText = "供应商"; + this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; + this.dataGridViewTextBoxColumn3.Width = 120; + // + // dataGridViewTextBoxColumn4 + // + this.dataGridViewTextBoxColumn4.DataPropertyName = "Number"; + this.dataGridViewTextBoxColumn4.HeaderText = "头数"; + this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; + // + // dataGridViewTextBoxColumn5 + // + this.dataGridViewTextBoxColumn5.DataPropertyName = "HouseNames"; + this.dataGridViewTextBoxColumn5.HeaderText = "圈舍"; + this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; + this.dataGridViewTextBoxColumn5.Width = 120; + // + // button1 + // + this.button1.Font = new System.Drawing.Font("宋体", 15F); + this.button1.Location = new System.Drawing.Point(294, 9); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(94, 56); + this.button1.TabIndex = 37; + this.button1.Text = "同步"; + this.button1.UseVisualStyleBackColor = true; + // + // uDatePicker1 + // + this.uDatePicker1.BackColor = System.Drawing.Color.White; + this.uDatePicker1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.uDatePicker1.Date = new System.DateTime(2017, 9, 8, 0, 0, 0, 0); + this.uDatePicker1.Font = new System.Drawing.Font("宋体", 15F); + this.uDatePicker1.Location = new System.Drawing.Point(131, 19); + this.uDatePicker1.Name = "uDatePicker1"; + this.uDatePicker1.Size = new System.Drawing.Size(135, 30); + this.uDatePicker1.TabIndex = 36; + this.uDatePicker1.Text = "2017/09/08"; + this.uDatePicker1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.uDatePicker1.Type = BWP.WinFormControl.DateTimeType.Date; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("宋体", 14F); + this.label4.Location = new System.Drawing.Point(21, 25); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(104, 19); + this.label4.TabIndex = 35; + this.label4.Text = "宰杀日期:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("宋体", 15F); + this.label5.ForeColor = System.Drawing.Color.Red; + this.label5.Location = new System.Drawing.Point(23, 61); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(89, 20); + this.label5.TabIndex = 39; + this.label5.Text = "排宰明细"; + // + // uDataGridView4 + // + this.uDataGridView4.AllowUserToAddRows = false; + this.uDataGridView4.AllowUserToDeleteRows = false; + this.uDataGridView4.AllowUserToResizeColumns = false; + this.uDataGridView4.AllowUserToResizeRows = false; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.uDataGridView4.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + this.uDataGridView4.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.uDataGridView4.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; + this.uDataGridView4.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.uDataGridView4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.dataGridViewTextBoxColumn6, + this.dataGridViewTextBoxColumn7, + this.dataGridViewTextBoxColumn8, + this.dataGridViewTextBoxColumn9, + this.dataGridViewTextBoxColumn10}); + this.uDataGridView4.Location = new System.Drawing.Point(533, 93); + this.uDataGridView4.MultiSelect = false; + this.uDataGridView4.Name = "uDataGridView4"; + this.uDataGridView4.RowHeadersVisible = false; + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.uDataGridView4.RowsDefaultCellStyle = dataGridViewCellStyle9; + this.uDataGridView4.RowTemplate.Height = 23; + this.uDataGridView4.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.uDataGridView4.Size = new System.Drawing.Size(714, 437); + this.uDataGridView4.TabIndex = 38; + // + // dataGridViewTextBoxColumn6 + // + this.dataGridViewTextBoxColumn6.DataPropertyName = "ID"; + this.dataGridViewTextBoxColumn6.HeaderText = "ID"; + this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; + this.dataGridViewTextBoxColumn6.Visible = false; + // + // dataGridViewTextBoxColumn7 + // + this.dataGridViewTextBoxColumn7.DataPropertyName = "B3ID"; + this.dataGridViewTextBoxColumn7.HeaderText = "过磅单号"; + this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; + // + // dataGridViewTextBoxColumn8 + // + this.dataGridViewTextBoxColumn8.DataPropertyName = "Supplier_Name"; + this.dataGridViewTextBoxColumn8.HeaderText = "供应商"; + this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8"; + this.dataGridViewTextBoxColumn8.Width = 120; + // + // dataGridViewTextBoxColumn9 + // + this.dataGridViewTextBoxColumn9.DataPropertyName = "Number"; + this.dataGridViewTextBoxColumn9.HeaderText = "头数"; + this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9"; + // + // dataGridViewTextBoxColumn10 + // + this.dataGridViewTextBoxColumn10.DataPropertyName = "HouseNames"; + this.dataGridViewTextBoxColumn10.HeaderText = "圈舍"; + this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10"; + this.dataGridViewTextBoxColumn10.Width = 120; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("宋体", 15F); + this.label6.ForeColor = System.Drawing.Color.Red; + this.label6.Location = new System.Drawing.Point(529, 61); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(89, 20); + this.label6.TabIndex = 39; + this.label6.Text = "待宰明细"; + // + // button2 + // + this.button2.Font = new System.Drawing.Font("宋体", 15F); + this.button2.Location = new System.Drawing.Point(1153, 9); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(94, 56); + this.button2.TabIndex = 41; + this.button2.Text = "关闭"; + this.button2.UseVisualStyleBackColor = true; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.flowLayoutPanel1.Location = new System.Drawing.Point(27, 562); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(25, 0, 0, 0); + this.flowLayoutPanel1.Size = new System.Drawing.Size(452, 241); + this.flowLayoutPanel1.TabIndex = 43; + // + // QualityOrderForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1276, 873); + this.Controls.Add(this.uTabControl1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.Name = "QualityOrderForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "排宰顺序"; + this.uTabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage1.PerformLayout(); + this.tabPage2.ResumeLayout(false); + this.tabPage2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.uDataGridView2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.uDataGridView3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.uDataGridView4)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private BWP.WinFormControl.UTabControl uTabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private BWP.WinFormControl.UDataGridView uDataGridView1; + private System.Windows.Forms.DataGridViewTextBoxColumn W_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn W_B3ID; + private System.Windows.Forms.DataGridViewTextBoxColumn W_Supplier_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn W_Number; + private System.Windows.Forms.DataGridViewTextBoxColumn W_HouseNames; + private System.Windows.Forms.Button syncBtn; + private BWP.WinFormControl.UDatePicker testTimeInput; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.TextBox numberBox; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.FlowLayoutPanel keyBoardPanel; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.FlowLayoutPanel hogGradePanel; + private System.Windows.Forms.Button closeBtn; + private System.Windows.Forms.Button commitBtn; + private System.Windows.Forms.FlowLayoutPanel housePanel; + private BWP.WinFormControl.UDataGridView uDataGridView2; + private System.Windows.Forms.DataGridViewTextBoxColumn S_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn S_B3ID; + private System.Windows.Forms.DataGridViewTextBoxColumn S_Sanction_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn S_AbnormalItem_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn S_AbnormalItem_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn S_Number; + private System.Windows.Forms.Label label5; + private BWP.WinFormControl.UDataGridView uDataGridView3; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; + private System.Windows.Forms.Button button1; + private BWP.WinFormControl.UDatePicker uDatePicker1; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label6; + private BWP.WinFormControl.UDataGridView uDataGridView4; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Button button2; + + + + } +} \ No newline at end of file diff --git a/QualityAndOrder/QualityOrderForm.cs b/QualityAndOrder/QualityOrderForm.cs new file mode 100644 index 0000000..7ac36ef --- /dev/null +++ b/QualityAndOrder/QualityOrderForm.cs @@ -0,0 +1,106 @@ +using BO.Utils; +using ButcherManageClient; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace QualityAndOrder +{ + public partial class QualityOrderForm : Form, IAfterLogin + { + #region IAfterLogin + public string RoleName + { + get { return "_1"; } + } + + public Form Generate() + { + return this; + } + + #endregion + + List> hogGradeList; + List> houseList; + List> sanctionList; + + public QualityOrderForm() + { + InitializeComponent(); + hogGradeList = BaseInfoRpcUtil.GetBaseInfoEntity("GetHogGradeList"); + houseList = BaseInfoRpcUtil.GetBaseInfoEntity("GetLiveColonyHouseList"); + sanctionList = BaseInfoRpcUtil.GetSanctionList(); + AddKeyPad(); + AddHogGradeBtn(); + AddHouseBtn(); + } + + private void AddKeyPad() + { + for (var i = 1; i < 10; i++) + { + var btn = new Button() { Name = "_" + i, Text = i.ToString(), Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; + btn.Click += (sender, e) => + { + numberBox.Text += btn.Text; + }; + keyBoardPanel.Controls.Add(btn); + } + var zero = new Button() { Name = "_0", Text = "0", Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; + zero.Click += (sender, e) => + { + if (!string.IsNullOrEmpty(numberBox.Text)) + numberBox.Text += "0"; + }; + keyBoardPanel.Controls.Add(zero); + var back = new Button() { Name = "_back", Text = "←", Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; + back.Click += (sender, e) => + { + if (!string.IsNullOrEmpty(numberBox.Text)) + numberBox.Text = numberBox.Text.Substring(0, numberBox.Text.Length - 1); + }; + keyBoardPanel.Controls.Add(back); + + var clear = new Button() { Name = "_clear", Text = "清空", Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; + clear.Click += (sender, e) => + { + numberBox.Text = null; + }; + keyBoardPanel.Controls.Add(clear); + + } + + private void AddHogGradeBtn() + { + foreach (var item in hogGradeList) + { + var btn = new Button() { Name = "_" + item.Item1, Tag = item.Item1, Text = item.Item2, Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { Left = 20,Top=5 }, Font = new Font("宋体", 15) }; + btn.Click += (sender, e) => + { + numberBox.Text = btn.Tag.ToString(); + }; + hogGradePanel.Controls.Add(btn); + } + } + + private void AddHouseBtn() + { + foreach (var item in houseList) + { + var btn = new Button() { Name = "_" + item.Item1, Tag = item.Item1, Text = item.Item2, Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; + btn.Click += (sender, e) => + { + numberBox.Text = btn.Tag.ToString(); + }; + housePanel.Controls.Add(btn); + } + } + } +} diff --git a/QualityAndOrder/QualityOrderForm.resx b/QualityAndOrder/QualityOrderForm.resx new file mode 100644 index 0000000..7cae7b4 --- /dev/null +++ b/QualityAndOrder/QualityOrderForm.resx @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file