Pārlūkot izejas kodu

泽天出货BUG修改

callm 4 gadi atpakaļ
vecāks
revīzija
693aedaca6

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

@@ -846,7 +846,7 @@ namespace UAS_LabelMachine
                     }
                     break;
             }
-            command.Dispose();
+            //command.Dispose();
             return result;
         }
 

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 204 - 200
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs


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

@@ -406,7 +406,6 @@ namespace UAS_LabelMachine
                     CustBarCode.Add("");
                 }
             }
-            Console.WriteLine("1" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff"));
             sql.Clear();
             sql.Append("insert into prodiobarcode(PIB_ID,PIB_PRODCODE,PIB_INDATE,PIB_INOUTNO,PIB_PIID,PIB_PDNO, PIB_PDID,PIB_PICLASS,");
             sql.Append("PIB_BARCODE,PIB_CUSTBARCODE,PIB_QTY,pib_brand,pib_datecode,pib_lotno,PIB_OUTBOXCODE2,pib_inman,PIB_IFPRINT,PIB_ORDERCODE,PIB_CUSTPO,pib_remark,pib_midcapatity,pib_custcode) ");
@@ -435,7 +434,6 @@ namespace UAS_LabelMachine
             {
                 MessageBox.Show("未成功插入数据,请核对出货单当前明细", "提示");
             }
-            Console.WriteLine("2" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff"));
 
             //更新流水号
             LoadGridData(new object(), new EventArgs());
@@ -475,7 +473,6 @@ namespace UAS_LabelMachine
             {
                 dh.UpdateByCondition("prodinout", "pi_user_packingstatus='Packed'", "pi_inoutno='" + pi_inoutno.Text + "'");
             }
-            Console.WriteLine("7" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff"));
 
             receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|OK|,|Y")));
             //采集达到了数量进行换行
@@ -531,7 +528,7 @@ namespace UAS_LabelMachine
                         pibid += PIBID[i];
                 }
                 if (!SingleLabelCombox.SelectedValue.ToString().Contains("System.Data.DataRowView"))
-                    SingleReport.Load(@"C:\打印标签\立景创新LP.frx");
+                    SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
                 for (int j = 0; j < SingleReport.Parameters.Count; j++)
                 {
                     SingleReport.SetParameterValue(SingleReport.Parameters[j].Name, "");
@@ -543,7 +540,6 @@ namespace UAS_LabelMachine
                         }
                     }
                 }
