diff --git a/ButcherFactory.BO/Bill/CarcassSaleOut_Detail.cs b/ButcherFactory.BO/Bill/CarcassSaleOut_Detail.cs index 3cbb2a9..7e2bcbb 100644 --- a/ButcherFactory.BO/Bill/CarcassSaleOut_Detail.cs +++ b/ButcherFactory.BO/Bill/CarcassSaleOut_Detail.cs @@ -32,8 +32,7 @@ namespace ButcherFactory.BO public long? ProductBatch_ID { get; set; } - [NonDmoProperty] - public int Number { get; set; } + public decimal Number { get; set; } public decimal? InStoreWeight { get; set; } diff --git a/ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs b/ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs index 965a6c4..dd9afdb 100644 --- a/ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs +++ b/ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs @@ -17,9 +17,9 @@ namespace ButcherFactory.BO.LocalBL const string RpcPath = @"/MainSystem/B3Sale/Rpcs/"; const string MESPath = @"/MainSystem/B3ClientService/Rpcs/"; - public static BindingList GetSaleOutStoreList(DateTime sendDate, long? deliverGoodsLineID, long? customerID, int billState, long? storeID) + public static BindingList GetSaleOutStoreList(DateTime sendDate, long? deliverGoodsLineID, long? customerID, int billState, long? storeID, bool already = false) { - var json = RpcFacade.Call(RpcPath + "SaleOutStoreRpc/GetSaleOutStoreList", sendDate, billState, deliverGoodsLineID, customerID, storeID); + var json = RpcFacade.Call(RpcPath + "SaleOutStoreRpc/GetSaleOutStoreList", sendDate, billState, deliverGoodsLineID, customerID, storeID, already); var list = JsonConvert.DeserializeObject>(json); return new BindingList(list); } @@ -44,7 +44,7 @@ namespace ButcherFactory.BO.LocalBL { using (var session = DmoSession.New()) { - var detail = new CarcassSaleOut_Detail() { Weight = weight }; + var detail = new CarcassSaleOut_Detail() { Weight = weight, Number = 1 }; session.Insert(detail); session.Commit(); return detail; @@ -68,12 +68,19 @@ namespace ButcherFactory.BO.LocalBL var list = new List>(); if (barCode.StartsWith("G")) { - var gid = long.Parse(barCode.TrimStart('G')); + var arr = barCode.TrimStart('G').Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries); + + var gid = long.Parse(arr[0]); var gInfo = GetGoodsInfo(gid); first.Goods_ID = gid; first.Goods_Name = gInfo.Item1; first.Goods_Code = gInfo.Item2; first.ProductBatch_ID = batchID; + if (arr.Length == 2) + { + first.Number = 0.5m; + list.Add(new Tuple("Number", first.Number)); + } list.Add(new Tuple("ProductBatch_ID", first.ProductBatch_ID)); } else @@ -147,7 +154,7 @@ namespace ButcherFactory.BO.LocalBL public static void SubmitDetails(BindingList details, SaleOutStore_Detail detail) { - var arr = details.Select(x => new WeightRecord { WeightTime = x.Time, MainUnitNum = x.Weight, ProductBatch_ID = x.ProductBatch_ID, BarCode = x.BarCode }); + var arr = details.Select(x => new WeightRecord { WeightTime = x.Time, MainUnitNum = x.Weight, SecondNumber = x.Number, ProductBatch_ID = x.ProductBatch_ID, BarCode = x.BarCode }); RpcFacade.Call(RpcPath + "SaleOutStoreRpc/SaveWeightRecord", JsonConvert.SerializeObject(arr), detail.ID); var update = new DQUpdateDom(typeof(CarcassSaleOut_Detail)); @@ -157,7 +164,7 @@ namespace ButcherFactory.BO.LocalBL update.EExecute(); detail.SNumber = (detail.SNumber ?? 0) + details.Sum(x => x.Weight); - detail.SSecondNumber = (detail.SSecondNumber ?? 0) + details.Count(); + detail.SSecondNumber = (detail.SSecondNumber ?? 0) + details.Sum(x => x.Number); } public static void SetGoodsFinish(long id) @@ -179,5 +186,6 @@ namespace ButcherFactory.BO.LocalBL public long? ProductBatch_ID { get; set; } public DateTime WeightTime { get; set; } public decimal? MainUnitNum { get; set; } + public decimal? SecondNumber { get; set; } } } diff --git a/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs b/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs index 2b41abd..a23eeae 100644 --- a/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs +++ b/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs @@ -29,25 +29,26 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarcassSaleOutForm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle 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 dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle46 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle52 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle47 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle48 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle49 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle50 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle51 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle53 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle54 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle60 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle55 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle56 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle57 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle58 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle59 = new System.Windows.Forms.DataGridViewCellStyle(); this.uWeightControl1 = new WinFormControl.UWeightControl(); this.panel1 = new System.Windows.Forms.Panel(); this.carNumberLabel = new WinFormControl.ULabel(); @@ -99,6 +100,7 @@ this.D_DiffNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.sendGridView = new WinFormControl.UDataGridView(); + this.commitBtn = new WinFormControl.UButton(); this.F_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_GoodsCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -107,7 +109,7 @@ this.F_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_DiffWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.commitBtn = new WinFormControl.UButton(); + this.alreadyViewBtn = new WinFormControl.UButton(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.panel3.SuspendLayout(); @@ -288,9 +290,9 @@ this.uTimerLabel1.Format = "M月d日 H:mm:ss"; this.uTimerLabel1.Location = new System.Drawing.Point(1167, 49); this.uTimerLabel1.Name = "uTimerLabel1"; - this.uTimerLabel1.Size = new System.Drawing.Size(128, 16); + this.uTimerLabel1.Size = new System.Drawing.Size(136, 16); this.uTimerLabel1.TabIndex = 11; - this.uTimerLabel1.Text = "5月8日 17:27:48"; + this.uTimerLabel1.Text = "5月22日 11:14:09"; // // uScanPanel1 // @@ -461,11 +463,12 @@ // panel3 // this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.panel3.Controls.Add(this.alreadyViewBtn); this.panel3.Controls.Add(this.goodsFinishBtn); this.panel3.Controls.Add(this.weightRecordBtn); this.panel3.Location = new System.Drawing.Point(2, 263); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(492, 59); + this.panel3.Size = new System.Drawing.Size(492, 70); this.panel3.TabIndex = 4; // // goodsFinishBtn @@ -477,7 +480,7 @@ this.goodsFinishBtn.FlatAppearance.BorderSize = 0; this.goodsFinishBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.goodsFinishBtn.ForeColor = System.Drawing.Color.Black; - this.goodsFinishBtn.Location = new System.Drawing.Point(268, 13); + this.goodsFinishBtn.Location = new System.Drawing.Point(345, 17); this.goodsFinishBtn.Name = "goodsFinishBtn"; this.goodsFinishBtn.PlaySound = false; this.goodsFinishBtn.SelfControlEnable = false; @@ -498,7 +501,7 @@ this.weightRecordBtn.FlatAppearance.BorderSize = 0; this.weightRecordBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.weightRecordBtn.ForeColor = System.Drawing.Color.Black; - this.weightRecordBtn.Location = new System.Drawing.Point(90, 13); + this.weightRecordBtn.Location = new System.Drawing.Point(182, 17); this.weightRecordBtn.Name = "weightRecordBtn"; this.weightRecordBtn.PlaySound = false; this.weightRecordBtn.SelfControlEnable = false; @@ -516,17 +519,17 @@ this.mainGridView.AllowUserToDeleteRows = false; this.mainGridView.AllowUserToResizeColumns = false; this.mainGridView.AllowUserToResizeRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.mainGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle41.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.mainGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle41; this.mainGridView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); this.mainGridView.BackgroundColor = System.Drawing.Color.White; this.mainGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.mainGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle42.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle42.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle42.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle42.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.mainGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle42; this.mainGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.mainGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.M_ID, @@ -537,18 +540,18 @@ this.mainGridView.MultiSelect = false; this.mainGridView.Name = "mainGridView"; this.mainGridView.ReadOnly = true; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.mainGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle43.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle43.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle43.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle43.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle43.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle43.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle43.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.mainGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle43; this.mainGridView.RowHeadersVisible = false; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.mainGridView.RowsDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle44.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle44.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.mainGridView.RowsDefaultCellStyle = dataGridViewCellStyle44; this.mainGridView.RowTemplate.Height = 40; this.mainGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.mainGridView.Size = new System.Drawing.Size(493, 254); @@ -617,15 +620,15 @@ this.orderGridView.AllowUserToDeleteRows = false; this.orderGridView.AllowUserToResizeColumns = false; this.orderGridView.AllowUserToResizeRows = false; - dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.orderGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle45.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.orderGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle45; this.orderGridView.BackgroundColor = System.Drawing.Color.White; this.orderGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle6.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.orderGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle46.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle46.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle46.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle46.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.orderGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle46; this.orderGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.orderGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.D_ID, @@ -644,9 +647,9 @@ this.orderGridView.Name = "orderGridView"; this.orderGridView.ReadOnly = true; this.orderGridView.RowHeadersVisible = false; - dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.orderGridView.RowsDefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle52.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle52.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.orderGridView.RowsDefaultCellStyle = dataGridViewCellStyle52; this.orderGridView.RowTemplate.Height = 40; this.orderGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.orderGridView.Size = new System.Drawing.Size(789, 200); @@ -698,8 +701,8 @@ // D_SecondNumber // this.D_SecondNumber.DataPropertyName = "SecondNumber"; - dataGridViewCellStyle7.Format = "#0.######"; - this.D_SecondNumber.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle47.Format = "#0.######"; + this.D_SecondNumber.DefaultCellStyle = dataGridViewCellStyle47; this.D_SecondNumber.HeaderText = "辅数量"; this.D_SecondNumber.Name = "D_SecondNumber"; this.D_SecondNumber.ReadOnly = true; @@ -707,8 +710,8 @@ // D_Number // this.D_Number.DataPropertyName = "Number"; - dataGridViewCellStyle8.Format = "#0.######"; - this.D_Number.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle48.Format = "#0.######"; + this.D_Number.DefaultCellStyle = dataGridViewCellStyle48; this.D_Number.HeaderText = "报价数量"; this.D_Number.Name = "D_Number"; this.D_Number.ReadOnly = true; @@ -716,8 +719,8 @@ // D_SSecondNumber // this.D_SSecondNumber.DataPropertyName = "SSecondNumber"; - dataGridViewCellStyle9.Format = "#0.######"; - this.D_SSecondNumber.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle49.Format = "#0.######"; + this.D_SSecondNumber.DefaultCellStyle = dataGridViewCellStyle49; this.D_SSecondNumber.HeaderText = "配货辅数量"; this.D_SSecondNumber.Name = "D_SSecondNumber"; this.D_SSecondNumber.ReadOnly = true; @@ -725,8 +728,8 @@ // D_SNumber // this.D_SNumber.DataPropertyName = "SNumber"; - dataGridViewCellStyle10.Format = "#0.######"; - this.D_SNumber.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle50.Format = "#0.######"; + this.D_SNumber.DefaultCellStyle = dataGridViewCellStyle50; this.D_SNumber.HeaderText = "配货数量"; this.D_SNumber.Name = "D_SNumber"; this.D_SNumber.ReadOnly = true; @@ -734,8 +737,8 @@ // D_DiffNumber // this.D_DiffNumber.DataPropertyName = "DiffNumber"; - dataGridViewCellStyle11.Format = "#0.######"; - this.D_DiffNumber.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle51.Format = "#0.######"; + this.D_DiffNumber.DefaultCellStyle = dataGridViewCellStyle51; this.D_DiffNumber.HeaderText = "差异数量"; this.D_DiffNumber.Name = "D_DiffNumber"; this.D_DiffNumber.ReadOnly = true; @@ -757,15 +760,15 @@ this.sendGridView.AllowUserToDeleteRows = false; this.sendGridView.AllowUserToResizeColumns = false; this.sendGridView.AllowUserToResizeRows = false; - dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.sendGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13; + dataGridViewCellStyle53.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.sendGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle53; this.sendGridView.BackgroundColor = System.Drawing.Color.White; this.sendGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle14.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.sendGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14; + dataGridViewCellStyle54.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle54.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle54.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle54.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.sendGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle54; this.sendGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.sendGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.F_BarCode, @@ -782,14 +785,36 @@ this.sendGridView.Name = "sendGridView"; this.sendGridView.ReadOnly = true; this.sendGridView.RowHeadersVisible = false; - dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F); - dataGridViewCellStyle19.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.sendGridView.RowsDefaultCellStyle = dataGridViewCellStyle19; + dataGridViewCellStyle60.Font = new System.Drawing.Font("宋体", 9F); + dataGridViewCellStyle60.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.sendGridView.RowsDefaultCellStyle = dataGridViewCellStyle60; this.sendGridView.RowTemplate.Height = 23; this.sendGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.sendGridView.Size = new System.Drawing.Size(789, 200); this.sendGridView.TabIndex = 1; // + // commitBtn + // + this.commitBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.commitBtn.AsClicked = false; + this.commitBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("commitBtn.BackgroundImage"))); + this.commitBtn.EnableGroup = false; + this.commitBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.commitBtn.FlatAppearance.BorderSize = 0; + this.commitBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.commitBtn.ForeColor = System.Drawing.Color.Black; + this.commitBtn.Location = new System.Drawing.Point(1197, 566); + this.commitBtn.Name = "commitBtn"; + this.commitBtn.PlaySound = false; + this.commitBtn.SelfControlEnable = false; + this.commitBtn.Size = new System.Drawing.Size(100, 30); + this.commitBtn.SoundType = WinFormControl.SoundType.Click; + this.commitBtn.TabIndex = 15; + this.commitBtn.Text = "提交"; + this.commitBtn.UseVisualStyleBackColor = true; + this.commitBtn.WithStataHode = false; + this.commitBtn.Click += new System.EventHandler(this.commitBtn_Click); + // // F_BarCode // this.F_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; @@ -820,6 +845,8 @@ // F_Number // this.F_Number.DataPropertyName = "Number"; + dataGridViewCellStyle55.Format = "#0.######"; + this.F_Number.DefaultCellStyle = dataGridViewCellStyle55; this.F_Number.HeaderText = "数量"; this.F_Number.Name = "F_Number"; this.F_Number.ReadOnly = true; @@ -827,8 +854,8 @@ // F_InStoreWeight // this.F_InStoreWeight.DataPropertyName = "InStoreWeight"; - dataGridViewCellStyle15.Format = "#0.######"; - this.F_InStoreWeight.DefaultCellStyle = dataGridViewCellStyle15; + dataGridViewCellStyle56.Format = "#0.######"; + this.F_InStoreWeight.DefaultCellStyle = dataGridViewCellStyle56; this.F_InStoreWeight.HeaderText = "入库重量"; this.F_InStoreWeight.Name = "F_InStoreWeight"; this.F_InStoreWeight.ReadOnly = true; @@ -836,8 +863,8 @@ // F_Weight // this.F_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle16.Format = "#0.######"; - this.F_Weight.DefaultCellStyle = dataGridViewCellStyle16; + dataGridViewCellStyle57.Format = "#0.######"; + this.F_Weight.DefaultCellStyle = dataGridViewCellStyle57; this.F_Weight.HeaderText = "重量"; this.F_Weight.Name = "F_Weight"; this.F_Weight.ReadOnly = true; @@ -845,8 +872,8 @@ // F_DiffWeight // this.F_DiffWeight.DataPropertyName = "DiffWeight"; - dataGridViewCellStyle17.Format = "#0.######"; - this.F_DiffWeight.DefaultCellStyle = dataGridViewCellStyle17; + dataGridViewCellStyle58.Format = "#0.######"; + this.F_DiffWeight.DefaultCellStyle = dataGridViewCellStyle58; this.F_DiffWeight.HeaderText = "差异"; this.F_DiffWeight.Name = "F_DiffWeight"; this.F_DiffWeight.ReadOnly = true; @@ -854,34 +881,33 @@ // F_Time // this.F_Time.DataPropertyName = "Time"; - dataGridViewCellStyle18.Format = "MM/dd HH:mm:ss"; - this.F_Time.DefaultCellStyle = dataGridViewCellStyle18; + dataGridViewCellStyle59.Format = "MM/dd HH:mm:ss"; + this.F_Time.DefaultCellStyle = dataGridViewCellStyle59; this.F_Time.HeaderText = "时间"; this.F_Time.Name = "F_Time"; this.F_Time.ReadOnly = true; this.F_Time.Width = 120; // - // commitBtn - // - this.commitBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.commitBtn.AsClicked = false; - this.commitBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("commitBtn.BackgroundImage"))); - this.commitBtn.EnableGroup = false; - this.commitBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); - this.commitBtn.FlatAppearance.BorderSize = 0; - this.commitBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.commitBtn.ForeColor = System.Drawing.Color.Black; - this.commitBtn.Location = new System.Drawing.Point(1197, 566); - this.commitBtn.Name = "commitBtn"; - this.commitBtn.PlaySound = false; - this.commitBtn.SelfControlEnable = false; - this.commitBtn.Size = new System.Drawing.Size(100, 30); - this.commitBtn.SoundType = WinFormControl.SoundType.Click; - this.commitBtn.TabIndex = 15; - this.commitBtn.Text = "提交"; - this.commitBtn.UseVisualStyleBackColor = true; - this.commitBtn.WithStataHode = false; - this.commitBtn.Click += new System.EventHandler(this.commitBtn_Click); + // alreadyViewBtn + // + this.alreadyViewBtn.AsClicked = false; + this.alreadyViewBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("alreadyViewBtn.BackgroundImage"))); + this.alreadyViewBtn.EnableGroup = false; + this.alreadyViewBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.alreadyViewBtn.FlatAppearance.BorderSize = 0; + this.alreadyViewBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.alreadyViewBtn.ForeColor = System.Drawing.Color.Black; + this.alreadyViewBtn.Location = new System.Drawing.Point(31, 17); + this.alreadyViewBtn.Name = "alreadyViewBtn"; + this.alreadyViewBtn.PlaySound = false; + this.alreadyViewBtn.SelfControlEnable = false; + this.alreadyViewBtn.Size = new System.Drawing.Size(100, 30); + this.alreadyViewBtn.SoundType = WinFormControl.SoundType.Click; + this.alreadyViewBtn.TabIndex = 14; + this.alreadyViewBtn.Text = "已配货"; + this.alreadyViewBtn.UseVisualStyleBackColor = true; + this.alreadyViewBtn.WithStataHode = false; + this.alreadyViewBtn.Click += new System.EventHandler(this.alreadyViewBtn_Click); // // CarcassSaleOutForm // @@ -977,5 +1003,6 @@ private System.Windows.Forms.DataGridViewTextBoxColumn F_Weight; private System.Windows.Forms.DataGridViewTextBoxColumn F_DiffWeight; private System.Windows.Forms.DataGridViewTextBoxColumn F_Time; + private WinFormControl.UButton alreadyViewBtn; } } \ No newline at end of file diff --git a/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs b/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs index ff4aa8e..46795be 100644 --- a/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs +++ b/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs @@ -38,6 +38,7 @@ namespace ButcherFactory.CarcassSaleOut_ internal int billState; internal long? storeID; long? batchID; + bool already = false; public CarcassSaleOutForm() { InitializeComponent(); @@ -116,9 +117,8 @@ namespace ButcherFactory.CarcassSaleOut_ private void refreshBtn_Click(object sender, EventArgs e) { - saleOutStoreList = CarcassSaleOutBL.GetSaleOutStoreList(sendTime, deliverGoodsLineID, customerID, billState, storeID); - mainGridView.DataSource = saleOutStoreList; - mainGridView.Refresh(); + already = false; + Refersh(); } private void weightRecordBtn_Click(object sender, EventArgs e) @@ -130,7 +130,7 @@ namespace ButcherFactory.CarcassSaleOut_ } private void goodsFinishBtn_Click(object sender, EventArgs e) - { + { if (mainGridView.CurrentRow == null) throw new Exception("请选择要配货完成的发货单"); var id = (long)mainGridView.CurrentRow.Cells[0].Value; @@ -250,5 +250,26 @@ namespace ButcherFactory.CarcassSaleOut_ orderGridView.FirstDisplayedScrollingRowIndex = 0; orderGridView.Refresh(); } + + private void alreadyViewBtn_Click(object sender, EventArgs e) + { + already = true; + Refersh(); + } + + void Refersh() + { + commitBtn.Enabled = !already; + goodsFinishBtn.Enabled = !already; + if (details != null) + { + details.Clear(); + orderGridView.Refresh(); + } + + saleOutStoreList = CarcassSaleOutBL.GetSaleOutStoreList(sendTime, deliverGoodsLineID, customerID, billState, storeID, already); + mainGridView.DataSource = saleOutStoreList; + mainGridView.Refresh(); + } } } diff --git a/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.resx b/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.resx index 6109374..8cb7f39 100644 --- a/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.resx +++ b/ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.resx @@ -140,6 +140,14 @@ wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK + goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg + KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=