Browse Source

添加打印角度控制

callm 4 years ago
parent
commit
f9e209c2a0

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

@@ -11,7 +11,7 @@ namespace UAS_LabelMachine
     public class DataHelper
     {
         //泽天外网地址
-        private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=ZT_TEST;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=183.47.41.2)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=ZT;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=183.47.41.2)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
         //泽天ERP地址
         public static readonly string ERPAddesss = "http://183.47.41.2:8099/ERP/";
         //泽天FTP外网

+ 9 - 0
UAS-出货标签管理(泽天)/UAS-出货标签管理(泽天).csproj

@@ -323,6 +323,12 @@
     <Compile Include="采集策略.Designer.cs">
       <DependentUpon>采集策略.cs</DependentUpon>
     </Compile>
+    <Compile Include="贴标角度设置.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="贴标角度设置.Designer.cs">
+      <DependentUpon>贴标角度设置.cs</DependentUpon>
+    </Compile>
     <Compile Include="附件内容打印.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -399,6 +405,9 @@
     <EmbeddedResource Include="采集策略.resx">
       <DependentUpon>采集策略.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="贴标角度设置.resx">
+      <DependentUpon>贴标角度设置.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="附件内容打印.resx">
       <DependentUpon>附件内容打印.cs</DependentUpon>
     </EmbeddedResource>

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

@@ -127,6 +127,7 @@
             this.pd_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pjd_zxbzs_user = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_spec1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.checknum = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.groupBoxWithBorder1 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.ResetHBXH = new System.Windows.Forms.Button();
             this.label18 = new System.Windows.Forms.Label();
@@ -201,6 +202,7 @@
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
             this.MenuManage = new System.Windows.Forms.Button();
             this.Connect = new System.Windows.Forms.Button();
+            this.贴标角度设置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.ShowMenu_Total.SuspendLayout();
@@ -594,7 +596,7 @@
             // pictureBox1
             // 
             this.pictureBox1.Image = global::UAS_LabelMachine.Properties.Resources.Status;
-            this.pictureBox1.Location = new System.Drawing.Point(896, 201);
+            this.pictureBox1.Location = new System.Drawing.Point(896, 200);
             this.pictureBox1.Margin = new System.Windows.Forms.Padding(6);
             this.pictureBox1.Name = "pictureBox1";
             this.pictureBox1.Size = new System.Drawing.Size(244, 128);
@@ -672,7 +674,7 @@
             // 
             this.CustomerLabel.Enabled = false;
             this.CustomerLabel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CustomerLabel.Location = new System.Drawing.Point(279, 106);
+            this.CustomerLabel.Location = new System.Drawing.Point(280, 106);
             this.CustomerLabel.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.CustomerLabel.Name = "CustomerLabel";
             this.CustomerLabel.Size = new System.Drawing.Size(168, 52);
@@ -754,7 +756,7 @@
             // Reset
             // 
             this.Reset.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Reset.Location = new System.Drawing.Point(279, 106);
+            this.Reset.Location = new System.Drawing.Point(280, 106);
             this.Reset.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.Reset.Name = "Reset";
             this.Reset.Size = new System.Drawing.Size(128, 52);
@@ -767,7 +769,7 @@
             // GetPDdata
             // 
             this.GetPDdata.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.GetPDdata.Location = new System.Drawing.Point(259, 108);
+            this.GetPDdata.Location = new System.Drawing.Point(260, 108);
             this.GetPDdata.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.GetPDdata.Name = "GetPDdata";
             this.GetPDdata.Size = new System.Drawing.Size(186, 52);
@@ -788,7 +790,7 @@
             // 
             this.label11.AutoSize = true;
             this.label11.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label11.Location = new System.Drawing.Point(850, 339);
+            this.label11.Location = new System.Drawing.Point(850, 340);
             this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label11.Name = "label11";
             this.label11.Size = new System.Drawing.Size(127, 36);
@@ -817,9 +819,10 @@
             this.标签自定义ToolStripMenuItem,
             this.重置单据ToolStripMenuItem,
             this.同步出货数据ToolStripMenuItem,
-            this.贴标机参数设置ToolStripMenuItem});
+            this.贴标机参数设置ToolStripMenuItem,
+            this.贴标角度设置ToolStripMenuItem});
             this.ShowMenu_Total.Name = "ShowMenu";
-            this.ShowMenu_Total.Size = new System.Drawing.Size(257, 328);
+            this.ShowMenu_Total.Size = new System.Drawing.Size(257, 408);
             this.ShowMenu_Total.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ShowMenu_Total_ItemClicked);
             // 
             // 清除明细ToolStripMenuItem
@@ -932,7 +935,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(18, 66);
+            this.Weight.Location = new System.Drawing.Point(21, 69);
             this.Weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.Weight.Name = "Weight";
             this.Weight.Size = new System.Drawing.Size(0, 104);
@@ -972,7 +975,8 @@
             this.pr_unit,
             this.pd_brand,
             this.pjd_zxbzs_user,
