Pārlūkot izejas kodu

添加外箱区分CPN

章政 5 gadi atpakaļ
vecāks
revīzija
980574bbcc

+ 51 - 36
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs

@@ -94,6 +94,7 @@
             this.GetPDdata = new System.Windows.Forms.Button();
             this.Com = new System.IO.Ports.SerialPort(this.components);
             this.groupBoxWithBorder2 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.CloseSerialPort = new System.Windows.Forms.Button();
             this.ConnectCom = new System.Windows.Forms.Button();
             this.ButtonWeigh = new System.Windows.Forms.Button();
             this.Weight = new System.Windows.Forms.Label();
@@ -181,7 +182,7 @@
             this.OutboxCapacity = new System.Windows.Forms.NumericUpDown();
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
-            this.CloseSerialPort = new System.Windows.Forms.Button();
+            this.DiffCPN = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.groupBoxWithBorder2.SuspendLayout();
@@ -767,11 +768,23 @@
             this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder2.Name = "groupBoxWithBorder2";
             this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBoxWithBorder2.Size = new System.Drawing.Size(134, 155);
+            this.groupBoxWithBorder2.Size = new System.Drawing.Size(148, 155);
             this.groupBoxWithBorder2.TabIndex = 113;
             this.groupBoxWithBorder2.TabStop = false;
             this.groupBoxWithBorder2.Text = "称重";
             // 
+            // CloseSerialPort
+            // 
+            this.CloseSerialPort.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CloseSerialPort.Location = new System.Drawing.Point(74, 123);
+            this.CloseSerialPort.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.CloseSerialPort.Name = "CloseSerialPort";
+            this.CloseSerialPort.Size = new System.Drawing.Size(55, 26);
+            this.CloseSerialPort.TabIndex = 115;
+            this.CloseSerialPort.Text = "关闭";
+            this.CloseSerialPort.UseVisualStyleBackColor = true;
+            this.CloseSerialPort.Click += new System.EventHandler(this.CloseSerialPort_Click);
+            // 
             // ConnectCom
             // 
             this.ConnectCom.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -801,7 +814,7 @@
             this.Weight.AutoSize = true;
             this.Weight.Font = new System.Drawing.Font("微软雅黑", 30F);
             this.Weight.ForeColor = System.Drawing.Color.Red;
-            this.Weight.Location = new System.Drawing.Point(8, 33);
+            this.Weight.Location = new System.Drawing.Point(7, 32);
             this.Weight.Name = "Weight";
             this.Weight.Size = new System.Drawing.Size(0, 52);
             this.Weight.TabIndex = 113;
@@ -1036,7 +1049,7 @@
             // 
             this.label18.AutoSize = true;
             this.label18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label18.Location = new System.Drawing.Point(67, 125);
+            this.label18.Location = new System.Drawing.Point(66, 124);
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(13, 17);
             this.label18.TabIndex = 90;
@@ -1070,7 +1083,7 @@
             // 
             this.label16.AutoSize = true;
             this.label16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label16.Location = new System.Drawing.Point(65, 61);
+            this.label16.Location = new System.Drawing.Point(64, 60);
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(13, 17);
             this.label16.TabIndex = 87;
@@ -1104,7 +1117,7 @@
             // 
             this.label12.AutoSize = true;
             this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label12.Location = new System.Drawing.Point(9, 91);
+            this.label12.Location = new System.Drawing.Point(8, 90);
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(56, 17);
             this.label12.TabIndex = 77;
@@ -1114,7 +1127,7 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(7, 29);
+            this.label7.Location = new System.Drawing.Point(6, 28);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(56, 17);
             this.label7.TabIndex = 76;
@@ -1169,7 +1182,7 @@
             this.LabelInf.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.LabelInf.Name = "LabelInf";
             this.LabelInf.RowTemplate.Height = 23;
-            this.LabelInf.Size = new System.Drawing.Size(1258, 346);
+            this.LabelInf.Size = new System.Drawing.Size(1272, 346);
             this.LabelInf.TabIndex = 27;
             this.LabelInf.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelInf_CellClick);
             this.LabelInf.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelInf_DataError);
@@ -1421,7 +1434,7 @@
             // 
             this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelPrint.Location = new System.Drawing.Point(55, 177);
