Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master'

shim 8 years ago
parent
commit
9de149f0b0

+ 1 - 1
UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.Designer.cs

@@ -57,7 +57,7 @@
             this.TextBox.Lock = false;
             this.TextBox.Lock = false;
             this.TextBox.Name = "TextBox";
             this.TextBox.Name = "TextBox";
             this.TextBox.Power = null;
             this.TextBox.Power = null;
-            this.TextBox.Size = new System.Drawing.Size(178, 25);
+            this.TextBox.Size = new System.Drawing.Size(178, 21);
             this.TextBox.Str = null;
             this.TextBox.Str = null;
             this.TextBox.Str1 = null;
             this.TextBox.Str1 = null;
             this.TextBox.Str2 = null;
             this.TextBox.Str2 = null;

+ 24 - 9
UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -83,7 +83,7 @@ namespace UAS_MES.Make
                         else
                         else
                         {
                         {
                             sncode.Text = "";
                             sncode.Text = "";
-                            OperateResult.AppendText(">>序列号" + sncode.Text + "没有对应工序\n", Color.Red);
+                            OperateResult.AppendText(">>无序列号" + sncode.Text + "对应工单信息\n", Color.Red);
 
 
                         }
                         }
                         string ErrorMessage = "";
                         string ErrorMessage = "";
@@ -92,22 +92,37 @@ namespace UAS_MES.Make
                         {
                         {
                             macode = ma_code.Text;
                             macode = ma_code.Text;
                             BaseUtil.CleanForm(this);
                             BaseUtil.CleanForm(this);
-                            ErrorMessage = "工单" + macode + "打印完成>>>请输入SN";
+                            ErrorMessage = "工单" + macode + "打印结束>>>请输入SN";
                             OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
                             OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
                             sncode.Focus();
                             sncode.Focus();
                             return;
                             return;
                         }
                         }
                         else
                         else
                         {
                         {
-                            if (PrintLabel.SelectedValue != null && PrintNum.Text.Trim() != "")
+                            //所选标签不为空
+                            if (PrintLabel.SelectedValue != null)
                             {
                             {
+                                //如果打印张数为空,返回
+                                if (PrintNum.Text == "" || int.Parse(PrintNum.Text) == 0)
+                                {
+                                    OperateResult.AppendText(">>打印张数不可空或者为0\n", Color.Red);
+                                    //清空输入框的值,聚焦
+                                    sncode.Text = "";
+                                    sncode.Focus();
+                                    //提示用户“>>请输入SN”
+                                    OperateResult.AppendText(">>请输入SN\n", Color.Green);
+                                    return;
+                                }
                                 Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ma_code.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                                 Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ma_code.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                                
                                 if (LogicHandler.UpdateMakeMessage(sncode.Text, ma_code.Text, "彩盒打印", User.UserSourceCode, User.UserCode, "彩盒打印成功", out ErrorMessage))
                                 if (LogicHandler.UpdateMakeMessage(sncode.Text, ma_code.Text, "彩盒打印", User.UserSourceCode, User.UserCode, "彩盒打印成功", out ErrorMessage))
                                 {
                                 {
-                                    ErrorMessage = "打印完成,执行更新";
-                                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                                    //提示用户打印成功
+                                    OperateResult.AppendText(">>序列号:" + sncode.Text + "打印成功\n", Color.Green);
+                                    //刷新打印数量和剩余数量
+                                    dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
+                                    BaseUtil.SetFormValue(Controls, dt);
                                     mcd_okqty.Text = int.Parse(mcd_okqty.Text) + 1 + "";
                                     mcd_okqty.Text = int.Parse(mcd_okqty.Text) + 1 + "";
-                                    mcd_remainqty.Text = int.Parse(mcd_remainqty.Text) - 1 + "";
                                     sncode.Text = "";
                                     sncode.Text = "";
                                     sncode.Focus();
                                     sncode.Focus();
                                 }
                                 }
@@ -115,12 +130,12 @@ namespace UAS_MES.Make
                                 {
                                 {
                                     sncode.Text = "";
                                     sncode.Text = "";
                                     sncode.Focus();
                                     sncode.Focus();
-                                    OperateResult.AppendText(">>更新失败" + ErrorMessage + "\n", Color.Red);
+                                    OperateResult.AppendText(">>更新工序失败" + ErrorMessage + "\n", Color.Red);
                                 }
                                 }
                             }
                             }
                             else
                             else
                             {
                             {
-                                ErrorMessage = "该序列号对应的产品未维护(彩盒)标签模板或打印张数没有选择";
+                                OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护机身标签\n", Color.Red);
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                                 return;
                                 return;
                             }
                             }
@@ -136,7 +151,7 @@ namespace UAS_MES.Make
                 else
                 else
                 {
                 {
                     sncode.Text = "";
                     sncode.Text = "";
-                    OperateResult.AppendText("错误" + ErrorMessage2 + "\n", Color.Red);
+                    OperateResult.AppendText(ErrorMessage2 + "\n", Color.Red);
                 }
                 }
             }
             }
         }
         }

+ 2 - 2
UAS-MES/FunctionCode/SystemSetting/SystemSetting_LabelMaintain.cs

@@ -347,7 +347,6 @@ namespace UAS_MES.SystemSetting
             }
             }
         }
         }
 
 
-
         //判断与标签保存时是否已经有同类型标签存在
         //判断与标签保存时是否已经有同类型标签存在
         private Boolean isSameLabel(string pl_prodcode, string pl_labeltype, string pl_labelname)
         private Boolean isSameLabel(string pl_prodcode, string pl_labeltype, string pl_labelname)
         {
         {
@@ -434,7 +433,7 @@ namespace UAS_MES.SystemSetting
                     }
                     }
                     else
                     else
                     {
                     {
-                        if (!isSameLabel(pr_code.Text, la_type.Text, la_name.Text) && (isdefault(pr_code.Text, la_type.Text) == 1))
+                        if (!isSameLabel(pr_code.Text, la_type.Text, la_name.Text))
                         {
                         {
                             sql.Clear();
                             sql.Clear();
                             sql.Append("insert into productlabel (pl_id,pl_labelcode,pl_labeltype,pl_isdefault,pl_labelurl,pl_labelsoft,pl_labelname,pl_prodcode,pl_indate) values( productlabel_seq.nextval, ");
                             sql.Append("insert into productlabel (pl_id,pl_labelcode,pl_labeltype,pl_isdefault,pl_labelurl,pl_labelsoft,pl_labelname,pl_prodcode,pl_indate) values( productlabel_seq.nextval, ");
@@ -459,6 +458,7 @@ namespace UAS_MES.SystemSetting
                 MessageBox.Show("所有参数必须填写");
                 MessageBox.Show("所有参数必须填写");
         }
         }
 
 
+
         private void 产品标签维护_SizeChanged(object sender, EventArgs e)
         private void 产品标签维护_SizeChanged(object sender, EventArgs e)
         {
         {
             asc.controlAutoSize(this);
             asc.controlAutoSize(this);