-            this.pr_spec1});
+            this.pr_spec1,
+            this.checknum});
             dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
             dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
             dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1133,6 +1137,12 @@
             this.pr_spec1.Name = "pr_spec1";
             this.pr_spec1.Width = 250;
             // 
+            // checknum
+            // 
+            this.checknum.DataPropertyName = "checknum";
+            this.checknum.HeaderText = "复核数量";
+            this.checknum.Name = "checknum";
+            // 
             // groupBoxWithBorder1
             // 
             this.groupBoxWithBorder1.Controls.Add(this.ResetHBXH);
@@ -1171,7 +1181,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(134, 250);
+            this.label18.Location = new System.Drawing.Point(137, 253);
             this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(24, 31);
@@ -1206,7 +1216,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(130, 122);
+            this.label16.Location = new System.Drawing.Point(133, 125);
             this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(24, 31);
@@ -1241,7 +1251,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(18, 182);
+            this.label12.Location = new System.Drawing.Point(21, 185);
             this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(110, 31);
@@ -1252,7 +1262,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(14, 58);
+            this.label7.Location = new System.Drawing.Point(17, 61);
             this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(110, 31);
@@ -1582,7 +1592,7 @@
             this.SingleLabel.Controls.Add(this.SingleLabelAutoPrint);
             this.SingleLabel.Controls.Add(this.SingleLabelCombox);
             this.SingleLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabel.Location = new System.Drawing.Point(1437, 12);
+            this.SingleLabel.Location = new System.Drawing.Point(1436, 12);
             this.SingleLabel.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.SingleLabel.Name = "SingleLabel";
             this.SingleLabel.Padding = new System.Windows.Forms.Padding(4);
@@ -1604,7 +1614,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(538, 357);
+            this.SingleLabelPrint.Location = new System.Drawing.Point(799, 359);
             this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.SingleLabelPrint.Name = "SingleLabelPrint";
             this.SingleLabelPrint.Size = new System.Drawing.Size(136, 52);
@@ -1619,7 +1629,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(26, 194);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(29, 197);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(142, 35);
@@ -1651,11 +1661,11 @@
             this.MidLabel.Controls.Add(this.MidLabelAutoPrint);
             this.MidLabel.Controls.Add(this.MidLabelCombox);
             this.MidLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabel.Location = new System.Drawing.Point(1785, 12);
+            this.MidLabel.Location = new System.Drawing.Point(1784, 12);
             this.MidLabel.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.MidLabel.Name = "MidLabel";
             this.MidLabel.Padding = new System.Windows.Forms.Padding(4);
-            this.MidLabel.Size = new System.Drawing.Size(339, 422);
+            this.MidLabel.Size = new System.Drawing.Size(340, 422);
             this.MidLabel.TabIndex = 78;
             this.MidLabel.TabStop = false;
             this.MidLabel.Text = "中盒标签";
@@ -1666,7 +1676,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(170, 198);
+            this.CurrentRowOnly.Location = new System.Drawing.Point(173, 201);
             this.CurrentRowOnly.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.CurrentRowOnly.Name = "CurrentRowOnly";
             this.CurrentRowOnly.Size = new System.Drawing.Size(166, 35);
@@ -1692,7 +1702,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(18, 250);
+            this.label2.Location = new System.Drawing.Point(21, 253);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(62, 31);
@@ -1716,7 +1726,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(18, 314);
+            this.label5.Location = new System.Drawing.Point(21, 317);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(62, 31);
@@ -1750,7 +1760,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(14, 194);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(17, 197);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(142, 35);
@@ -1793,7 +1803,7 @@
             this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(4);
             this.OutBoxLabel.Name = "OutBoxLabel";
             this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(4);
-            this.OutBoxLabel.Size = new System.Drawing.Size(381, 422);
+            this.OutBoxLabel.Size = new System.Drawing.Size(380, 422);
             this.OutBoxLabel.TabIndex = 79;
             this.OutBoxLabel.TabStop = false;
             this.OutBoxLabel.Text = "外箱标签";
@@ -1802,7 +1812,7 @@
             // 
             this.DiffDetno.AutoSize = true;
             this.DiffDetno.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffDetno.Location = new System.Drawing.Point(254, 382);
+            this.DiffDetno.Location = new System.Drawing.Point(257, 385);
             this.DiffDetno.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffDetno.Name = "DiffDetno";
             this.DiffDetno.Size = new System.Drawing.Size(133, 34);
@@ -1814,7 +1824,7 @@
             // 
             this.DiffCPN.AutoSize = true;
             this.DiffCPN.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffCPN.Location = new System.Drawing.Point(254, 338);
+            this.DiffCPN.Location = new System.Drawing.Point(257, 341);
             this.DiffCPN.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffCPN.Name = "DiffCPN";
             this.DiffCPN.Size = new System.Drawing.Size(135, 34);
@@ -1826,7 +1836,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(266, 378);
+            this.BoxCount.Location = new System.Drawing.Point(269, 381);
             this.BoxCount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.BoxCount.Name = "BoxCount";
             this.BoxCount.Size = new System.Drawing.Size(0, 31);