+            this.SingleLabelPrint.Location = new System.Drawing.Point(26, 176);
             this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabelPrint.Name = "SingleLabelPrint";
             this.SingleLabelPrint.Size = new System.Drawing.Size(68, 26);
@@ -1436,7 +1449,7 @@
             this.SingleLabelAutoPrint.Checked = true;
             this.SingleLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.SingleLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(13, 97);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(12, 96);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -1483,7 +1496,7 @@
             this.CurrentRowOnly.Checked = true;
             this.CurrentRowOnly.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CurrentRowOnly.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CurrentRowOnly.Location = new System.Drawing.Point(85, 98);
+            this.CurrentRowOnly.Location = new System.Drawing.Point(84, 97);
             this.CurrentRowOnly.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.CurrentRowOnly.Name = "CurrentRowOnly";
             this.CurrentRowOnly.Size = new System.Drawing.Size(87, 21);
@@ -1509,7 +1522,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(9, 125);
+            this.label2.Location = new System.Drawing.Point(8, 124);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(32, 17);
             this.label2.TabIndex = 92;
@@ -1532,7 +1545,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(9, 157);
+            this.label5.Location = new System.Drawing.Point(8, 156);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(32, 17);
             this.label5.TabIndex = 50;
@@ -1565,7 +1578,7 @@
             this.MidLabelAutoPrint.Checked = true;
             this.MidLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.MidLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabelAutoPrint.Location = new System.Drawing.Point(7, 97);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(6, 96);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -1587,6 +1600,7 @@
             // 
             // OutBoxLabel
             // 
+            this.OutBoxLabel.Controls.Add(this.DiffCPN);
             this.OutBoxLabel.Controls.Add(this.BoxCount);
             this.OutBoxLabel.Controls.Add(this.DiffLotNo);
             this.OutBoxLabel.Controls.Add(this.DiffDC);
@@ -1606,7 +1620,7 @@
             this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(2);
             this.OutBoxLabel.Name = "OutBoxLabel";
             this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(2);
-            this.OutBoxLabel.Size = new System.Drawing.Size(188, 211);
+            this.OutBoxLabel.Size = new System.Drawing.Size(202, 211);
             this.OutBoxLabel.TabIndex = 79;
             this.OutBoxLabel.TabStop = false;
             this.OutBoxLabel.Text = "外箱标签";
@@ -1615,7 +1629,7 @@
             // 
             this.BoxCount.AutoSize = true;
             this.BoxCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BoxCount.Location = new System.Drawing.Point(8, 183);
+            this.BoxCount.Location = new System.Drawing.Point(7, 182);
             this.BoxCount.Name = "BoxCount";
             this.BoxCount.Size = new System.Drawing.Size(0, 17);
             this.BoxCount.TabIndex = 97;
@@ -1624,7 +1638,7 @@
             // 
             this.DiffLotNo.AutoSize = true;
             this.DiffLotNo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.DiffLotNo.Location = new System.Drawing.Point(117, 149);
+            this.DiffLotNo.Location = new System.Drawing.Point(125, 148);
             this.DiffLotNo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.DiffLotNo.Name = "DiffLotNo";
             this.DiffLotNo.Size = new System.Drawing.Size(67, 21);
@@ -1636,7 +1650,7 @@
             // 
             this.DiffDC.AutoSize = true;
             this.DiffDC.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.DiffDC.Location = new System.Drawing.Point(117, 122);
+            this.DiffDC.Location = new System.Drawing.Point(125, 121);
             this.DiffDC.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.DiffDC.Name = "DiffDC";
             this.DiffDC.Size = new System.Drawing.Size(68, 21);
@@ -1648,7 +1662,7 @@
             // 
             this.OnlyOneRow.AutoSize = true;
             this.OnlyOneRow.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OnlyOneRow.Location = new System.Drawing.Point(117, 97);
+            this.OnlyOneRow.Location = new System.Drawing.Point(125, 96);
             this.OnlyOneRow.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OnlyOneRow.Name = "OnlyOneRow";
             this.OnlyOneRow.Size = new System.Drawing.Size(63, 21);
@@ -1660,7 +1674,7 @@
             // 
             this.AllLabel.AutoSize = true;
             this.AllLabel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AllLabel.Location = new System.Drawing.Point(11, 97);
+            this.AllLabel.Location = new System.Drawing.Point(10, 96);
             this.AllLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.AllLabel.Name = "AllLabel";
             this.AllLabel.Size = new System.Drawing.Size(99, 21);
