Browse Source

维护标签后BUG修改

章政 6 years ago
parent
commit
4411063f1f

+ 42 - 0
UAS-出货标签管理/UAS_出货标签管理.Designer.cs

@@ -152,6 +152,7 @@
             this.pib_outboxcode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pib_outboxcode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pi_inoutno = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.pi_inoutno = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.SingleLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.SingleLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.SingleDocRefresh = new System.Windows.Forms.LinkLabel();
             this.CancelOPPOPlate = new System.Windows.Forms.Button();
             this.CancelOPPOPlate = new System.Windows.Forms.Button();
             this.OPPOPlate = new System.Windows.Forms.Button();
             this.OPPOPlate = new System.Windows.Forms.Button();
             this.ViVoPlate = new System.Windows.Forms.Button();
             this.ViVoPlate = new System.Windows.Forms.Button();
@@ -160,6 +161,7 @@
             this.SingleLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.SingleLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.SingleLabelCombox = new System.Windows.Forms.ComboBox();
             this.SingleLabelCombox = new System.Windows.Forms.ComboBox();
             this.MidLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.MidLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.MidDocRefresh = new System.Windows.Forms.LinkLabel();
             this.MidLabelNum = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.MidLabelNum = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.label5 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
@@ -170,6 +172,7 @@
             this.MidLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.MidLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.MidLabelCombox = new System.Windows.Forms.ComboBox();
             this.MidLabelCombox = new System.Windows.Forms.ComboBox();
             this.OutBoxLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.OutBoxLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.OutDocRefresh = new System.Windows.Forms.LinkLabel();
             this.LogingOut = new System.Windows.Forms.LinkLabel();
             this.LogingOut = new System.Windows.Forms.LinkLabel();
             this.GetOutBoxCode = new System.Windows.Forms.Button();
             this.GetOutBoxCode = new System.Windows.Forms.Button();
             this.OutBoxNum = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.OutBoxNum = new UAS_LabelMachine.CustomControl.EnterTextBox();
@@ -1408,6 +1411,7 @@
             // 
             // 
             // SingleLabel
             // SingleLabel
             // 
             // 
+            this.SingleLabel.Controls.Add(this.SingleDocRefresh);
             this.SingleLabel.Controls.Add(this.CancelOPPOPlate);
             this.SingleLabel.Controls.Add(this.CancelOPPOPlate);
             this.SingleLabel.Controls.Add(this.OPPOPlate);
             this.SingleLabel.Controls.Add(this.OPPOPlate);
             this.SingleLabel.Controls.Add(this.ViVoPlate);
             this.SingleLabel.Controls.Add(this.ViVoPlate);
@@ -1425,6 +1429,17 @@
             this.SingleLabel.TabStop = false;
             this.SingleLabel.TabStop = false;
             this.SingleLabel.Text = "单盘标签";
             this.SingleLabel.Text = "单盘标签";
             // 
             // 
+            // SingleDocRefresh
+            // 
+            this.SingleDocRefresh.AutoSize = true;
+            this.SingleDocRefresh.Location = new System.Drawing.Point(106, 23);
+            this.SingleDocRefresh.Name = "SingleDocRefresh";
+            this.SingleDocRefresh.Size = new System.Drawing.Size(42, 21);
+            this.SingleDocRefresh.TabIndex = 90;
+            this.SingleDocRefresh.TabStop = true;
+            this.SingleDocRefresh.Text = "刷新";
+            this.SingleDocRefresh.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.SingleDocRefresh_LinkClicked);
+            // 
             // CancelOPPOPlate
             // CancelOPPOPlate
             // 
             // 
             this.CancelOPPOPlate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.CancelOPPOPlate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -1513,6 +1528,7 @@
             // 
             // 
             // MidLabel
             // MidLabel
             // 
             // 