@@ -1836,7 +1846,7 @@
             // 
             this.DiffLotNo.AutoSize = true;
             this.DiffLotNo.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffLotNo.Location = new System.Drawing.Point(254, 290);
+            this.DiffLotNo.Location = new System.Drawing.Point(257, 293);
             this.DiffLotNo.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffLotNo.Name = "DiffLotNo";
             this.DiffLotNo.Size = new System.Drawing.Size(118, 34);
@@ -1848,7 +1858,7 @@
             // 
             this.DiffDC.AutoSize = true;
             this.DiffDC.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffDC.Location = new System.Drawing.Point(254, 238);
+            this.DiffDC.Location = new System.Drawing.Point(257, 241);
             this.DiffDC.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffDC.Name = "DiffDC";
             this.DiffDC.Size = new System.Drawing.Size(121, 34);
@@ -1860,7 +1870,7 @@
             // 
             this.OnlyOneRow.AutoSize = true;
             this.OnlyOneRow.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.OnlyOneRow.Location = new System.Drawing.Point(254, 190);
+            this.OnlyOneRow.Location = new System.Drawing.Point(257, 193);
             this.OnlyOneRow.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.OnlyOneRow.Name = "OnlyOneRow";
             this.OnlyOneRow.Size = new System.Drawing.Size(111, 34);
@@ -1872,7 +1882,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(22, 194);
+            this.AllLabel.Location = new System.Drawing.Point(25, 197);
             this.AllLabel.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AllLabel.Name = "AllLabel";
             this.AllLabel.Size = new System.Drawing.Size(190, 35);
@@ -1895,7 +1905,7 @@
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(230, 18);
+            this.LogingOut.Location = new System.Drawing.Point(233, 21);
             this.LogingOut.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(82, 41);
@@ -1923,7 +1933,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(34, 310);
+            this.label10.Location = new System.Drawing.Point(37, 313);
             this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(62, 31);
@@ -1934,7 +1944,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(34, 250);
+            this.label6.Location = new System.Drawing.Point(37, 253);
             this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(62, 31);
@@ -1947,7 +1957,7 @@
             this.OutBoxPrinter.Location = new System.Drawing.Point(14, 126);
             this.OutBoxPrinter.Margin = new System.Windows.Forms.Padding(10, 12, 10, 12);
             this.OutBoxPrinter.Name = "OutBoxPrinter";
-            this.OutBoxPrinter.Size = new System.Drawing.Size(351, 50);
+            this.OutBoxPrinter.Size = new System.Drawing.Size(352, 50);
             this.OutBoxPrinter.TabIndex = 82;
             // 
             // OutboxCapacity
@@ -2013,12 +2023,18 @@
             this.Connect.UseVisualStyleBackColor = true;
             this.Connect.Click += new System.EventHandler(this.Connect_Click);
             // 
+            // 贴标角度设置ToolStripMenuItem
+            // 
+            this.贴标角度设置ToolStripMenuItem.Name = "贴标角度设置ToolStripMenuItem";
+            this.贴标角度设置ToolStripMenuItem.Size = new System.Drawing.Size(256, 36);
+            this.贴标角度设置ToolStripMenuItem.Text = "贴标角度设置";
+            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             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(2548, 1464);
+            this.ClientSize = new System.Drawing.Size(1924, 1062);
             this.Controls.Add(this.Connect);
             this.Controls.Add(this.MenuManage);
             this.Controls.Add(this.pib_indate);
@@ -2205,22 +2221,6 @@
         private System.IO.Ports.SerialPort Com;
         private System.Windows.Forms.Button ConnectCom;
         private System.Windows.Forms.CheckBox CurrentRowOnly;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_pdno;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_piid;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_inoutno;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_whcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pjd_id;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_custprodcode1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_pocode1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_prodcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn CollectedNum;
-        private System.Windows.Forms.DataGridViewTextBoxColumn UnCollectedNum;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_outqty;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pr_unit;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_brand;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pjd_zxbzs_user;
-        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;
@@ -2265,5 +2265,23 @@
         private System.Windows.Forms.Button MenuManage;
         private System.Windows.Forms.ToolStripMenuItem 贴标机参数设置ToolStripMenuItem;
         private System.Windows.Forms.Button Connect;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_pdno;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_piid;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_inoutno;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_whcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pjd_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_custprodcode1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_pocode1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_prodcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn CollectedNum;
+        private System.Windows.Forms.DataGridViewTextBoxColumn UnCollectedNum;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_outqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_unit;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_brand;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pjd_zxbzs_user;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn checknum;
+        private System.Windows.Forms.ToolStripMenuItem 贴标角度设置ToolStripMenuItem;
     }
 }

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

@@ -105,6 +105,12 @@ namespace UAS_LabelMachine
 
         DataTable Attach;
 
+        string Angle = "";
+
+        string X = "";
+
+        string Y = "";
+
         public UAS_出货标签打印(string Master)
         {
             this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);
@@ -197,12 +203,12 @@ namespace UAS_LabelMachine
             form.FormClosed += LabelFormClose;
             form.ShowDialog();
         }
