Browse Source

正确的内容清除,不正确的内容保存

章政 7 years ago
parent
commit
907e960fb1

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

@@ -1291,7 +1291,6 @@
             this.OutBoxNum.Location = new System.Drawing.Point(52, 144);
             this.OutBoxNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OutBoxNum.Name = "OutBoxNum";
-            this.OutBoxNum.Text = "新增";
             this.OutBoxNum.Size = new System.Drawing.Size(72, 25);
             this.OutBoxNum.TabIndex = 91;
             this.OutBoxNum.SelectedIndexChanged += new System.EventHandler(this.OutBoxNum_SelectedIndexChanged);

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

@@ -187,7 +187,6 @@ namespace UAS_LabelMachine
                     return;
                 }
                 CollectInputData();
-                Input.SelectAll();
             }
         }
 
@@ -207,6 +206,7 @@ namespace UAS_LabelMachine
             if (SplitData.Length < 6)
             {
                 MessageBox.Show("数据格式错误,无法解析", "提示");
+                Input.SelectAll();
                 return;
             }
             for (int i = 0; i < SplitData.Length; i++)
@@ -242,16 +242,19 @@ namespace UAS_LabelMachine
             if (!CheckDateCode(Data["DATECODE"]))
             {
                 MessageBox.Show("物料" + Data["PRCODE"] + "【DateCode】超出校验日期");
+                Input.SelectAll();
                 return;
             }
             if (Data["PRCODE"] != CurrentPrCode)
             {
                 MessageBox.Show("当前采集【物料编号】不对应,请重新采集", "提示");
+                Input.SelectAll();
                 return;
             }
             if (Data["BRAND"] != CurrentBrand)
             {
                 MessageBox.Show("当前采集【品牌】不对应,请重新采集", "提示");
+                Input.SelectAll();
                 return;
             }
             int CodeCount = 0;
@@ -263,6 +266,7 @@ namespace UAS_LabelMachine
                 if (int.Parse(Data["QTY"]) % 1000 != 0 || int.Parse(Data["QTY"]) / 1000 % int.Parse(CurrentZXBZ) != 0)
                 {
                     MessageBox.Show("物料" + Data["PRCODE"] + "采集数量无法按照最小包装数拆分", "提示");
+                    Input.SelectAll();
                     return;
                 }
                 CodeCount = int.Parse(Data["QTY"]) / 1000 / int.Parse(CurrentZXBZ);
@@ -273,6 +277,7 @@ namespace UAS_LabelMachine
                 if (int.Parse(Data["QTY"]) % int.Parse(CurrentZXBZ) != 0)
                 {
                     MessageBox.Show("采集【数量】无法按照最小包装数拆分", "提示");
+                    Input.SelectAll();
                     return;
                 }
                 CodeCount = int.Parse(Data["QTY"]) / int.Parse(CurrentZXBZ);
@@ -305,9 +310,16 @@ namespace UAS_LabelMachine
             if (CollectQty + CollectNum > int.Parse(CurrentPrCount))
             {
                 MessageBox.Show("物料" + Data["PRCODE"] + "采集后数量为" + (CollectQty + CollectNum) + ",【超出】本行出货数量" + CurrentPrCount, "提示");
+                Input.SelectAll();
                 return;
             }
             List<string> CustBarCode = new List<string>();
+            if (!(Radix > 0))
+            {
+                string close = MessageBox.Show(this.ParentForm, "未维护条码规则,是否继续生成", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                if (close.ToString() != "Yes")
+                    return;
+            }
             for (int i = 0; i < CodeCount; i++)
             {
                 if (Radix > 0)
@@ -378,6 +390,7 @@ namespace UAS_LabelMachine
                     }
                 }
             }
+            Input.Clear();
             OutBoxNum_Click(new object(), new EventArgs());
         }
 
@@ -993,6 +1006,7 @@ namespace UAS_LabelMachine
                     dh.BatchInsert("delete from prodiobarcode where pib_id=:pib_id", new string[] { "pib_id" }, DeleteID.ToArray());
                     LogManager.DoCommandLog(pi_inoutno.Text, User.UserCode, "删除明细", "删除明细成功");
                     MessageBox.Show("删除成功", "提示");
+                    Input.Clear();
                     LoadPrcodeData();
                     LoadGridData(sender, e);
                 }