+            this.MidLabel.Controls.Add(this.MidDocRefresh);
             this.MidLabel.Controls.Add(this.MidLabelNum);
             this.MidLabel.Controls.Add(this.MidLabelNum);
             this.MidLabel.Controls.Add(this.label5);
             this.MidLabel.Controls.Add(this.label5);
             this.MidLabel.Controls.Add(this.label4);
             this.MidLabel.Controls.Add(this.label4);
@@ -1532,6 +1548,17 @@
             this.MidLabel.TabStop = false;
             this.MidLabel.TabStop = false;
             this.MidLabel.Text = "中盒标签";
             this.MidLabel.Text = "中盒标签";
             // 
             // 
+            // MidDocRefresh
+            // 
+            this.MidDocRefresh.AutoSize = true;
+            this.MidDocRefresh.Location = new System.Drawing.Point(106, 23);
+            this.MidDocRefresh.Name = "MidDocRefresh";
+            this.MidDocRefresh.Size = new System.Drawing.Size(42, 21);
+            this.MidDocRefresh.TabIndex = 91;
+            this.MidDocRefresh.TabStop = true;
+            this.MidDocRefresh.Text = "刷新";
+            this.MidDocRefresh.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.SingleDocRefresh_LinkClicked);
+            // 
             // MidLabelNum
             // MidLabelNum
             // 
             // 
             this.MidLabelNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MidLabelNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1633,6 +1660,7 @@
             // 
             // 
             // OutBoxLabel
             // OutBoxLabel
             // 
             // 
+            this.OutBoxLabel.Controls.Add(this.OutDocRefresh);
             this.OutBoxLabel.Controls.Add(this.LogingOut);
             this.OutBoxLabel.Controls.Add(this.LogingOut);
             this.OutBoxLabel.Controls.Add(this.GetOutBoxCode);
             this.OutBoxLabel.Controls.Add(this.GetOutBoxCode);
             this.OutBoxLabel.Controls.Add(this.OutBoxNum);
             this.OutBoxLabel.Controls.Add(this.OutBoxNum);
@@ -1654,6 +1682,17 @@
             this.OutBoxLabel.TabStop = false;
             this.OutBoxLabel.TabStop = false;
             this.OutBoxLabel.Text = "外箱标签";
             this.OutBoxLabel.Text = "外箱标签";
             // 
             // 
+            // OutDocRefresh
+            // 
+            this.OutDocRefresh.AutoSize = true;
+            this.OutDocRefresh.Location = new System.Drawing.Point(64, 23);
+            this.OutDocRefresh.Name = "OutDocRefresh";
+            this.OutDocRefresh.Size = new System.Drawing.Size(42, 21);
+            this.OutDocRefresh.TabIndex = 92;
+            this.OutDocRefresh.TabStop = true;
+            this.OutDocRefresh.Text = "刷新";
+            this.OutDocRefresh.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.SingleDocRefresh_LinkClicked);
+            // 
             // LogingOut
             // LogingOut
             // 
             // 
             this.LogingOut.AutoSize = true;
             this.LogingOut.AutoSize = true;
@@ -2011,5 +2050,8 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
+        private System.Windows.Forms.LinkLabel SingleDocRefresh;
+        private System.Windows.Forms.LinkLabel MidDocRefresh;
+        private System.Windows.Forms.LinkLabel OutDocRefresh;
     }
     }
 }
 }