-
+        int combined = 0;
         private void LabelFormClose(object sender, EventArgs e)
         {
             GetInOutInfAndLabelFile();
         }
-
+        int PassTenCount = 1;
         //输入框Enter事件
         private void Input_KeyDown(object sender, KeyEventArgs e)
         {
@@ -236,7 +242,7 @@ namespace UAS_LabelMachine
                 MessageBox.Show("数据格式错误,无法解析", "提示");
                 if (ConnectToMachine)
                 {
-                    receiveClient.Client.Send(Encoding.ASCII.GetBytes("NG"));
+                    receiveClient.Client.Send(Encoding.ASCII.GetBytes("ReadId1|,|NG|,|Y"));
                 }
                 Input.SelectAll();
                 return;
@@ -309,8 +315,6 @@ namespace UAS_LabelMachine
                     MessageBox.Show("请检查最小包装数");
                 }
                 //如果单位是KPCS则必须是1000的整数倍
-                Console.WriteLine(Convert.ToDouble((double.Parse(Data["QTY"]) / 1000).ToString("0.000")));
-                Console.WriteLine(Convert.ToDouble(double.Parse(CurrentZXBZ).ToString("0.000")));
                 if (int.Parse((Convert.ToDouble((double.Parse(Data["QTY"]) / 1000).ToString("0.000")) / Convert.ToDouble(double.Parse(CurrentZXBZ).ToString("0.000"))).ToString()) % 1 != 0)
                 {
                     MessageBox.Show("物料" + Data["PRCODE"] + "采集数量无法按照最小包装数拆分", "提示");
@@ -371,8 +375,6 @@ namespace UAS_LabelMachine
             //计算当前采集数量
             string collectqty = dh.getFieldDataByCondition("prodiobarcode", "sum(pib_qty)", "pib_inoutno='" + pi_inoutno.Text + "' and pib_prodcode='" + CurrentPrCode + "' and pib_pdno='" + CurrentPDNO + "'").ToString();
             double CollectQty = (collectqty == "" ? 0 : double.Parse(collectqty));
-            Console.WriteLine(CollectQty + CollectNum);
-            Console.WriteLine(CurrentPrCount);
             if (Convert.ToDouble((CollectQty + CollectNum).ToString("0.000")) > Convert.ToDouble(double.Parse(CurrentPrCount).ToString("0.000")))
             {
                 MessageBox.Show("物料" + Data["PRCODE"] + "采集后数量为" + (CollectQty + CollectNum) + ",【超出】本行出货数量" + CurrentPrCount, "提示");
@@ -417,7 +419,6 @@ namespace UAS_LabelMachine
             }
             catch (Exception e)
             {
-                Console.WriteLine(e.Message + e.StackTrace);
                 if (ReSetType != " ")
                 {
                     dh.UpdateByCondition("RULEMAXNUM", "rmn_maxnumber='" + (MaxNum + 1) + "'", "rmn_nrcode='" + (NrCode == "" ? "Default" : NrCode) + "' and nvl(rmn_type,' ')='" + ReSetType + "'");
@@ -439,17 +440,17 @@ namespace UAS_LabelMachine
             {
                 LabelInf.Rows[LabelInf.Rows.Count - 1].Selected = true;
             }
-            if (SingleLabelAutoPrint.Checked)
-            {
-                //thread = new Thread(AutoPrintSingleLabel);
-                //stw = new SetLoadingWindow(thread, "正在打印单盘标签");
-                //BaseUtil.SetFormCenter(stw);
-                //stw.ShowDialog();
-            }
+            //if (SingleLabelAutoPrint.Checked)
+            //{
+            //    thread = new Thread(AutoPrintSingleLabel);
+            //    stw = new SetLoadingWindow(thread, "正在打印单盘标签");
+            //    BaseUtil.SetFormCenter(stw);
+            //    stw.ShowDialog();
+            //}
             //采集后重新计数,自动跳到下一行
             collectqty = (SumQty.Compute("sum(pib_qty)", "pib_prodcode='" + CurrentPrCode + "' and pib_pdno='" + CurrentPDNO + "'").ToString());
             CollectQty = (collectqty == "" ? 0 : double.Parse(collectqty));
-            int combined = 0;
+
             if (Combindetail.Checked)
                 combined = 1;
             if (CombindetailTwo.Checked)
@@ -471,9 +472,11 @@ namespace UAS_LabelMachine
             {
                 dh.UpdateByCondition("prodinout", "pi_user_packingstatus='Packed'", "pi_inoutno='" + pi_inoutno.Text + "'");
             }
+            receiveClient.Client.Send(Encoding.ASCII.GetBytes("ReadId1|,|OK|,|Y"));
             //采集达到了数量进行换行
             if (CollectQty == double.Parse(CurrentPrCount))
             {
+                //需要换行,当前最后一盒
                 DataGridViewSelectedRowCollection selectrow = GridPrcode.SelectedRows;
                 if (selectrow.Count > 0)
                 {
@@ -649,7 +652,13 @@ namespace UAS_LabelMachine
                     {
                         CustomerLabel.Enabled = true;
                     }
-
+                    DataTable XY = (DataTable)dh.ExecuteSql("select * from PRINTXY where px_custcode='" + pi_cardcode.Text + "'", "select");
+                    if (XY.Rows.Count > 0)
+                    {
+                        Angle = XY.Rows[0]["px_angle"].ToString();
+                        X = XY.Rows[0]["px_x"].ToString();
+                        Y = XY.Rows[0]["px_y"].ToString();
+                    }
                     OutBoxNum_Click(new object(), new EventArgs());
                     LoadPrcodeData();
                     //获取条码规则
@@ -1434,7 +1443,7 @@ namespace UAS_LabelMachine
         {
             if (pi_cardcode.Text != "")
             {
-                附件内容打印 att = new 附件内容打印(pi_cardcode.Text);
+                贴标角度设置 att = new 贴标角度设置(pi_cardcode.Text);
                 att.ShowDialog();
             }
             else MessageBox.Show("请先获取出库单信息", "提示");
@@ -1465,7 +1474,7 @@ namespace UAS_LabelMachine
         DataTable CSPrcode;
         private void LoadPrcodeData()
         {
-            DataTable Prcode = (DataTable)dh.ExecuteSql("select '' pd_piid,pd_inoutno,pd_custprodcode,pd_pocode,pd_whcode,pd_prodcode,'0' CollectedNum,'0' UnCollectedNum,pd_outqty,pr_unit,pd_brand,pjd_zxbzs_user,pjd_id,pd_pdno,pr_spec from prodiodetail left join prodinout on pi_id=pd_piid left join PRODJOINVENDDETAIL on pjd_brand =pd_brand and pjd_prodcode=pd_prodcode left join product on pd_prodcode=pr_code where pi_id='" + PI_ID + "' order by pd_pdno", "select");
+            DataTable Prcode = (DataTable)dh.ExecuteSql("select '' pd_piid,pd_inoutno,pd_custprodcode,pd_pocode,pd_whcode,pd_prodcode,'0' CollectedNum,'0' UnCollectedNum,pd_outqty,pr_unit,pd_brand,pjd_zxbzs_user,pjd_id,pd_pdno,pr_spec,0 checknum from prodiodetail left join prodinout on pi_id=pd_piid left join PRODJOINVENDDETAIL on pjd_brand =pd_brand and pjd_prodcode=pd_prodcode left join product on pd_prodcode=pr_code where pi_id='" + PI_ID + "' order by pd_pdno", "select");
             GridPrcode.DataSource = Prcode;
             List<int> RemoveIndex = new List<int>();
             double CollectNum = 0;
@@ -1477,7 +1486,7 @@ namespace UAS_LabelMachine
                 combined = 2;
             if (Combindetail.Checked || CombindetailTwo.Checked)
             {
-                CSPrcode = (DataTable)dh.ExecuteSql("select pd_piid,pd_pdno,pd_custprodcode,pd_whcode,pd_prodcode,CollectedNum,UnCollectedNum,pd_outqty,pr_unit,pr_spec,pd_brand,pjd_zxbzs_user,pjd_id,pd_inoutno,pd_pocode from CS$InoutPrcode where pd_inoutno='" + pi_inoutno.Text + "' and combined=" + combined + " order by  pd_pdno", "select");
+                CSPrcode = (DataTable)dh.ExecuteSql("select pd_piid,pd_pdno,pd_custprodcode,pd_whcode,pd_prodcode,CollectedNum,UnCollectedNum,pd_outqty,pr_unit,pr_spec,pd_brand,pjd_zxbzs_user,pjd_id,pd_inoutno,pd_pocode,nvl(checknum,0)checknum from CS$InoutPrcode where pd_inoutno='" + pi_inoutno.Text + "' and combined=" + combined + " order by  pd_pdno", "select");
                 if (CSPrcode.Rows.Count == 0)
                 {
                     int CurrentIndex = 0;
@@ -1528,7 +1537,7 @@ namespace UAS_LabelMachine
             }
             else
             {
-                CSPrcode = (DataTable)dh.ExecuteSql("select pd_piid,pd_pdno,pd_custprodcode,pd_whcode,pd_prodcode,CollectedNum,UnCollectedNum,pd_outqty,pr_unit,pr_spec,pd_brand,pjd_zxbzs_user,pjd_id,pd_inoutno,pd_pocode from CS$InoutPrcode where pd_inoutno='" + pi_inoutno.Text + "' and combined=" + combined + " order by pd_pdno", "select");
+                CSPrcode = (DataTable)dh.ExecuteSql("select pd_piid,pd_pdno,pd_custprodcode,pd_whcode,pd_prodcode,CollectedNum,UnCollectedNum,pd_outqty,pr_unit,pr_spec,pd_brand,pjd_zxbzs_user,pjd_id,pd_inoutno,pd_pocode,nvl(checknum,0)checknum from CS$InoutPrcode where pd_inoutno='" + pi_inoutno.Text + "' and combined=" + combined + " order by pd_pdno", "select");
                 if (CSPrcode.Rows.Count == 0)
                 {
                     for (int i = 0; i < GridPrcode.Rows.Count; i++)
@@ -2306,6 +2315,11 @@ namespace UAS_LabelMachine
                     BaseUtil.SetFormCenter(ms);
                     ms.ShowDialog();
                     break;
+                case "贴标角度设置":
+                    贴标角度设置 ms1 = new 贴标角度设置(pi_cardcode.Text);
+                    BaseUtil.SetFormCenter(ms1);
+                    ms1.ShowDialog();
+                    break;
             }
         }
 
@@ -2321,9 +2335,18 @@ namespace UAS_LabelMachine
         TcpClient sendClient;
         //复核数据客户端
         TcpClient resetClient;
+
         NetworkStream ns;
+
+        NetworkStream ns1;
+
         Thread receiveThread;
 
+        Thread sendThread;
+
+        int dataindex = 0;
+        string ps_split = "";
+
         private void Connect_Click(object sender, EventArgs e)
         {
             receiveClient = new TcpClient();
@@ -2338,16 +2361,24 @@ namespace UAS_LabelMachine
                     receiveClient.Connect(dt.Rows[0]["ps_ip"].ToString(), int.Parse(dt.Rows[0]["ps_receiveport"].ToString()));
                     sendClient.Connect(dt.Rows[0]["ps_ip"].ToString(), int.Parse(dt.Rows[0]["ps_sendport"].ToString()));
                     resetClient.Connect(dt.Rows[0]["ps_ip"].ToString(), int.Parse(dt.Rows[0]["ps_resetport"].ToString()));
+
+                    dataindex = int.Parse(dt.Rows[0]["ps_dataindex"].ToString());
+                    ps_split = dt.Rows[0]["ps_split"].ToString();
                     if (receiveClient != null)
                     {
                         MessageBox.Show("连接服务器成功");
                         ConnectToMachine = true;
                         //获得绑定的网络数据流  
                         ns = receiveClient.GetStream();
+
+                        ns1 = sendClient.GetStream();
                         Control.CheckForIllegalCrossThreadCalls = false;
                         //实例化并启动接受消息线程  
                         receiveThread = new Thread(receive_message);
                         receiveThread.Start();
+
+                        sendThread = new Thread(send_message);
+                        sendThread.Start();
                     }
                     else
                     {
@@ -2373,10 +2404,103 @@ namespace UAS_LabelMachine
                     ns.Read(getData, 0, getData.Length);
                     //将字节数组转换成文本形式  
                     string getMsg = Encoding.Default.GetString(getData);
-                    string msgStr = getMsg.Trim('\0');
-                    Console.WriteLine(msgStr);
-                    Input.Text = msgStr;
-                    Input_KeyDown(Input, new KeyEventArgs(Keys.Enter));
+                    if (getMsg.Contains("ReadId"))
+                    {
+                        string msgStr = getMsg.Trim('\0').Replace("ReadId1|,|", @"[A-Za-z0-9]+\*[A-Za-z0-9]+\*[A-Za-z0-9]+\*[A-Za-z0-9]+\*[A-Za-z0-9]+");
+                        msgStr = Regex.Match(msgStr, "").Value;
+                        Console.WriteLine(msgStr);
+                        //设置索引和内容
+                        // msgStr = msgStr.Split(ps_split.ToCharArray()[0])[dataindex];
+                        Input.Text = msgStr;
+                        Input_KeyDown(Input, new KeyEventArgs(Keys.Enter));
+                    }
+                }
+                catch (ThreadAbortException)
+                {
+                    //捕捉到线程被终止异常则表示是人为的断开TCP连接  
+                    //不弹出错误提示
+                    break;
+                }
+                catch (Exception e)
+                {
+                    //接受消息发生异常  
+                    MessageBox.Show(e.Message);
+                    receiveClient.Client.Send(Encoding.ASCII.GetBytes("ReadId1|,|NG|,|Y"));
+                    //并释放相关资源  
+                    //if (ns != null)
+                    //    ns.Dispose();
+                    //break;
+                }
+            }
+            MessageBox.Show("网络中断");
+        }
+
+        private void send_message()
+        {
+            while (IsOnline(sendClient))
+            {
+                try
+                {
+                    //创建接收数据的字节流  
+                    byte[] getData = new byte[1024];
+                    //从网络流中读取数据  z
+                    ns1.Read(getData, 0, getData.Length);
+                    //将字节数组转换成文本形式  
+                    string getMsg = Encoding.Default.GetString(getData);
+                    if (getMsg.Contains("ReadId3"))
+                    {
+                        string msgStr = getMsg.Trim('\0').Replace("ReadId3|,|", "");
+                        msgStr = msgStr.Split(ps_split.ToCharArray()[0])[dataindex];
+                        string pr_code = msgStr.Split('*')[0];
+                        //是否发送当前行装最后一盘,如发送则不进行装最后的数量
+                        bool SendLast = false;
+                        for (int i = GridPrcode.Rows.Count - 1; i >= 0; i--)
+                        {
+                            //获取复核的数据
+                            int checknum = int.Parse(GridPrcode.Rows[i].Cells["checknum"].Value.ToString());
+                            double outqty = double.Parse(GridPrcode.Rows[i].Cells["pd_outqty"].Value.ToString());
+                            double zxbzs = double.Parse(GridPrcode.Rows[i].Cells["PJD_ZXBZS_USER"].Value.ToString());
+                            string Prcode = GridPrcode.Rows[i].Cells["pd_prodcode"].Value.ToString();
+                            string pdno = GridPrcode.Rows[i].Cells["pd_pdno"].Value.ToString();
+                            if (pr_code == Prcode && checknum < outqty / zxbzs)
+                            {
+                                checknum = checknum + 1;
+                                GridPrcode.Rows[i].Cells["checknum"].Value = checknum;
+                                if (checknum < outqty / zxbzs)
+                                {
+                                    dh.UpdateByCondition("CS$InoutPrcode", "checknum=nvl(checknum,0)+1", "pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + pdno + "' and combined=" + combined);
+                                }
+                                else if (checknum == outqty / zxbzs)
+                                {
+                                    dh.UpdateByCondition("CS$InoutPrcode", "checknum=nvl(checknum,0)+1", "pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + pdno + "' and combined=" + combined);
+                                    sendClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId3|,|OK|,|1")));
+                                    checknum = 0;
+                                    SendLast = true;
+                                    PassTenCount = 0;
+                                }
+                            }
+                        }
+                        //DataGridViewSelectedRowCollection selectrow = GridPrcode.SelectedRows;
+                        //达到了中盒容量之后
+                        if (PassTenCount == MidboxCapacity.Value)
+                        {
+                            sendClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId3|,|OK|,|4")));
+                            PassTenCount = 0;
+                        }
+                        else
+                        {
+                            //如果发送了最后一盒,则不发送继续堆叠的指令
+                            if (!SendLast)
+                            {
+                                sendClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId3|,|OK|,|0")));
+                            }
+                        }
+                        PassTenCount = PassTenCount + 1;
+                    }
+                    //设置索引和内容
+                    //msgStr = msgStr.Split(ps_split.ToCharArray()[0])[dataindex];
+                    //Input.Text = msgStr;
+                    //Input_KeyDown(Input, new KeyEventArgs(Keys.Enter));
                 }
                 catch (ThreadAbortException)
                 {
@@ -2388,7 +2512,7 @@ namespace UAS_LabelMachine
                 {
                     //接受消息发生异常  
                     MessageBox.Show(e.Message);
-                    receiveClient.Client.Send(Encoding.ASCII.GetBytes("NG"));
+                    sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId1|,|NG|,|Y"));
                     //并释放相关资源  
                     //if (ns != null)
                     //    ns.Dispose();
@@ -2398,6 +2522,22 @@ namespace UAS_LabelMachine
             MessageBox.Show("网络中断");
         }
 
+        private string GetSendCode(string Code)
+        {
+            if (Angle != "")
+            {
+                Code = Code + "|,|" + Angle;
+            }
+            if (X != "")
+            {
+                Code = Code + "|,|" + X;
+            }
+            if (Y != "")
+            {
+                Code = Code + "|,|" + Y;
+            }
+            return Code;
+        }
         /// <summary>
         ///  检测TCP连接是否存在还是已经中断
         /// </summary>

+ 3 - 0
UAS-出货标签管理(泽天)/UAS_出货标签管理.resx

@@ -177,6 +177,9 @@
   <metadata name="pr_spec1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="checknum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="pib_midifprint.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 143 - 0
UAS-出货标签管理(泽天)/贴标角度设置.Designer.cs

@@ -0,0 +1,143 @@
+namespace UAS_LabelMachine
+{
+    partial class 贴标角度设置
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <lap_param name="disposing">true if managed resources should be disposed; otherwise, false.</lap_param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the lap_values of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.angle = new System.Windows.Forms.TextBox();
+            this.lap_param1_label = new System.Windows.Forms.Label();
+            this.Y = new System.Windows.Forms.TextBox();
+            this.lap_param3_labe = new System.Windows.Forms.Label();
+            this.X = new System.Windows.Forms.TextBox();
+            this.lap_param2_label = new System.Windows.Forms.Label();
+            this.Confirm = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // angle
+            // 
+            this.angle.Location = new System.Drawing.Point(296, 185);
+            this.angle.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.angle.Name = "angle";
+            this.angle.Size = new System.Drawing.Size(174, 35);
+            this.angle.TabIndex = 0;
+            // 
+            // lap_param1_label
+            // 
+            this.lap_param1_label.AutoSize = true;
+            this.lap_param1_label.BackColor = System.Drawing.Color.Transparent;
+            this.lap_param1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_param1_label.Location = new System.Drawing.Point(200, 185);
+            this.lap_param1_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lap_param1_label.Name = "lap_param1_label";
+            this.lap_param1_label.Size = new System.Drawing.Size(82, 41);
+            this.lap_param1_label.TabIndex = 61;
+            this.lap_param1_label.Text = "角度";
+            // 
+            // Y
+            // 
+            this.Y.Location = new System.Drawing.Point(296, 393);
+            this.Y.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Y.Name = "Y";
+            this.Y.Size = new System.Drawing.Size(174, 35);
+            this.Y.TabIndex = 4;
+            // 
+            // lap_param3_labe
+            // 
+            this.lap_param3_labe.AutoSize = true;
+            this.lap_param3_labe.BackColor = System.Drawing.Color.Transparent;
+            this.lap_param3_labe.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_param3_labe.Location = new System.Drawing.Point(202, 389);
+            this.lap_param3_labe.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lap_param3_labe.Name = "lap_param3_labe";
+            this.lap_param3_labe.Size = new System.Drawing.Size(37, 41);
+            this.lap_param3_labe.TabIndex = 65;
+            this.lap_param3_labe.Text = "Y";
+            // 
+            // X
+            // 
+            this.X.Location = new System.Drawing.Point(296, 291);
+            this.X.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.X.Name = "X";
+            this.X.Size = new System.Drawing.Size(174, 35);
+            this.X.TabIndex = 2;
+            // 
+            // lap_param2_label
+            // 
+            this.lap_param2_label.AutoSize = true;
+            this.lap_param2_label.BackColor = System.Drawing.Color.Transparent;
+            this.lap_param2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_param2_label.Location = new System.Drawing.Point(202, 287);
+            this.lap_param2_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lap_param2_label.Name = "lap_param2_label";
+            this.lap_param2_label.Size = new System.Drawing.Size(39, 41);
+            this.lap_param2_label.TabIndex = 69;
+            this.lap_param2_label.Text = "X";
+            // 
+            // Confirm
+            // 
+            this.Confirm.Location = new System.Drawing.Point(296, 616);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Confirm.Name = "Confirm";
+            this.Confirm.Size = new System.Drawing.Size(150, 46);
+            this.Confirm.TabIndex = 81;
+            this.Confirm.Text = "确认";
+            this.Confirm.UseVisualStyleBackColor = true;
+            this.Confirm.Click += new System.EventHandler(this.Confirm_Click);
+            // 
+            // 贴标角度设置
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(728, 718);
+            this.Controls.Add(this.Confirm);
+            this.Controls.Add(this.X);
+            this.Controls.Add(this.lap_param2_label);
+            this.Controls.Add(this.Y);
+            this.Controls.Add(this.lap_param3_labe);
+            this.Controls.Add(this.angle);
+            this.Controls.Add(this.lap_param1_label);
+            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Name = "贴标角度设置";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "附加内容打印";
+            this.Load += new System.EventHandler(this.附件内容打印_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.TextBox angle;
+        private System.Windows.Forms.Label lap_param1_label;
+        private System.Windows.Forms.TextBox Y;
+        private System.Windows.Forms.Label lap_param3_labe;
+        private System.Windows.Forms.TextBox X;
+        private System.Windows.Forms.Label lap_param2_label;
+        private System.Windows.Forms.Button Confirm;
+    }
+}

+ 52 - 0
UAS-出货标签管理(泽天)/贴标角度设置.cs

@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_LabelMachine.Entity;
+using UAS_LabelMachine.PublicMethod;
+
+namespace UAS_LabelMachine
+{
+    public partial class 贴标角度设置 : Form
+    {
+
+        DataHelper dh = SystemInf.dh;
+
+        string custcode;
+
+        public 贴标角度设置(string CustCode)
+        {
+            custcode = CustCode;
+            InitializeComponent();
+        }
+
+        private void 附件内容打印_Load(object sender, EventArgs e)
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select *  from PRINTXY where px_custcode='" + custcode + "' ", "select");
+            if (dt.Rows.Count > 0)
+            {
+                X.Text = dt.Rows[0]["px_x"].ToString();
+                Y.Text = dt.Rows[0]["px_y"].ToString();
+                angle.Text = dt.Rows[0]["px_angle"].ToString();
+            }
+        }
+
+        private void Confirm_Click(object sender, EventArgs e)
+        {
+            if (dh.CheckExist("PRINTXY", "px_custcode='" + custcode + "'"))
+            {
+                dh.ExecuteSql("update PRINTXY set px_x='"+X.Text+"',px_y='"+Y.Text+"',px_angle='"+angle.Text+"' and px_custcode='"+custcode+"'", "update");
+            }
+            else {
+                dh.ExecuteSql("insert into PRINTXY (px_x,px_y,px_angle,px_custcode)values('" + X.Text + "','" + Y.Text + "','" + angle.Text + "','"+custcode+"')", "insert");
+            }
+            LogManager.DoCommandLog(custcode, User.UserCode, "保持贴标角度成功", "成功");
+            MessageBox.Show("保存成功");
+            Close();
+        }
+    }
+}

+ 120 - 0
UAS-出货标签管理(泽天)/贴标角度设置.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>