From d6948ed27b3104379089c2f2ee5e554a36beab1f Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Sat, 3 Feb 2018 15:21:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BD=E6=9D=A1=E5=85=A5=E5=BA=93=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/Utils/AfterLoginUtil.cs | 7 +- ButcherManageClient/Login.cs | 4 +- .../LocalSyncBO/TrunksIousOutInStoreRecord.cs | 4 + .../TrunksIousOutInStoreForm.Designer.cs | 276 ++++++++++-------- .../TrunksIousOutInStoreForm.cs | 29 +- .../TrunksIousOutInStoreForm.resx | 24 +- WeighAndGrading/GradeFrom.cs | 5 + WeighAndGrading/GradeFrom.resx | 3 - WeighAndGrading/WeighAndGrading.csproj | 4 + WeighAndGrading/WeightGradePrint.cs | 49 ++-- 10 files changed, 241 insertions(+), 164 deletions(-) diff --git a/BO/Utils/AfterLoginUtil.cs b/BO/Utils/AfterLoginUtil.cs index 2d59217..5762a70 100644 --- a/BO/Utils/AfterLoginUtil.cs +++ b/BO/Utils/AfterLoginUtil.cs @@ -22,7 +22,7 @@ namespace BO.Utils // static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), // new Tuple("过磅员",@"C:\B3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), // new Tuple("验质员",@"C:\B3\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), -// new Tuple("定级员",@"C:\B3\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), +// new Tuple("定级员",@"C:\\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), // new Tuple("窒晕员",@"C:\B3\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), // new Tuple("胴体白条出入库",@"C:\B3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"), // new Tuple("掉猪处理员",@"C:\B3\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"), @@ -37,9 +37,9 @@ namespace BO.Utils new Tuple("排宰员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), new Tuple("过磅员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), new Tuple("验质员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), - new Tuple("定级员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), + new Tuple("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), new Tuple("窒晕员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), - new Tuple("胴体白条出入库",@"D:\BWP\BWPB3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"), + new Tuple("白条入库",@"D:\BWP\BWPB3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"), new Tuple("掉猪处理员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"), new Tuple("配货员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\Distribution\bin\Debug\Distribution"), new Tuple("分割称重",@"D:\BWP\BWPB3\src\B3ButcherManageClient\SegmentationWeight\bin\Debug\SegmentationWeight"), @@ -58,6 +58,7 @@ namespace BO.Utils new Tuple("分割称重",@"SegmentationWeight"), new Tuple("分割入库",@"SegmentationInStore"), new Tuple("定级校验",@"WeighAndGrading"), + new Tuple("白条入库",@"TrunksIousOutInStore"), }; #endif diff --git a/ButcherManageClient/Login.cs b/ButcherManageClient/Login.cs index de619aa..f9959f1 100644 --- a/ButcherManageClient/Login.cs +++ b/ButcherManageClient/Login.cs @@ -71,10 +71,10 @@ namespace ButcherManageClient } #if DEBUG - var form = AfterLoginUtil.CreateForm("分割称重"); + // var form = AfterLoginUtil.CreateForm("分割称重"); #endif -#if !DEBUG +#if DEBUG var form = AfterLoginUtil.CreateForm(ButcherAppContext.Context.UserConfig.Role); #endif diff --git a/TrunksIousOutInStore/LocalSyncBO/TrunksIousOutInStoreRecord.cs b/TrunksIousOutInStore/LocalSyncBO/TrunksIousOutInStoreRecord.cs index 74745b8..c59bb96 100644 --- a/TrunksIousOutInStore/LocalSyncBO/TrunksIousOutInStoreRecord.cs +++ b/TrunksIousOutInStore/LocalSyncBO/TrunksIousOutInStoreRecord.cs @@ -25,8 +25,12 @@ namespace TrunksIousOutInStore.LocalSyncBO set { mNumber = value; } } + public decimal? BeforeWeight { get; set; } + public decimal? Weight { get; set; } + public decimal? DiscontWeight { get { return (BeforeWeight ?? 0) - (Weight ?? 0); } } + public string CarcassStatus{ get; set; }// 胴体状态 public override string GetDtoJson() { diff --git a/TrunksIousOutInStore/TrunksIousOutInStoreForm.Designer.cs b/TrunksIousOutInStore/TrunksIousOutInStoreForm.Designer.cs index 6b541f2..0e9f74b 100644 --- a/TrunksIousOutInStore/TrunksIousOutInStoreForm.Designer.cs +++ b/TrunksIousOutInStore/TrunksIousOutInStoreForm.Designer.cs @@ -28,12 +28,15 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = 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 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 dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = 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(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.panel1 = new System.Windows.Forms.Panel(); this.btnEnableWeight = new System.Windows.Forms.Button(); @@ -51,6 +54,13 @@ this.btnWeightSet = new System.Windows.Forms.Button(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.gridUnCheck = new System.Windows.Forms.DataGridView(); + this.uncheck序号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.uncheck条码 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.uncheck产品名称 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.uncheck数量 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.uncheck重量 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.gridChecked = new BWP.WinFormControl.UDataGridView(); this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.条码 = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -59,13 +69,8 @@ this.入库重量 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.胴体重量 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.损耗 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.gridUnCheck = new System.Windows.Forms.DataGridView(); - this.uncheck序号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.uncheck条码 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.uncheck产品名称 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.uncheck数量 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.uncheck重量 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.lbStore = new System.Windows.Forms.Label(); + this.cbxBatch = new System.Windows.Forms.ComboBox(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -78,9 +83,9 @@ this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.SuspendLayout(); this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.gridChecked)).BeginInit(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gridUnCheck)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridChecked)).BeginInit(); this.SuspendLayout(); // // splitContainer1 @@ -152,7 +157,9 @@ // this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel3.Controls.Add(this.cbxBatch); this.panel3.Controls.Add(this.cbxStore); + this.panel3.Controls.Add(this.lbStore); this.panel3.Controls.Add(this.label1); this.panel3.Controls.Add(this.cbxWorkUnit); this.panel3.Controls.Add(this.label5); @@ -168,7 +175,7 @@ this.cbxStore.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbxStore.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cbxStore.FormattingEnabled = true; - this.cbxStore.Location = new System.Drawing.Point(75, 91); + this.cbxStore.Location = new System.Drawing.Point(75, 73); this.cbxStore.Name = "cbxStore"; this.cbxStore.Size = new System.Drawing.Size(121, 24); this.cbxStore.TabIndex = 43; @@ -176,7 +183,7 @@ // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(9, 98); + this.label1.Location = new System.Drawing.Point(9, 80); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(65, 12); this.label1.TabIndex = 42; @@ -187,7 +194,7 @@ this.cbxWorkUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbxWorkUnit.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cbxWorkUnit.FormattingEnabled = true; - this.cbxWorkUnit.Location = new System.Drawing.Point(75, 48); + this.cbxWorkUnit.Location = new System.Drawing.Point(75, 41); this.cbxWorkUnit.Name = "cbxWorkUnit"; this.cbxWorkUnit.Size = new System.Drawing.Size(121, 24); this.cbxWorkUnit.TabIndex = 40; @@ -195,7 +202,7 @@ // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(9, 54); + this.label5.Location = new System.Drawing.Point(9, 47); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(65, 12); this.label5.TabIndex = 37; @@ -275,28 +282,117 @@ this.groupBox2.Controls.Add(this.gridChecked); this.groupBox2.Location = new System.Drawing.Point(48, 252); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(667, 179); + this.groupBox2.Size = new System.Drawing.Size(665, 177); this.groupBox2.TabIndex = 3; this.groupBox2.TabStop = false; this.groupBox2.Text = "已提交"; // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.gridUnCheck); + this.groupBox1.Location = new System.Drawing.Point(48, 12); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(670, 220); + this.groupBox1.TabIndex = 2; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "待提交"; + // + // gridUnCheck + // + this.gridUnCheck.AllowUserToAddRows = false; + this.gridUnCheck.AllowUserToDeleteRows = false; + this.gridUnCheck.AllowUserToResizeColumns = false; + this.gridUnCheck.AllowUserToResizeRows = false; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.gridUnCheck.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; + this.gridUnCheck.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.gridUnCheck.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; + this.gridUnCheck.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gridUnCheck.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.uncheck序号, + this.uncheck条码, + this.uncheck产品名称, + this.uncheck数量, + this.uncheck重量}); + this.gridUnCheck.Dock = System.Windows.Forms.DockStyle.Fill; + this.gridUnCheck.Location = new System.Drawing.Point(3, 17); + this.gridUnCheck.MultiSelect = false; + this.gridUnCheck.Name = "gridUnCheck"; + this.gridUnCheck.ReadOnly = true; + this.gridUnCheck.RowHeadersVisible = false; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.gridUnCheck.RowsDefaultCellStyle = dataGridViewCellStyle12; + this.gridUnCheck.RowTemplate.Height = 23; + this.gridUnCheck.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.gridUnCheck.Size = new System.Drawing.Size(664, 200); + this.gridUnCheck.TabIndex = 3; + // + // uncheck序号 + // + this.uncheck序号.DataPropertyName = "ID"; + this.uncheck序号.HeaderText = "序号"; + this.uncheck序号.Name = "uncheck序号"; + this.uncheck序号.ReadOnly = true; + this.uncheck序号.Visible = false; + // + // uncheck条码 + // + this.uncheck条码.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.uncheck条码.DataPropertyName = "BarCode"; + this.uncheck条码.HeaderText = "条码"; + this.uncheck条码.Name = "uncheck条码"; + this.uncheck条码.ReadOnly = true; + // + // uncheck产品名称 + // + this.uncheck产品名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.uncheck产品名称.DataPropertyName = "Goods_Name"; + this.uncheck产品名称.HeaderText = "产品名称"; + this.uncheck产品名称.Name = "uncheck产品名称"; + this.uncheck产品名称.ReadOnly = true; + this.uncheck产品名称.Width = 97; + // + // uncheck数量 + // + this.uncheck数量.DataPropertyName = "Number"; + this.uncheck数量.HeaderText = "数量"; + this.uncheck数量.Name = "uncheck数量"; + this.uncheck数量.ReadOnly = true; + // + // uncheck重量 + // + this.uncheck重量.DataPropertyName = "Weight"; + this.uncheck重量.HeaderText = "重量"; + this.uncheck重量.Name = "uncheck重量"; + this.uncheck重量.ReadOnly = true; + // // gridChecked // this.gridChecked.AllowUserToAddRows = false; this.gridChecked.AllowUserToDeleteRows = false; this.gridChecked.AllowUserToResizeColumns = false; this.gridChecked.AllowUserToResizeRows = false; - dataGridViewCellStyle37.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.gridChecked.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle37; + dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.gridChecked.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13; this.gridChecked.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle38.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle38.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle38.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle38.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle38.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.gridChecked.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle38; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.gridChecked.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14; this.gridChecked.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gridChecked.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.序号, @@ -312,12 +408,12 @@ this.gridChecked.Name = "gridChecked"; this.gridChecked.ReadOnly = true; this.gridChecked.RowHeadersVisible = false; - dataGridViewCellStyle39.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle39.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.gridChecked.RowsDefaultCellStyle = dataGridViewCellStyle39; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.gridChecked.RowsDefaultCellStyle = dataGridViewCellStyle18; this.gridChecked.RowTemplate.Height = 23; this.gridChecked.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.gridChecked.Size = new System.Drawing.Size(661, 159); + this.gridChecked.Size = new System.Drawing.Size(659, 157); this.gridChecked.TabIndex = 4; // // 序号 @@ -357,110 +453,48 @@ // 入库重量 // this.入库重量.DataPropertyName = "Weight"; + dataGridViewCellStyle15.Format = "#0.######"; + this.入库重量.DefaultCellStyle = dataGridViewCellStyle15; this.入库重量.HeaderText = "入库重量"; this.入库重量.Name = "入库重量"; this.入库重量.ReadOnly = true; // // 胴体重量 // + this.胴体重量.DataPropertyName = "BeforeWeight"; + dataGridViewCellStyle16.Format = "#0.######"; + this.胴体重量.DefaultCellStyle = dataGridViewCellStyle16; this.胴体重量.HeaderText = "胴体重量"; this.胴体重量.Name = "胴体重量"; this.胴体重量.ReadOnly = true; // // 损耗 // + this.损耗.DataPropertyName = "DiscontWeight"; + dataGridViewCellStyle17.Format = "#0.######"; + this.损耗.DefaultCellStyle = dataGridViewCellStyle17; this.损耗.HeaderText = "损耗"; this.损耗.Name = "损耗"; this.损耗.ReadOnly = true; // - // groupBox1 + // lbStore // - this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox1.Controls.Add(this.gridUnCheck); - this.groupBox1.Location = new System.Drawing.Point(48, 12); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(670, 220); - this.groupBox1.TabIndex = 2; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "待提交"; + this.lbStore.AutoSize = true; + this.lbStore.Location = new System.Drawing.Point(9, 113); + this.lbStore.Name = "lbStore"; + this.lbStore.Size = new System.Drawing.Size(65, 12); + this.lbStore.TabIndex = 42; + this.lbStore.Text = "批 次:"; // - // gridUnCheck + // cbxBatch // - this.gridUnCheck.AllowUserToAddRows = false; - this.gridUnCheck.AllowUserToDeleteRows = false; - this.gridUnCheck.AllowUserToResizeColumns = false; - this.gridUnCheck.AllowUserToResizeRows = false; - dataGridViewCellStyle40.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.gridUnCheck.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle40; - this.gridUnCheck.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle41.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle41.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle41.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle41.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle41.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle41.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle41.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.gridUnCheck.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle41; - this.gridUnCheck.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.gridUnCheck.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.uncheck序号, - this.uncheck条码, - this.uncheck产品名称, - this.uncheck数量, - this.uncheck重量}); - this.gridUnCheck.Dock = System.Windows.Forms.DockStyle.Fill; - this.gridUnCheck.Location = new System.Drawing.Point(3, 17); - this.gridUnCheck.MultiSelect = false; - this.gridUnCheck.Name = "gridUnCheck"; - this.gridUnCheck.ReadOnly = true; - this.gridUnCheck.RowHeadersVisible = false; - dataGridViewCellStyle42.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle42.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.gridUnCheck.RowsDefaultCellStyle = dataGridViewCellStyle42; - this.gridUnCheck.RowTemplate.Height = 23; - this.gridUnCheck.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.gridUnCheck.Size = new System.Drawing.Size(664, 200); - this.gridUnCheck.TabIndex = 3; - // - // uncheck序号 - // - this.uncheck序号.DataPropertyName = "ID"; - this.uncheck序号.HeaderText = "序号"; - this.uncheck序号.Name = "uncheck序号"; - this.uncheck序号.ReadOnly = true; - this.uncheck序号.Visible = false; - // - // uncheck条码 - // - this.uncheck条码.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.uncheck条码.DataPropertyName = "BarCode"; - this.uncheck条码.HeaderText = "条码"; - this.uncheck条码.Name = "uncheck条码"; - this.uncheck条码.ReadOnly = true; - // - // uncheck产品名称 - // - this.uncheck产品名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.uncheck产品名称.DataPropertyName = "Goods_Name"; - this.uncheck产品名称.HeaderText = "产品名称"; - this.uncheck产品名称.Name = "uncheck产品名称"; - this.uncheck产品名称.ReadOnly = true; - this.uncheck产品名称.Width = 97; - // - // uncheck数量 - // - this.uncheck数量.DataPropertyName = "Number"; - this.uncheck数量.HeaderText = "数量"; - this.uncheck数量.Name = "uncheck数量"; - this.uncheck数量.ReadOnly = true; - // - // uncheck重量 - // - this.uncheck重量.DataPropertyName = "Weight"; - this.uncheck重量.HeaderText = "重量"; - this.uncheck重量.Name = "uncheck重量"; - this.uncheck重量.ReadOnly = true; + this.cbxBatch.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbxBatch.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cbxBatch.FormattingEnabled = true; + this.cbxBatch.Location = new System.Drawing.Point(75, 106); + this.cbxBatch.Name = "cbxBatch"; + this.cbxBatch.Size = new System.Drawing.Size(121, 24); + this.cbxBatch.TabIndex = 43; // // TrunksIousOutInStoreForm // @@ -472,7 +506,7 @@ this.MinimizeBox = false; this.Name = "TrunksIousOutInStoreForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "胴体白条出入库"; + this.Text = "白条入库"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TrunksIousOutInStoreForm_FormClosing); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.TrunksIousOutInStoreForm_FormClosed); @@ -492,9 +526,9 @@ ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); this.splitContainer2.ResumeLayout(false); this.groupBox2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.gridChecked)).EndInit(); this.groupBox1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.gridUnCheck)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridChecked)).EndInit(); this.ResumeLayout(false); } @@ -533,5 +567,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn 入库重量; private System.Windows.Forms.DataGridViewTextBoxColumn 胴体重量; private System.Windows.Forms.DataGridViewTextBoxColumn 损耗; + private System.Windows.Forms.ComboBox cbxBatch; + private System.Windows.Forms.Label lbStore; } } \ No newline at end of file diff --git a/TrunksIousOutInStore/TrunksIousOutInStoreForm.cs b/TrunksIousOutInStore/TrunksIousOutInStoreForm.cs index 2078fc1..ce7f1a4 100644 --- a/TrunksIousOutInStore/TrunksIousOutInStoreForm.cs +++ b/TrunksIousOutInStore/TrunksIousOutInStoreForm.cs @@ -369,14 +369,21 @@ namespace TrunksIousOutInStore cbxWorkUnit.ValueMember = "Code"; } - var batch = mDropDownSets.Details.FirstOrDefault(x => x.Name == DropDownSets.批次); - if (batch != null) + var store = mDropDownSets.Details.FirstOrDefault(x => x.Name == DropDownSets.仓库); + if (store != null) { - cbxStore.DataSource = batch.Details; + cbxStore.DataSource = store.Details; cbxStore.DisplayMember = "Name"; cbxStore.ValueMember = "ID"; } + var batch = mDropDownSets.Details.FirstOrDefault(x => x.Name == DropDownSets.批次); + if (batch != null) + { + cbxBatch.DataSource = batch.Details; + cbxBatch.DisplayMember = "Name"; + cbxBatch.ValueMember = "ID"; + } } private DropDownSets GetmDropDownSets() @@ -385,9 +392,11 @@ namespace TrunksIousOutInStore var wrokUnitSet = GetWrokUnitSet(); var wrokShopSet = GetWrokShopSet(); var storeSet = GetStoreSet(); + var batchSet = GetBatchSet(); sets.Details.Add(wrokUnitSet); sets.Details.Add(wrokShopSet); sets.Details.Add(storeSet); + sets.Details.Add(batchSet); return sets; } @@ -427,6 +436,18 @@ namespace TrunksIousOutInStore return set; } + private DropDownSet GetBatchSet() + { + var json = RpcFacade.Call("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/GetProductBatchList"); + var set = new DropDownSet(); + set.Name = DropDownSets.批次; + foreach (var detail in JsonConvert.DeserializeObject>(json)) + { + set.Details.Add(detail); + } + return set; + } + static object _obj = new object(); private void doInsertUnSubmit(decimal weight) @@ -467,7 +488,7 @@ namespace TrunksIousOutInStore public string RoleName { - get { return "胴体白条出入库"; } + get { return "白条入库"; } } public Form Generate() { diff --git a/TrunksIousOutInStore/TrunksIousOutInStoreForm.resx b/TrunksIousOutInStore/TrunksIousOutInStoreForm.resx index 2a60b91..de08b16 100644 --- a/TrunksIousOutInStore/TrunksIousOutInStoreForm.resx +++ b/TrunksIousOutInStore/TrunksIousOutInStoreForm.resx @@ -117,40 +117,40 @@ 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 diff --git a/WeighAndGrading/GradeFrom.cs b/WeighAndGrading/GradeFrom.cs index e6529bc..8cdb636 100644 --- a/WeighAndGrading/GradeFrom.cs +++ b/WeighAndGrading/GradeFrom.cs @@ -427,6 +427,11 @@ namespace WeighAndGrading { WeightGradePrint.Print(entity); } + if (string.IsNullOrEmpty(modifyDetail.BarCode)) + { + modifyDetail.BarCode = entity.BarCode; + LocalGradeAndWeightBL.Update(modifyDetail, "BarCode"); + } } diff --git a/WeighAndGrading/GradeFrom.resx b/WeighAndGrading/GradeFrom.resx index 06ecffd..0f25fed 100644 --- a/WeighAndGrading/GradeFrom.resx +++ b/WeighAndGrading/GradeFrom.resx @@ -297,7 +297,4 @@ True - - True - \ No newline at end of file diff --git a/WeighAndGrading/WeighAndGrading.csproj b/WeighAndGrading/WeighAndGrading.csproj index 99847ba..4bb5d5b 100644 --- a/WeighAndGrading/WeighAndGrading.csproj +++ b/WeighAndGrading/WeighAndGrading.csproj @@ -34,6 +34,10 @@ false + + False + ..\..\..\tsref\Debug\BwpClientPrint.dll + diff --git a/WeighAndGrading/WeightGradePrint.cs b/WeighAndGrading/WeightGradePrint.cs index 76f9c72..7110e26 100644 --- a/WeighAndGrading/WeightGradePrint.cs +++ b/WeighAndGrading/WeightGradePrint.cs @@ -41,34 +41,43 @@ namespace WeighAndGrading entity.BarCode = barcode; } entity._2DQRCode = string.Format(ButcherAppContext.Context.UrlConfig.OutAddress + "?code={0}", entity.BarCode); - return entity; } - public static void Print(PrintEntity entity) - { - PrintAPI.B_GetUSBBufferLen(); - PrintAPI.B_EnumUSB(new byte[128]); - PrintAPI.B_CreateUSBPort(1); + //public static void Print(PrintEntity entity) + //{ + // PrintAPI.B_GetUSBBufferLen(); + // PrintAPI.B_EnumUSB(new byte[128]); + // PrintAPI.B_CreateUSBPort(1); - PrintAPI.B_Prn_Text_TrueType(110, 26, 31, "宋体", 1, 700, 0, 0, 0, "C1", entity.AccountingUnit_Name); - PrintAPI.B_Prn_Text_TrueType(42, 70, 31, "宋体", 1, 700, 0, 0, 0, "C2", "合格证"); - PrintAPI.B_Prn_Text_TrueType(440, 70, 31, "宋体", 1, 700, 0, 0, 0, "C3", entity.Goods_Name); + // PrintAPI.B_Prn_Text_TrueType(110, 26, 31, "宋体", 1, 700, 0, 0, 0, "C1", entity.AccountingUnit_Name); + // PrintAPI.B_Prn_Text_TrueType(42, 70, 31, "宋体", 1, 700, 0, 0, 0, "C2", "合格证"); + // PrintAPI.B_Prn_Text_TrueType(440, 70, 31, "宋体", 1, 700, 0, 0, 0, "C3", entity.Goods_Name); - PrintAPI.B_Prn_Text_TrueType(42, 120, 27, "宋体", 1, 400, 0, 0, 0, "C4", string.Format("生产日期:{0}", entity.Date.ToString("yyyy/MM/dd"))); - PrintAPI.B_Prn_Text_TrueType(42, 160, 27, "宋体", 1, 400, 0, 0, 0, "C5", string.Format("检 验 员:{0}", entity.Checker)); - PrintAPI.B_Prn_Text_TrueType(42, 200, 27, "宋体", 1, 400, 0, 0, 0, "C6", string.Format("保 质 期:{0}", entity.StoreCondition)); + // PrintAPI.B_Prn_Text_TrueType(42, 120, 27, "宋体", 1, 400, 0, 0, 0, "C4", string.Format("生产日期:{0}", entity.Date.ToString("yyyy/MM/dd"))); + // PrintAPI.B_Prn_Text_TrueType(42, 160, 27, "宋体", 1, 400, 0, 0, 0, "C5", string.Format("检 验 员:{0}", entity.Checker)); + // PrintAPI.B_Prn_Text_TrueType(42, 200, 27, "宋体", 1, 400, 0, 0, 0, "C6", string.Format("保 质 期:{0}", entity.StoreCondition)); - PrintAPI.B_Prn_Text_TrueType(42, 240, 23, "宋体", 1, 400, 0, 0, 0, "C7", string.Format("电话:{0}", entity.TelNumber)); - PrintAPI.B_Prn_Text_TrueType(42, 280, 23, "宋体", 1, 400, 0, 0, 0, "C8", string.Format("产地:{0}", entity.Place)); + // PrintAPI.B_Prn_Text_TrueType(42, 240, 23, "宋体", 1, 400, 0, 0, 0, "C7", string.Format("电话:{0}", entity.TelNumber)); + // PrintAPI.B_Prn_Text_TrueType(42, 280, 23, "宋体", 1, 400, 0, 0, 0, "C8", string.Format("产地:{0}", entity.Place)); - PrintAPI.B_Prn_Barcode(42, 320, 0, "1", 3, 22, 35, 'N', entity.BarCode); - PrintAPI.B_Prn_Text_TrueType(173, 360, 25, "宋体", 1, 500, 0, 0, 0, "C9", entity.BarCode); - PrintAPI.B_Bar2d_QR(430, 105, 2, 6, 'M', 'A', 0, 0, 0, entity._2DQRCode); + // PrintAPI.B_Prn_Barcode(42, 320, 0, "1", 3, 22, 35, 'N', entity.BarCode); + // PrintAPI.B_Prn_Text_TrueType(173, 360, 25, "宋体", 1, 500, 0, 0, 0, "C9", entity.BarCode); + // PrintAPI.B_Bar2d_QR(430, 105, 2, 6, 'M', 'A', 0, 0, 0, entity._2DQRCode); - PrintAPI.B_Set_Direction('B'); - PrintAPI.B_Print_Out(1); - PrintAPI.B_ClosePrn(); + // PrintAPI.B_Set_Direction('B'); + // PrintAPI.B_Print_Out(1); + // PrintAPI.B_ClosePrn(); + //} + + public static void Print(PrintEntity entity) + { + var dic = new Dictionary(); + dic.Add("$Goods_Name",entity.Goods_Name); + dic.Add("$Date", entity.Date.ToString("yyyy/MM/dd")); + BwpClientPrint.BwpClientWebPrint.Create2DPic(entity._2DQRCode, "ImageUrl.png", 120); + dic.Add("$ImageUrl", "ImageUrl.png"); + BwpClientPrint.BwpClientWebPrint.Print("GradeWeightPrint.html", dic); } }