diff --git a/BO/BO/Bill/OrderDetail/NeedOrderEntity.cs b/BO/BO/Bill/OrderDetail/NeedOrderEntity.cs index 8c9b155..0f94014 100644 --- a/BO/BO/Bill/OrderDetail/NeedOrderEntity.cs +++ b/BO/BO/Bill/OrderDetail/NeedOrderEntity.cs @@ -12,6 +12,8 @@ namespace BO.BO.Bill public long WeightBill_ID { get; set; } + public bool Show { get; set; } + public string Supplier_Name { get; set; } public string HouseNames { get; set; } diff --git a/BO/Utils/BillRpc/OrderDetailRpc.cs b/BO/Utils/BillRpc/OrderDetailRpc.cs index f890a97..ab8fe2b 100644 --- a/BO/Utils/BillRpc/OrderDetailRpc.cs +++ b/BO/Utils/BillRpc/OrderDetailRpc.cs @@ -13,10 +13,10 @@ namespace BO.Utils.BillRpc public static class OrderDetailRpc { static JavaScriptSerializer serializer = new JavaScriptSerializer(); - public static List GetNeedOrderWeightBill(DateTime date) + public static List GetNeedOrderWeightBill(DateTime date, bool? showType = null) { const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetNeedOrderWeightBill"; - var result = RpcFacade.Call(method, date); + var result = RpcFacade.Call(method, date, showType); result = result.ESerializeDateTime(); return serializer.Deserialize>(result); } @@ -68,5 +68,11 @@ namespace BO.Utils.BillRpc const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/Delete"; RpcFacade.Call(method, serializer.Serialize(update), id); } + + public static void ChangeShowType(long weightBillID, bool show) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/ChangeShowType"; + RpcFacade.Call(method, weightBillID, show); + } } } diff --git a/QualityAndOrder/QualityOrderForm.Designer.cs b/QualityAndOrder/QualityOrderForm.Designer.cs index d8564eb..42c8741 100644 --- a/QualityAndOrder/QualityOrderForm.Designer.cs +++ b/QualityAndOrder/QualityOrderForm.Designer.cs @@ -69,25 +69,27 @@ this.label1 = new System.Windows.Forms.Label(); this.keyBoardPanel = new System.Windows.Forms.FlowLayoutPanel(); this.weightBillGrid = new BWP.WinFormControl.UDataGridView(); + this.W_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.W_AlreadyHouse = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.W_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.W_Employee_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.W_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.W_FirstWeightNumber = 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.tabPage2 = new System.Windows.Forms.TabPage(); + this.panel3 = new System.Windows.Forms.Panel(); + this.showHidden = new System.Windows.Forms.RadioButton(); + this.showAvailable = new System.Windows.Forms.RadioButton(); + this.showAll = new System.Windows.Forms.RadioButton(); this.panel2 = new System.Windows.Forms.Panel(); this.tab2KeyPanel = new System.Windows.Forms.FlowLayoutPanel(); this.closeBtn2 = new System.Windows.Forms.Button(); this.label6 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.preOrderGrid = new BWP.WinFormControl.UDataGridView(); - this.P_WeightBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_AlreadyNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_LastNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_WeighTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.R_OKBtn = new System.Windows.Forms.DataGridViewButtonColumn(); this.orderGrid = new BWP.WinFormControl.UDataGridView(); this.O_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.O_IsHurryButcher = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -101,13 +103,17 @@ this.tab2SyncBtn = new System.Windows.Forms.Button(); this.tab2DateSelect = new BWP.WinFormControl.UDatePicker(); this.label4 = new System.Windows.Forms.Label(); - this.W_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.W_AlreadyHouse = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.W_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.W_Employee_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.W_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.W_FirstWeightNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.W_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_WeightBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_Show = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_AlreadyNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_LastNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_WeighTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_OKBtn = new System.Windows.Forms.DataGridViewButtonColumn(); + this.P_Hidden = new System.Windows.Forms.DataGridViewButtonColumn(); this.uTabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.panel1.SuspendLayout(); @@ -117,6 +123,7 @@ this.tabPage4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.weightBillGrid)).BeginInit(); this.tabPage2.SuspendLayout(); + this.panel3.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.preOrderGrid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.orderGrid)).BeginInit(); @@ -132,7 +139,7 @@ this.uTabControl1.Location = new System.Drawing.Point(0, 0); this.uTabControl1.Name = "uTabControl1"; this.uTabControl1.SelectedIndex = 0; - this.uTabControl1.Size = new System.Drawing.Size(1294, 831); + this.uTabControl1.Size = new System.Drawing.Size(1384, 831); this.uTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; this.uTabControl1.TabIndex = 0; // @@ -154,7 +161,7 @@ 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(1286, 773); + this.tabPage1.Size = new System.Drawing.Size(1376, 773); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "验质分圈"; this.tabPage1.UseVisualStyleBackColor = true; @@ -163,7 +170,7 @@ // this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel1.Controls.Add(this.uTabControl2); - this.panel1.Location = new System.Drawing.Point(514, 161); + this.panel1.Location = new System.Drawing.Point(615, 161); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(733, 596); this.panel1.TabIndex = 44; @@ -361,7 +368,7 @@ this.inHouseNumberLabel.AutoSize = true; this.inHouseNumberLabel.Font = new System.Drawing.Font("宋体", 15F); this.inHouseNumberLabel.ForeColor = System.Drawing.Color.Red; - this.inHouseNumberLabel.Location = new System.Drawing.Point(838, 24); + this.inHouseNumberLabel.Location = new System.Drawing.Point(939, 24); this.inHouseNumberLabel.Name = "inHouseNumberLabel"; this.inHouseNumberLabel.Size = new System.Drawing.Size(19, 20); this.inHouseNumberLabel.TabIndex = 42; @@ -371,7 +378,7 @@ // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("宋体", 15F); - this.label2.Location = new System.Drawing.Point(723, 24); + this.label2.Location = new System.Drawing.Point(824, 24); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(109, 20); this.label2.TabIndex = 41; @@ -380,7 +387,7 @@ // hogGradePanel // this.hogGradePanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.hogGradePanel.Location = new System.Drawing.Point(514, 77); + this.hogGradePanel.Location = new System.Drawing.Point(615, 77); this.hogGradePanel.Name = "hogGradePanel"; this.hogGradePanel.Size = new System.Drawing.Size(733, 73); this.hogGradePanel.TabIndex = 37; @@ -388,7 +395,7 @@ // closeBtn // this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); - this.closeBtn.Location = new System.Drawing.Point(1153, 9); + this.closeBtn.Location = new System.Drawing.Point(1254, 9); this.closeBtn.Name = "closeBtn"; this.closeBtn.Size = new System.Drawing.Size(94, 56); this.closeBtn.TabIndex = 40; @@ -399,7 +406,7 @@ // commitBtn // this.commitBtn.Font = new System.Drawing.Font("宋体", 15F); - this.commitBtn.Location = new System.Drawing.Point(1036, 9); + this.commitBtn.Location = new System.Drawing.Point(1137, 9); this.commitBtn.Name = "commitBtn"; this.commitBtn.Size = new System.Drawing.Size(94, 56); this.commitBtn.TabIndex = 40; @@ -410,7 +417,7 @@ // numberBox // this.numberBox.Font = new System.Drawing.Font("宋体", 15F); - this.numberBox.Location = new System.Drawing.Point(585, 21); + this.numberBox.Location = new System.Drawing.Point(686, 21); this.numberBox.Name = "numberBox"; this.numberBox.Size = new System.Drawing.Size(108, 30); this.numberBox.TabIndex = 39; @@ -419,7 +426,7 @@ // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("宋体", 15F); - this.label1.Location = new System.Drawing.Point(510, 24); + this.label1.Location = new System.Drawing.Point(611, 24); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(69, 20); this.label1.TabIndex = 38; @@ -473,6 +480,61 @@ this.weightBillGrid.TabIndex = 34; this.weightBillGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.weightBillGrid_CellClick); // + // W_ID + // + this.W_ID.DataPropertyName = "ID"; + this.W_ID.HeaderText = "ID"; + this.W_ID.Name = "W_ID"; + this.W_ID.ReadOnly = true; + this.W_ID.Visible = false; + // + // W_AlreadyHouse + // + this.W_AlreadyHouse.DataPropertyName = "AlreadyHouse"; + this.W_AlreadyHouse.HeaderText = "AlreadyHouse"; + this.W_AlreadyHouse.Name = "W_AlreadyHouse"; + this.W_AlreadyHouse.ReadOnly = true; + this.W_AlreadyHouse.Visible = false; + // + // W_B3ID + // + this.W_B3ID.DataPropertyName = "B3ID"; + this.W_B3ID.HeaderText = "磅单号"; + this.W_B3ID.Name = "W_B3ID"; + this.W_B3ID.ReadOnly = true; + this.W_B3ID.Width = 80; + // + // W_Employee_Name + // + this.W_Employee_Name.DataPropertyName = "Employee_Name"; + this.W_Employee_Name.HeaderText = "业务员"; + this.W_Employee_Name.Name = "W_Employee_Name"; + this.W_Employee_Name.ReadOnly = true; + this.W_Employee_Name.Width = 80; + // + // 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.ReadOnly = true; + // + // W_FirstWeightNumber + // + this.W_FirstWeightNumber.DataPropertyName = "FirstWeightNumber"; + this.W_FirstWeightNumber.HeaderText = "头数"; + this.W_FirstWeightNumber.Name = "W_FirstWeightNumber"; + this.W_FirstWeightNumber.ReadOnly = true; + this.W_FirstWeightNumber.Width = 65; + // + // W_HouseNames + // + this.W_HouseNames.DataPropertyName = "HouseNames"; + this.W_HouseNames.HeaderText = "圈舍"; + this.W_HouseNames.Name = "W_HouseNames"; + this.W_HouseNames.ReadOnly = true; + this.W_HouseNames.Width = 105; + // // syncBtn // this.syncBtn.Font = new System.Drawing.Font("宋体", 15F); @@ -510,6 +572,7 @@ // // tabPage2 // + this.tabPage2.Controls.Add(this.panel3); this.tabPage2.Controls.Add(this.panel2); this.tabPage2.Controls.Add(this.closeBtn2); this.tabPage2.Controls.Add(this.label6); @@ -522,11 +585,60 @@ 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(1286, 773); + this.tabPage2.Size = new System.Drawing.Size(1376, 773); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "排宰顺序"; this.tabPage2.UseVisualStyleBackColor = true; // + // panel3 + // + this.panel3.Controls.Add(this.showHidden); + this.panel3.Controls.Add(this.showAvailable); + this.panel3.Controls.Add(this.showAll); + this.panel3.Location = new System.Drawing.Point(706, 45); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(416, 42); + this.panel3.TabIndex = 45; + // + // showHidden + // + this.showHidden.AutoSize = true; + this.showHidden.Font = new System.Drawing.Font("宋体", 15F); + this.showHidden.Location = new System.Drawing.Point(161, 9); + this.showHidden.Name = "showHidden"; + this.showHidden.Size = new System.Drawing.Size(67, 24); + this.showHidden.TabIndex = 2; + this.showHidden.TabStop = true; + this.showHidden.Text = "隐藏"; + this.showHidden.UseVisualStyleBackColor = true; + this.showHidden.CheckedChanged += new System.EventHandler(this.showRadio_CheckedChanged); + // + // showAvailable + // + this.showAvailable.AutoSize = true; + this.showAvailable.Font = new System.Drawing.Font("宋体", 15F); + this.showAvailable.Location = new System.Drawing.Point(32, 9); + this.showAvailable.Name = "showAvailable"; + this.showAvailable.Size = new System.Drawing.Size(67, 24); + this.showAvailable.TabIndex = 1; + this.showAvailable.TabStop = true; + this.showAvailable.Text = "显示"; + this.showAvailable.UseVisualStyleBackColor = true; + this.showAvailable.CheckedChanged += new System.EventHandler(this.showRadio_CheckedChanged); + // + // showAll + // + this.showAll.AutoSize = true; + this.showAll.Font = new System.Drawing.Font("宋体", 15F); + this.showAll.Location = new System.Drawing.Point(293, 9); + this.showAll.Name = "showAll"; + this.showAll.Size = new System.Drawing.Size(67, 24); + this.showAll.TabIndex = 0; + this.showAll.TabStop = true; + this.showAll.Text = "全部"; + this.showAll.UseVisualStyleBackColor = true; + this.showAll.CheckedChanged += new System.EventHandler(this.showRadio_CheckedChanged); + // // panel2 // this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; @@ -547,7 +659,7 @@ // closeBtn2 // this.closeBtn2.Font = new System.Drawing.Font("宋体", 15F); - this.closeBtn2.Location = new System.Drawing.Point(1153, 9); + this.closeBtn2.Location = new System.Drawing.Point(1254, 9); this.closeBtn2.Name = "closeBtn2"; this.closeBtn2.Size = new System.Drawing.Size(94, 56); this.closeBtn2.TabIndex = 41; @@ -597,6 +709,7 @@ this.preOrderGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.preOrderGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.P_WeightBill_ID, + this.P_Show, this.P_B3ID, this.P_Supplier_Name, this.P_HouseNames, @@ -604,7 +717,8 @@ this.P_AlreadyNumber, this.P_LastNumber, this.P_WeighTime, - this.R_OKBtn}); + this.P_OKBtn, + this.P_Hidden}); this.preOrderGrid.Location = new System.Drawing.Point(591, 93); this.preOrderGrid.MultiSelect = false; this.preOrderGrid.Name = "preOrderGrid"; @@ -614,85 +728,10 @@ this.preOrderGrid.RowsDefaultCellStyle = dataGridViewCellStyle9; this.preOrderGrid.RowTemplate.Height = 40; this.preOrderGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.preOrderGrid.Size = new System.Drawing.Size(683, 663); + this.preOrderGrid.Size = new System.Drawing.Size(769, 663); this.preOrderGrid.TabIndex = 38; this.preOrderGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.preOrderGrid_CellClick); // - // P_WeightBill_ID - // - this.P_WeightBill_ID.DataPropertyName = "WeightBill_ID"; - this.P_WeightBill_ID.HeaderText = "WeightBill_ID"; - this.P_WeightBill_ID.Name = "P_WeightBill_ID"; - this.P_WeightBill_ID.ReadOnly = true; - this.P_WeightBill_ID.Visible = false; - // - // P_B3ID - // - this.P_B3ID.DataPropertyName = "B3ID"; - this.P_B3ID.HeaderText = "磅单号"; - this.P_B3ID.Name = "P_B3ID"; - this.P_B3ID.ReadOnly = true; - this.P_B3ID.Width = 80; - // - // P_Supplier_Name - // - this.P_Supplier_Name.DataPropertyName = "Supplier_Name"; - this.P_Supplier_Name.HeaderText = "供应商"; - this.P_Supplier_Name.Name = "P_Supplier_Name"; - this.P_Supplier_Name.ReadOnly = true; - this.P_Supplier_Name.Width = 80; - // - // P_HouseNames - // - this.P_HouseNames.DataPropertyName = "HouseNames"; - this.P_HouseNames.HeaderText = "圈舍"; - this.P_HouseNames.Name = "P_HouseNames"; - this.P_HouseNames.ReadOnly = true; - this.P_HouseNames.Width = 95; - // - // P_Number - // - this.P_Number.DataPropertyName = "Number"; - this.P_Number.HeaderText = "总头数"; - this.P_Number.Name = "P_Number"; - this.P_Number.ReadOnly = true; - this.P_Number.Width = 80; - // - // P_AlreadyNumber - // - this.P_AlreadyNumber.DataPropertyName = "AlreadyNumber"; - this.P_AlreadyNumber.HeaderText = "已排"; - this.P_AlreadyNumber.Name = "P_AlreadyNumber"; - this.P_AlreadyNumber.ReadOnly = true; - this.P_AlreadyNumber.Width = 65; - // - // P_LastNumber - // - this.P_LastNumber.DataPropertyName = "LastNumber"; - this.P_LastNumber.HeaderText = "剩余"; - this.P_LastNumber.Name = "P_LastNumber"; - this.P_LastNumber.ReadOnly = true; - this.P_LastNumber.Width = 65; - // - // P_WeighTime - // - this.P_WeighTime.DataPropertyName = "WeighTime"; - this.P_WeighTime.HeaderText = "过磅时间"; - this.P_WeighTime.Name = "P_WeighTime"; - this.P_WeighTime.ReadOnly = true; - this.P_WeighTime.Width = 105; - // - // R_OKBtn - // - this.R_OKBtn.HeaderText = "排宰"; - this.R_OKBtn.Name = "R_OKBtn"; - this.R_OKBtn.ReadOnly = true; - this.R_OKBtn.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.R_OKBtn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.R_OKBtn.Text = "排宰"; - this.R_OKBtn.UseColumnTextForButtonValue = true; - this.R_OKBtn.Width = 85; - // // orderGrid // this.orderGrid.AllowUserToAddRows = false; @@ -842,66 +881,102 @@ this.label4.TabIndex = 35; this.label4.Text = "日期:"; // - // W_ID + // P_WeightBill_ID // - this.W_ID.DataPropertyName = "ID"; - this.W_ID.HeaderText = "ID"; - this.W_ID.Name = "W_ID"; - this.W_ID.ReadOnly = true; - this.W_ID.Visible = false; + this.P_WeightBill_ID.DataPropertyName = "WeightBill_ID"; + this.P_WeightBill_ID.HeaderText = "WeightBill_ID"; + this.P_WeightBill_ID.Name = "P_WeightBill_ID"; + this.P_WeightBill_ID.ReadOnly = true; + this.P_WeightBill_ID.Visible = false; // - // W_AlreadyHouse + // P_Show // - this.W_AlreadyHouse.DataPropertyName = "AlreadyHouse"; - this.W_AlreadyHouse.HeaderText = "AlreadyHouse"; - this.W_AlreadyHouse.Name = "W_AlreadyHouse"; - this.W_AlreadyHouse.ReadOnly = true; - this.W_AlreadyHouse.Visible = false; + this.P_Show.DataPropertyName = "Show"; + this.P_Show.HeaderText = "Show"; + this.P_Show.Name = "P_Show"; + this.P_Show.ReadOnly = true; + this.P_Show.Visible = false; // - // W_B3ID + // P_B3ID // - this.W_B3ID.DataPropertyName = "B3ID"; - this.W_B3ID.HeaderText = "磅单号"; - this.W_B3ID.Name = "W_B3ID"; - this.W_B3ID.ReadOnly = true; - this.W_B3ID.Width = 80; + this.P_B3ID.DataPropertyName = "B3ID"; + this.P_B3ID.HeaderText = "磅单号"; + this.P_B3ID.Name = "P_B3ID"; + this.P_B3ID.ReadOnly = true; + this.P_B3ID.Width = 80; // - // W_Employee_Name + // P_Supplier_Name // - this.W_Employee_Name.DataPropertyName = "Employee_Name"; - this.W_Employee_Name.HeaderText = "业务员"; - this.W_Employee_Name.Name = "W_Employee_Name"; - this.W_Employee_Name.ReadOnly = true; - this.W_Employee_Name.Width = 80; + this.P_Supplier_Name.DataPropertyName = "Supplier_Name"; + this.P_Supplier_Name.HeaderText = "供应商"; + this.P_Supplier_Name.Name = "P_Supplier_Name"; + this.P_Supplier_Name.ReadOnly = true; + this.P_Supplier_Name.Width = 80; // - // W_Supplier_Name + // P_HouseNames // - this.W_Supplier_Name.DataPropertyName = "Supplier_Name"; - this.W_Supplier_Name.HeaderText = "供应商"; - this.W_Supplier_Name.Name = "W_Supplier_Name"; - this.W_Supplier_Name.ReadOnly = true; + this.P_HouseNames.DataPropertyName = "HouseNames"; + this.P_HouseNames.HeaderText = "圈舍"; + this.P_HouseNames.Name = "P_HouseNames"; + this.P_HouseNames.ReadOnly = true; + this.P_HouseNames.Width = 95; // - // W_FirstWeightNumber + // P_Number // - this.W_FirstWeightNumber.DataPropertyName = "FirstWeightNumber"; - this.W_FirstWeightNumber.HeaderText = "头数"; - this.W_FirstWeightNumber.Name = "W_FirstWeightNumber"; - this.W_FirstWeightNumber.ReadOnly = true; - this.W_FirstWeightNumber.Width = 65; + this.P_Number.DataPropertyName = "Number"; + this.P_Number.HeaderText = "总头数"; + this.P_Number.Name = "P_Number"; + this.P_Number.ReadOnly = true; + this.P_Number.Width = 80; // - // W_HouseNames + // P_AlreadyNumber // - this.W_HouseNames.DataPropertyName = "HouseNames"; - this.W_HouseNames.HeaderText = "圈舍"; - this.W_HouseNames.Name = "W_HouseNames"; - this.W_HouseNames.ReadOnly = true; - this.W_HouseNames.Width = 105; + this.P_AlreadyNumber.DataPropertyName = "AlreadyNumber"; + this.P_AlreadyNumber.HeaderText = "已排"; + this.P_AlreadyNumber.Name = "P_AlreadyNumber"; + this.P_AlreadyNumber.ReadOnly = true; + this.P_AlreadyNumber.Width = 65; + // + // P_LastNumber + // + this.P_LastNumber.DataPropertyName = "LastNumber"; + this.P_LastNumber.HeaderText = "剩余"; + this.P_LastNumber.Name = "P_LastNumber"; + this.P_LastNumber.ReadOnly = true; + this.P_LastNumber.Width = 65; + // + // P_WeighTime + // + this.P_WeighTime.DataPropertyName = "WeighTime"; + this.P_WeighTime.HeaderText = "过磅时间"; + this.P_WeighTime.Name = "P_WeighTime"; + this.P_WeighTime.ReadOnly = true; + this.P_WeighTime.Width = 105; + // + // P_OKBtn + // + this.P_OKBtn.HeaderText = "排宰"; + this.P_OKBtn.Name = "P_OKBtn"; + this.P_OKBtn.ReadOnly = true; + this.P_OKBtn.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.P_OKBtn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.P_OKBtn.Text = "排宰"; + this.P_OKBtn.UseColumnTextForButtonValue = true; + this.P_OKBtn.Width = 85; + // + // P_Hidden + // + this.P_Hidden.HeaderText = "隐藏"; + this.P_Hidden.Name = "P_Hidden"; + this.P_Hidden.ReadOnly = true; + this.P_Hidden.Text = "隐藏"; + this.P_Hidden.Width = 85; // // QualityOrderForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1294, 831); + this.ClientSize = new System.Drawing.Size(1384, 831); this.Controls.Add(this.uTabControl1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; @@ -919,6 +994,8 @@ ((System.ComponentModel.ISupportInitialize)(this.weightBillGrid)).EndInit(); this.tabPage2.ResumeLayout(false); this.tabPage2.PerformLayout(); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); this.panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.preOrderGrid)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.orderGrid)).EndInit(); @@ -979,15 +1056,6 @@ private System.Windows.Forms.DataGridViewTextBoxColumn O_LiveColonyHouse_Name; private System.Windows.Forms.DataGridViewButtonColumn O_OKBtn; private System.Windows.Forms.DataGridViewButtonColumn O_HurryBtn; - private System.Windows.Forms.DataGridViewTextBoxColumn P_WeightBill_ID; - private System.Windows.Forms.DataGridViewTextBoxColumn P_B3ID; - private System.Windows.Forms.DataGridViewTextBoxColumn P_Supplier_Name; - private System.Windows.Forms.DataGridViewTextBoxColumn P_HouseNames; - private System.Windows.Forms.DataGridViewTextBoxColumn P_Number; - private System.Windows.Forms.DataGridViewTextBoxColumn P_AlreadyNumber; - private System.Windows.Forms.DataGridViewTextBoxColumn P_LastNumber; - private System.Windows.Forms.DataGridViewTextBoxColumn P_WeighTime; - private System.Windows.Forms.DataGridViewButtonColumn R_OKBtn; private System.Windows.Forms.Panel panel2; private System.Windows.Forms.DataGridViewTextBoxColumn W_ID; private System.Windows.Forms.DataGridViewTextBoxColumn W_AlreadyHouse; @@ -996,6 +1064,21 @@ private System.Windows.Forms.DataGridViewTextBoxColumn W_Supplier_Name; private System.Windows.Forms.DataGridViewTextBoxColumn W_FirstWeightNumber; private System.Windows.Forms.DataGridViewTextBoxColumn W_HouseNames; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.RadioButton showHidden; + private System.Windows.Forms.RadioButton showAvailable; + private System.Windows.Forms.RadioButton showAll; + private System.Windows.Forms.DataGridViewTextBoxColumn P_WeightBill_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn P_Show; + private System.Windows.Forms.DataGridViewTextBoxColumn P_B3ID; + private System.Windows.Forms.DataGridViewTextBoxColumn P_Supplier_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn P_HouseNames; + private System.Windows.Forms.DataGridViewTextBoxColumn P_Number; + private System.Windows.Forms.DataGridViewTextBoxColumn P_AlreadyNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn P_LastNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn P_WeighTime; + private System.Windows.Forms.DataGridViewButtonColumn P_OKBtn; + private System.Windows.Forms.DataGridViewButtonColumn P_Hidden; diff --git a/QualityAndOrder/QualityOrderForm.resx b/QualityAndOrder/QualityOrderForm.resx index 49479a6..e72c0a1 100644 --- a/QualityAndOrder/QualityOrderForm.resx +++ b/QualityAndOrder/QualityOrderForm.resx @@ -117,24 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - True @@ -171,39 +153,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - True @@ -225,37 +174,10 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - + True - + True @@ -279,10 +201,10 @@ True - + True - + True @@ -312,16 +234,4 @@ True - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/QualityAndOrder/QualityOrderFormForTab2.cs b/QualityAndOrder/QualityOrderFormForTab2.cs index b4aaa90..209af72 100644 --- a/QualityAndOrder/QualityOrderFormForTab2.cs +++ b/QualityAndOrder/QualityOrderFormForTab2.cs @@ -28,6 +28,7 @@ namespace QualityAndOrder preOrderGrid.DataSource = null; AddKeyPadForTab2(); + showAvailable.Checked = true; } private void AddKeyPadForTab2() @@ -74,7 +75,7 @@ namespace QualityAndOrder private void tab2SyncBtn_Click(object sender, EventArgs e) { - needOrderList = OrderDetailRpc.GetNeedOrderWeightBill(tab2DateSelect.Date.Value); + needOrderList = OrderDetailRpc.GetNeedOrderWeightBill(tab2DateSelect.Date.Value, GetSelectType()); BindPreOrderGrid(); orderList = OrderDetailRpc.GetOrderDetail(); BindOrderGrid(); @@ -137,6 +138,13 @@ namespace QualityAndOrder void BindPreOrderGrid() { preOrderGrid.DataSource = needOrderList.OrderBy(x => x.WeighTime).ToList(); + foreach (DataGridViewRow row in preOrderGrid.Rows) + { + var show = (bool)row.Cells["P_Show"].Value; + if (!show) + row.DefaultCellStyle.BackColor = Color.YellowGreen; + ((DataGridViewButtonCell)row.Cells["P_Hidden"]).Value = show ? "隐藏" : "显示"; + } preOrderGrid.Refresh(); } @@ -155,26 +163,41 @@ namespace QualityAndOrder { if (e.RowIndex == -1) return; - if (e.ColumnIndex != preOrderGrid.ColumnCount - 1) + if (e.ColumnIndex < preOrderGrid.ColumnCount - 2) return; - var currentOrder = 0; - if (orderGrid.CurrentRow != null) - currentOrder = (int)orderGrid.CurrentRow.Cells["O_Order"].Value + 1; - else - currentOrder = OrderDetailRpc.GetMaxOrder(tab2DateSelect.Date.Value); var entity = preOrderGrid.CurrentRow.DataBoundItem as NeedOrderEntity; - var order = new OrderDetail(); - order.Order = currentOrder; - order.LiveColonyHouse_Name = entity.HouseNames; - order.PlanNumber = entity.LastNumber; - order.WeightBill_ID = entity.WeightBill_ID; - order.B3WeighBill_ID = entity.B3ID; - var needUpdate = ReOrder(order, true); - orderList.Add(order); - OrderDetailRpc.Insert(needUpdate, order); - BindOrderGrid(); - needOrderList.Remove(entity); - BindPreOrderGrid(); + if (e.ColumnIndex == preOrderGrid.ColumnCount - 2) + { + var currentOrder = 0; + if (orderGrid.CurrentRow != null) + currentOrder = (int)orderGrid.CurrentRow.Cells["O_Order"].Value + 1; + else + currentOrder = OrderDetailRpc.GetMaxOrder(tab2DateSelect.Date.Value); + var order = new OrderDetail(); + order.Order = currentOrder; + order.LiveColonyHouse_Name = entity.HouseNames; + order.PlanNumber = entity.LastNumber; + order.WeightBill_ID = entity.WeightBill_ID; + order.B3WeighBill_ID = entity.B3ID; + var needUpdate = ReOrder(order, true); + orderList.Add(order); + OrderDetailRpc.Insert(needUpdate, order); + BindOrderGrid(); + needOrderList.Remove(entity); + BindPreOrderGrid(); + } + else + { + entity.Show = !entity.Show; + OrderDetailRpc.ChangeShowType(entity.WeightBill_ID, entity.Show); + var row = preOrderGrid.CurrentRow; + if (entity.Show) + row.DefaultCellStyle.BackColor = preOrderGrid.RowsDefaultCellStyle.BackColor; + else + row.DefaultCellStyle.BackColor = Color.YellowGreen; + ((DataGridViewButtonCell)row.Cells["P_Hidden"]).Value = entity.Show ? "隐藏" : "显示"; + preOrderGrid.Refresh(); + } } private void orderGrid_CellClick(object sender, DataGridViewCellEventArgs e) @@ -239,5 +262,22 @@ namespace QualityAndOrder } return result; } + + + bool? GetSelectType() + { + bool? type = null; + if (showAvailable.Checked) + type = true; + else if (showHidden.Checked) + type = false; + return type; + } + + private void showRadio_CheckedChanged(object sender, EventArgs e) + { + needOrderList = OrderDetailRpc.GetNeedOrderWeightBill(tab2DateSelect.Date.Value, GetSelectType()); + BindPreOrderGrid(); + } } }