+ 53 - 10
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -305,14 +305,15 @@ namespace UAS_LabelMachine
 
 
         private void LabelFormClose(object sender, EventArgs e)
         private void LabelFormClose(object sender, EventArgs e)
         {
         {
-            if (GetGridOnly.Checked)
-                GetInOutInfAndLabelFile();
-            else
-            {
-                GetGridOnly.Checked = true;
-                GetInOutInfAndLabelFile();
-                GetGridOnly.Checked = false;
-            }
+            GetInOutInfAndLabelFile();
+            //if (GetGridOnly.Checked)
+            //    GetInOutInfAndLabelFile();
+            //else
+            //{
+            //    //GetGridOnly.Checked = true;
+            //    GetInOutInfAndLabelFile();
+            //    //GetGridOnly.Checked = false;
+            //}
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -1141,7 +1142,7 @@ namespace UAS_LabelMachine
             if (e.KeyCode == Keys.Enter)
             if (e.KeyCode == Keys.Enter)
             {
             {
                 sql.Clear();
                 sql.Clear();
-                sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date from prodinout where pi_inoutno='" + pi_inoutno.Text + "'");
+                sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date from prodinout where pi_inoutno='" + pi_inoutno.Text + "' and pi_invostatus='已审核'");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 if (dt.Rows.Count > 0)
                 if (dt.Rows.Count > 0)
                 {
                 {
@@ -1190,7 +1191,7 @@ namespace UAS_LabelMachine
                     LogManager.DoLog("输入单号【" + pi_inoutno.Text + "】");
                     LogManager.DoLog("输入单号【" + pi_inoutno.Text + "】");
                 }
                 }
                 else
                 else
-                    MessageBox.Show("当前出入库单号不存在!");
+                    MessageBox.Show("当前出入库单号不存在或者未审核!");
             }
             }
         }
         }
 
 
@@ -1969,6 +1970,12 @@ namespace UAS_LabelMachine
         {
         {
             if (OutBoxCombox.Text != "")
             if (OutBoxCombox.Text != "")
             {
             {
+                if (OutBoxDoc != null)
+                    OutBoxDoc.Close();
+                if (OutBoxCombox.Text != "" && OutBoxCombox.SelectedValue != null && !GetGridOnly.Checked)
+                {
+                    OutBoxDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + OutBoxCombox.Text);
+                }
                 thread = new Thread(OutBoxPrint);
                 thread = new Thread(OutBoxPrint);
                 stw = new SetLoadingWindow(thread, "正在打印外箱");
                 stw = new SetLoadingWindow(thread, "正在打印外箱");
                 BaseUtil.SetFormCenter(stw);
                 BaseUtil.SetFormCenter(stw);
@@ -2749,5 +2756,41 @@ namespace UAS_LabelMachine
             }
             }
             Properties.Settings.Default.Save();
             Properties.Settings.Default.Save();
         }
         }
+
+        private void SingleDocRefresh_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+        {
+            switch ((sender as Control).Name)
+            {
+                case "SingleDocRefresh":
+                    if (SingleDoc != null)
+                        SingleDoc.Close();
+                    if (SingleLabelCombox.Text != "" && SingleLabelCombox.SelectedValue != null && !GetGridOnly.Checked)
+                    {
+                        System.DateTime time = Convert.ToDateTime(SingleLabelCombox.SelectedValue.ToString().Split('#')[2]);
+                        SingleDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(SingleLabelCombox.SelectedValue.ToString().Split('#')[1], SingleLabelCombox.Text, time));
+                    }
+                    break;
+                case "MidDocRefresh":
+                    if (MidDoc != null)
+                        MidDoc.Close();
+                    if (MidLabelCombox.Text != "" && MidLabelCombox.SelectedValue != null && !GetGridOnly.Checked)
+                    {
+                        System.DateTime time = Convert.ToDateTime(MidLabelCombox.SelectedValue.ToString().Split('#')[2]);
+                        MidDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(MidLabelCombox.SelectedValue.ToString().Split('#')[1], MidLabelCombox.Text, time));
+                    }
+                    break;
+                case "OutDocRefresh":
+                    if (OutBoxDoc != null)
+                        OutBoxDoc.Close();
+                    if (OutBoxCombox.Text != "" && OutBoxCombox.SelectedValue != null && !GetGridOnly.Checked)
+                    {
+                        System.DateTime time = Convert.ToDateTime(OutBoxCombox.SelectedValue.ToString().Split('#')[2]);
+                        OutBoxDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(OutBoxCombox.SelectedValue.ToString().Split('#')[1], OutBoxCombox.Text, time));
+                    }
+                    break;
+                default:
+                    break;
+            }
+        }
     }
     }
 }
 }