-                Console.WriteLine("3" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff"));
 
                 StringBuilder sql = new StringBuilder();
                 sql.Clear();
@@ -558,10 +554,9 @@ namespace UAS_LabelMachine
                 sql.Append("to_char(ADD_MONTHS(to_date(week_to_date(pib_datecode),'yyyy-mm-dd'),36),'yyyy-iw')有效期三年_年周,");
                 sql.Append("wh_ppmc_user 中文品牌,em_code 装箱员编号,em_name 装箱员名称  from prodiobarcode left join prodinout on pib_piid=pi_id left join product on pib_prodcode=pr_code left join ProdIODetail on pd_id=PIB_PDID  ");
                 sql.Append("left join PRODJOINVENDDETAIL on pjd_brand=pib_brand and pjd_prodcode=pib_prodcode  left join customer on pi_cardcode=cu_code left join productcustomer on pc_custid=cu_id and pc_prodcode=pd_prodcode ");
-                sql.Append("and pc_custprodcode=pd_custprodcode left join WareHouse on wh_code=pd_whcode left join employee on em_code=pib_inman where pib_id='" + pibid + "' order by pib_custbarcode)");
+                sql.Append("and pc_custprodcode=pd_custprodcode left join WareHouse on wh_code=pd_whcode left join employee on em_code=pib_inman where pib_id='" + pibid + "' order by pib_custbarcode)prodiosingleinfo_view");
                 //DataTable dt = (DataTable)dh.ExecuteSql("select * from PRODIOSINGLEINFO_VIEW where 主键ID in (" + pibid + ")", "select");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
-                Console.WriteLine("4" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff"));
 
                 SingleReport.RegisterData(dt, "prodiosingleinfo_view");
                 SingleReport.GetDataSource("prodiosingleinfo_view").Enabled = true;
@@ -570,9 +565,7 @@ namespace UAS_LabelMachine
 
                 try
                 {
-                    Console.WriteLine("5" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff"));
                     SingleReport.Print();
-                    Console.WriteLine("6" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff"));
                 }
                 catch (Exception e)
                 {
@@ -671,6 +664,7 @@ namespace UAS_LabelMachine
                         default:
                             break;
                     }
+                    PassTenCount = 1;
                     if (pi_cardcode.Text != "ZGCC")
                     {
                         CustomerLabel.Enabled = false;
@@ -2447,40 +2441,40 @@ namespace UAS_LabelMachine
         {
             while (IsOnline(receiveClient))
             {
-                try
-                {
-                    //创建接收数据的字节流  
-                    byte[] getData = new byte[1024];
-                    //从网络流中读取数据  
-                    ns.Read(getData, 0, getData.Length);
-                    //将字节数组转换成文本形式  
-                    string getMsg = Encoding.Default.GetString(getData);
-                    if (getMsg.Contains("ReadId"))
-                    {
-                        string msgStr = getMsg.Trim('\0').Replace("ReadId1|,|", "");
-                        msgStr = Regex.Match(msgStr, @"[A-Za-z0-9]+\*[A-Za-z0-9]+\*[A-Za-z0-9]+\*[A-Za-z0-9]+\*[A-Za-z0-9]+").Value;
-                        //设置索引和内容
-                        // 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;
-                }
+                //try
+                //{
+                //创建接收数据的字节流  
+                byte[] getData = new byte[1024];
+                //从网络流中读取数据  
+                ns.Read(getData, 0, getData.Length);
+                //将字节数组转换成文本形式  
+                string getMsg = Encoding.Default.GetString(getData);
+                if (getMsg.Contains("ReadId"))
+                {
+                    string msgStr = getMsg.Trim('\0').Replace("ReadId1|,|", "");
+                    msgStr = Regex.Match(msgStr, @"[A-Za-z0-9]+\*[A-Za-z0-9]+\*[A-Za-z0-9]+\*[A-Za-z0-9]+\*[A-Za-z0-9]+").Value;
+                    //设置索引和内容
+                    // 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("网络中断");
         }
@@ -2489,85 +2483,94 @@ namespace UAS_LabelMachine
         {
             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"))
+                //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|,|", "");
+                    string temp = Regex.Match(msgStr, @"[A-Za-z0-9]+\*[A-Za-z0-9]+\*[A-Za-z0-9]+\*[A-Za-z0-9]+\*[A-Za-z0-9]+").Value;
+                    string pr_code = "";
+                    //如果不存在原厂标签的话
+                    if (temp != "")
                     {
-                        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--)
+                        pr_code = temp.Split('*')[0];
+                    }
+                    bool SendLast = false;
+                    for (int i = 0; i < GridPrcode.Rows.Count; 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 || pr_code == "") && checknum < outqty / zxbzs)
                         {
-                            //获取复核的数据
-                            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)
                             {
-                                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("ReadId3|,|OK|,|1"));
-                                    checknum = 0;
-                                    SendLast = true;
-                                    PassTenCount = 0;
-                                }
+                                dh.ExecuteSql("update CS$InoutPrcode set checknum=nvl(checknum,0)+1 where pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + pdno + "' and combined=" + combined, "update");
                             }
-                        }
-                        //DataGridViewSelectedRowCollection selectrow = GridPrcode.SelectedRows;
-                        //达到了中盒容量之后
-                        if (PassTenCount == MidboxCapacity.Value)
-                        {
-                            sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|4"));
-                            PassTenCount = 0;
-                        }
-                        else
-                        {
-                            //如果发送了最后一盒,则不发送继续堆叠的指令
-                            if (!SendLast)
+                            else if (checknum == outqty / zxbzs)
                             {
-                                sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|0"));
+                                dh.ExecuteSql("update CS$InoutPrcode set checknum=nvl(checknum,0)+1 where pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + pdno + "' and combined=" + combined, "update");
+                                Console.WriteLine("ReadId3|,|OK|,|1");
+                                sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|1"));
+                                checknum = 0;
+                                SendLast = true;
+                                PassTenCount = 0;
                             }
+                            break;
                         }
-                        PassTenCount = PassTenCount + 1;
                     }
-                    //设置索引和内容
-                    //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);
-                    sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId1|,|NG|,|Y"));
-                    //并释放相关资源  
-                    //if (ns != null)
-                    //    ns.Dispose();
-                    //break;
-                }
+                    //DataGridViewSelectedRowCollection selectrow = GridPrcode.SelectedRows;
+                    //达到了中盒容量之后
+                    if (PassTenCount == MidboxCapacity.Value)
+                    {
+                        Console.WriteLine("ReadId3|,|OK|,|1");
+                        sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|1"));
+                        PassTenCount = 0;
+                    }
+                    else
+                    {
+                        //如果发送了最后一盒,则不发送继续堆叠的指令
+                        if (!SendLast)
+                        {
+                            Console.WriteLine("ReadId3|,|OK|,|0");
+                            sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|0"));
+                        }
+                    }
+                    CurrentBoxNum.Value = PassTenCount;
+                    PassTenCount = PassTenCount + 1;
+                }
+                //设置索引和内容
+                //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+e.StackTrace);
+                //    sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId1|,|NG|,|Y"));
+                //    //并释放相关资源  
+                //    //if (ns != null)
+                //    //    ns.Dispose();
+                //    //break;
+                //}
             }
             MessageBox.Show("网络中断");
         }
@@ -2597,5 +2600,18 @@ namespace UAS_LabelMachine
         {
             return !((c.Client.Poll(1000, SelectMode.SelectRead) && (c.Client.Available == 0)) || !c.Client.Connected);
         }
+
+        private void CurrentBoxNum_ValueChanged(object sender, EventArgs e)
+        {
+
+        }
+
+        private void CurrentBoxNum_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                PassTenCount = int.Parse(CurrentBoxNum.Value.ToString()) + 1;
+            }
+        }
     }
 }

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