@@ -1671,7 +1685,7 @@
             // AddNewOutBox
             // 
             this.AddNewOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AddNewOutBox.Location = new System.Drawing.Point(61, 178);
+            this.AddNewOutBox.Location = new System.Drawing.Point(3, 178);
             this.AddNewOutBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.AddNewOutBox.Name = "AddNewOutBox";
             this.AddNewOutBox.Size = new System.Drawing.Size(51, 26);
@@ -1683,7 +1697,7 @@
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(115, 9);
+            this.LogingOut.Location = new System.Drawing.Point(114, 8);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(42, 21);
             this.LogingOut.TabIndex = 77;
@@ -1710,7 +1724,7 @@
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(17, 154);
+            this.label10.Location = new System.Drawing.Point(16, 153);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(32, 17);
             this.label10.TabIndex = 90;
@@ -1720,7 +1734,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(17, 125);
+            this.label6.Location = new System.Drawing.Point(16, 124);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(32, 17);
             this.label6.TabIndex = 87;
@@ -1753,7 +1767,7 @@
             // OutBoxLabelPrint
             // 
             this.OutBoxLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLabelPrint.Location = new System.Drawing.Point(118, 178);
+            this.OutBoxLabelPrint.Location = new System.Drawing.Point(57, 178);
             this.OutBoxLabelPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OutBoxLabelPrint.Name = "OutBoxLabelPrint";
             this.OutBoxLabelPrint.Size = new System.Drawing.Size(67, 26);
@@ -1774,24 +1788,24 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
-            // CloseSerialPort
+            // DiffCPN
             // 
-            this.CloseSerialPort.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CloseSerialPort.Location = new System.Drawing.Point(74, 123);
-            this.CloseSerialPort.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.CloseSerialPort.Name = "CloseSerialPort";
-            this.CloseSerialPort.Size = new System.Drawing.Size(55, 26);
-            this.CloseSerialPort.TabIndex = 115;
-            this.CloseSerialPort.Text = "关闭";
-            this.CloseSerialPort.UseVisualStyleBackColor = true;
-            this.CloseSerialPort.Click += new System.EventHandler(this.CloseSerialPort_Click);
+            this.DiffCPN.AutoSize = true;
+            this.DiffCPN.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.DiffCPN.Location = new System.Drawing.Point(125, 177);
+            this.DiffCPN.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.DiffCPN.Name = "DiffCPN";
+            this.DiffCPN.Size = new System.Drawing.Size(76, 21);
+            this.DiffCPN.TabIndex = 98;
+            this.DiffCPN.Text = "区分CPN";
+            this.DiffCPN.UseVisualStyleBackColor = true;
             // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(233)))), ((int)(((byte)(206)))));
-            this.ClientSize = new System.Drawing.Size(1261, 731);
+            this.ClientSize = new System.Drawing.Size(1275, 731);
             this.Controls.Add(this.groupBoxWithBorder2);
             this.Controls.Add(this.GetPDdata);
             this.Controls.Add(this.Reset);
@@ -2016,5 +2030,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec1;
         private System.Windows.Forms.Label BoxCount;
         private System.Windows.Forms.Button CloseSerialPort;
+        private System.Windows.Forms.CheckBox DiffCPN;
     }
 }

+ 1 - 1
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -1939,7 +1939,7 @@ namespace UAS_LabelMachine
                             string BDC = LabelInf.Rows[i + 1].Cells["pib_datecode"].Value.ToString();
                             string BLOTNO = LabelInf.Rows[i + 1].Cells["pib_lotno"].Value.ToString();
                             string BPDCustProdCode = LabelInf.Rows[i + 1].Cells["pd_custprodcode"].Value.ToString();
-                            if (FPDCustProdCode != BPDCustProdCode || FPrcode != BPrcode || FPocode != BPocode || FWhcode != BWhcode || (DiffDC.Checked && FDC != BDC) || (DiffLotNo.Checked && FLOTNO != BLOTNO))
+                            if ((DiffCPN.Checked && FPDCustProdCode != BPDCustProdCode) || FPrcode != BPrcode || FPocode != BPocode || FWhcode != BWhcode || (DiffDC.Checked && FDC != BDC) || (DiffLotNo.Checked && FLOTNO != BLOTNO))
                             {
                                 MaxNum = MaxNum + 1;
                             }