@@ -35,14 +35,18 @@
             this.X = new System.Windows.Forms.TextBox();
             this.lap_param2_label = new System.Windows.Forms.Label();
             this.Confirm = new System.Windows.Forms.Button();
+            this.Bottom = new System.Windows.Forms.RadioButton();
+            this.Top = new System.Windows.Forms.RadioButton();
+            this.Left = new System.Windows.Forms.RadioButton();
+            this.Right = new System.Windows.Forms.RadioButton();
+            this.Cover = new System.Windows.Forms.RadioButton();
             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.Location = new System.Drawing.Point(148, 126);
             this.angle.Name = "angle";
-            this.angle.Size = new System.Drawing.Size(174, 35);
+            this.angle.Size = new System.Drawing.Size(89, 21);
             this.angle.TabIndex = 0;
             // 
             // lap_param1_label
@@ -50,19 +54,17 @@
             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.Location = new System.Drawing.Point(100, 126);
             this.lap_param1_label.Name = "lap_param1_label";
-            this.lap_param1_label.Size = new System.Drawing.Size(82, 41);
+            this.lap_param1_label.Size = new System.Drawing.Size(42, 21);
             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.Location = new System.Drawing.Point(148, 230);
             this.Y.Name = "Y";
-            this.Y.Size = new System.Drawing.Size(174, 35);
+            this.Y.Size = new System.Drawing.Size(89, 21);
             this.Y.TabIndex = 4;
             // 
             // lap_param3_labe
@@ -70,19 +72,17 @@
             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.Location = new System.Drawing.Point(101, 228);
             this.lap_param3_labe.Name = "lap_param3_labe";
-            this.lap_param3_labe.Size = new System.Drawing.Size(37, 41);
+            this.lap_param3_labe.Size = new System.Drawing.Size(20, 21);
             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.Location = new System.Drawing.Point(148, 180);
             this.X.Name = "X";
-            this.X.Size = new System.Drawing.Size(174, 35);
+            this.X.Size = new System.Drawing.Size(89, 21);
             this.X.TabIndex = 2;
             // 
             // lap_param2_label
@@ -90,29 +90,92 @@
             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.Location = new System.Drawing.Point(101, 178);
             this.lap_param2_label.Name = "lap_param2_label";
-            this.lap_param2_label.Size = new System.Drawing.Size(39, 41);
+            this.lap_param2_label.Size = new System.Drawing.Size(20, 21);
             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.Location = new System.Drawing.Point(148, 308);
             this.Confirm.Name = "Confirm";
-            this.Confirm.Size = new System.Drawing.Size(150, 46);
+            this.Confirm.Size = new System.Drawing.Size(75, 23);
             this.Confirm.TabIndex = 81;
             this.Confirm.Text = "确认";
             this.Confirm.UseVisualStyleBackColor = true;
             this.Confirm.Click += new System.EventHandler(this.Confirm_Click);
             // 
+            // Bottom
+            // 
+            this.Bottom.AutoSize = true;
+            this.Bottom.Location = new System.Drawing.Point(72, 16);
+            this.Bottom.Name = "Bottom";
+            this.Bottom.Size = new System.Drawing.Size(47, 16);
+            this.Bottom.TabIndex = 82;
+            this.Bottom.TabStop = true;
+            this.Bottom.Text = "下标";
+            this.Bottom.UseVisualStyleBackColor = true;
+            this.Bottom.CheckedChanged += new System.EventHandler(this.Button_CheckedChanged);
+            // 
+            // Top
+            // 
+            this.Top.AutoSize = true;
+            this.Top.Location = new System.Drawing.Point(72, 51);
+            this.Top.Name = "Top";
+            this.Top.Size = new System.Drawing.Size(59, 16);
+            this.Top.TabIndex = 83;
+            this.Top.TabStop = true;
+            this.Top.Text = "贴上标";
+            this.Top.UseVisualStyleBackColor = true;
+            this.Top.CheckedChanged += new System.EventHandler(this.Button_CheckedChanged);
+            // 
+            // Left
+            // 
+            this.Left.AutoSize = true;
+            this.Left.Location = new System.Drawing.Point(198, 17);
+            this.Left.Name = "Left";
+            this.Left.Size = new System.Drawing.Size(47, 16);
+            this.Left.TabIndex = 84;
+            this.Left.TabStop = true;
+            this.Left.Text = "左标";
+            this.Left.UseVisualStyleBackColor = true;
+            this.Left.CheckedChanged += new System.EventHandler(this.Button_CheckedChanged);
+            // 
+            // Right
+            // 
+            this.Right.AutoSize = true;
+            this.Right.Location = new System.Drawing.Point(198, 52);
+            this.Right.Name = "Right";
+            this.Right.Size = new System.Drawing.Size(47, 16);
+            this.Right.TabIndex = 85;
+            this.Right.TabStop = true;
+            this.Right.Text = "右标";
+            this.Right.UseVisualStyleBackColor = true;
+            this.Right.CheckedChanged += new System.EventHandler(this.Button_CheckedChanged);
+            // 
+            // Cover
+            // 
+            this.Cover.AutoSize = true;
+            this.Cover.Location = new System.Drawing.Point(72, 85);
+            this.Cover.Name = "Cover";
+            this.Cover.Size = new System.Drawing.Size(59, 16);
+            this.Cover.TabIndex = 86;
+            this.Cover.TabStop = true;
+            this.Cover.Text = "盖上标";
+            this.Cover.UseVisualStyleBackColor = true;
+            this.Cover.CheckedChanged += new System.EventHandler(this.Button_CheckedChanged);
+            // 
             // 贴标角度设置
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(728, 718);
+            this.ClientSize = new System.Drawing.Size(364, 359);
+            this.Controls.Add(this.Cover);
+            this.Controls.Add(this.Right);
+            this.Controls.Add(this.Left);
+            this.Controls.Add(this.Top);
+            this.Controls.Add(this.Bottom);
             this.Controls.Add(this.Confirm);
             this.Controls.Add(this.X);
             this.Controls.Add(this.lap_param2_label);
@@ -120,7 +183,6 @@
             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 = "附加内容打印";
@@ -139,5 +201,10 @@
         private System.Windows.Forms.TextBox X;
         private System.Windows.Forms.Label lap_param2_label;
         private System.Windows.Forms.Button Confirm;
+        private System.Windows.Forms.RadioButton Bottom;
+        private System.Windows.Forms.RadioButton Top;
+        private System.Windows.Forms.RadioButton Left;
+        private System.Windows.Forms.RadioButton Right;
+        private System.Windows.Forms.RadioButton Cover;
     }
 }

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

@@ -54,5 +54,40 @@ namespace UAS_LabelMachine
             MessageBox.Show("保存成功");
             Close();
         }
+
+        private void Button_CheckedChanged(object sender, EventArgs e)
+        {
+            RadioButton rad = (RadioButton)sender;
+            switch (rad.Name.ToUpper())
+            {
+                case "TOP":
+                    angle.Text = "0";
+                    X.Text = "0";
+                    Y.Text = "0";
+                    break;
+                case "COVER":
+                    angle.Text = "0";
+                    X.Text = "0";
+                    Y.Text = "0";
+                    break;
+                case "LEFT":
+                    angle.Text = "270";
+                    X.Text = "0";
+                    Y.Text = "-88";
+                    break;
+                case "RIGHT":
+                    angle.Text = "90";
+                    X.Text = "0";
+                    Y.Text = "-88";
+                    break;
+                case "BOTTOM":
+                    angle.Text = "0";
+                    X.Text = "4";
+                    Y.Text = "-88";
+                    break;
+                default:
+                    break;
+            }
+        }
     }
 }

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels