Parcourir la source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy il y a 8 ans
Parent
commit
2e653806c6

+ 14 - 14
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.Designer.cs

@@ -107,7 +107,7 @@
             this.AutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.AutoPrint.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AutoPrint.Location = new System.Drawing.Point(985, 204);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4);
             this.AutoPrint.Name = "AutoPrint";
             this.AutoPrint.Size = new System.Drawing.Size(154, 31);
             this.AutoPrint.TabIndex = 153;
@@ -204,7 +204,7 @@
             // PrintNum
             // 
             this.PrintNum.Location = new System.Drawing.Point(1105, 161);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Size = new System.Drawing.Size(196, 25);
             this.PrintNum.TabIndex = 175;
@@ -217,7 +217,7 @@
             // PrinterList
             // 
             this.PrinterList.Location = new System.Drawing.Point(751, 99);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
             this.PrinterList.Name = "PrinterList";
             this.PrinterList.Size = new System.Drawing.Size(195, 25);
             this.PrinterList.TabIndex = 171;
@@ -243,7 +243,7 @@
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(1105, 651);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -258,7 +258,7 @@
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OperateResult.Location = new System.Drawing.Point(953, 434);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(368, 208);
             this.OperateResult.TabIndex = 167;
@@ -269,8 +269,8 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(1084, 374);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.outboxcode.Location = new System.Drawing.Point(1105, 374);
+            this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifwrite";
             this.outboxcode.Size = new System.Drawing.Size(195, 25);
@@ -286,8 +286,8 @@
             this.palletcode.AllPower = "ifall";
             this.palletcode.BackColor = System.Drawing.Color.White;
             this.palletcode.ID = null;
-            this.palletcode.Location = new System.Drawing.Point(1084, 319);
-            this.palletcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.palletcode.Location = new System.Drawing.Point(1105, 319);
+            this.palletcode.Margin = new System.Windows.Forms.Padding(4);
             this.palletcode.Name = "palletcode";
             this.palletcode.Power = "ifwrite";
             this.palletcode.Size = new System.Drawing.Size(195, 25);
@@ -306,7 +306,7 @@
             this.Printlab.Image = ((System.Drawing.Image)(resources.GetObject("Printlab.Image")));
             this.Printlab.IsShowBorder = true;
             this.Printlab.Location = new System.Drawing.Point(1220, 260);
-            this.Printlab.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Printlab.Margin = new System.Windows.Forms.Padding(4);
             this.Printlab.MoveImage = ((System.Drawing.Image)(resources.GetObject("Printlab.MoveImage")));
             this.Printlab.Name = "Printlab";
             this.Printlab.NormalImage = ((System.Drawing.Image)(resources.GetObject("Printlab.NormalImage")));
@@ -325,7 +325,7 @@
             this.ReleasePallet.Image = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.Image")));
             this.ReleasePallet.IsShowBorder = true;
             this.ReleasePallet.Location = new System.Drawing.Point(1102, 260);
-            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4);
             this.ReleasePallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.MoveImage")));
             this.ReleasePallet.Name = "ReleasePallet";
             this.ReleasePallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.NormalImage")));
@@ -344,7 +344,7 @@
             this.NewPallet.Image = ((System.Drawing.Image)(resources.GetObject("NewPallet.Image")));
             this.NewPallet.IsShowBorder = true;
             this.NewPallet.Location = new System.Drawing.Point(985, 260);
-            this.NewPallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.NewPallet.Margin = new System.Windows.Forms.Padding(4);
             this.NewPallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.MoveImage")));
             this.NewPallet.Name = "NewPallet";
             this.NewPallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.NormalImage")));
@@ -379,7 +379,7 @@
             this.Column4,
             this.Column5});
             this.PackageInf.Location = new System.Drawing.Point(4, 161);
-            this.PackageInf.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PackageInf.Margin = new System.Windows.Forms.Padding(4);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
             this.PackageInf.Size = new System.Drawing.Size(941, 519);
@@ -519,7 +519,7 @@
             this.Controls.Add(this.pa_outboxcode);
             this.Controls.Add(this.pa_outboxcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_BigBoxCollection";
             this.Tag = "Make!BigBoxCollection";
             this.Text = "栈板采集";

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -124,7 +124,7 @@ namespace UAS_MES.Make
                 //如果未装满的话
                 if (packageqty < pa_packqty)
                 {
-                    if (dh.CheckExist("Package", "pa_outboxcode='" + outboxcode.Text + "' and pa_type=1"))
+                    if (dh.CheckExist("Package", "pa_outboxcode='" + outboxcode.Text + "' and nvl(pa_type,1)=1"))
                     {
                         //判断是否已经装箱
                         if (!dh.CheckExist("PackageDetail", "pd_innerboxcode='" + outboxcode.Text + "'"))
@@ -133,7 +133,7 @@ namespace UAS_MES.Make
                             sql.Append("insert into packagedetail(pd_id, pd_paid, pd_outboxcode, pd_innerboxcode, pd_innerqty)");
                             sql.Append("values(packagedetail_seq.nextval,'" + pa_id + "','" + palletcode.Text + "','" + outboxcode.Text + "','" + pa_totalqty.Text + "')");
                             dh.ExecuteSql(sql.GetString(), "insert");
-                            dh.UpdateByCondition("package", "pa_totalqty=pa_totalqty+1", "pa_outboxcode='" + outboxcode.Text + "' and pa_type=2");
+                            dh.UpdateByCondition("package", "pa_totalqty=pa_totalqty+1", "pa_outboxcode='" + palletcode.Text + "' and pa_type=2");
                             OperateResult.AppendText(">>卡通箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
                             LoadGridData();
                             LoadCollectNum();

+ 0 - 15
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.resx

@@ -657,19 +657,4 @@
   <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="pd_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>

+ 4 - 3
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.cs

@@ -116,13 +116,14 @@ namespace UAS_MES.Make
                         {
                             Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                         }
-                        OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测合格\n", Color.Green, outboxcode);
+                        OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测合格\n", Color.Green);
                     }
                     else
                     {
-                        OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测未通过\n", Color.Red, outboxcode);
+                        OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测未通过\n", Color.Red);
                     }
-                    dh.ExecuteSql("update package set pa_weight=" + weight.Text + ", pa_printcount= nvl(pa_printcount,0)+1 where pa_outboxcode='" + outboxcode.Text + "'", "update");
+                    dh.ExecuteSql("update package set pa_weight='" + weight.Text + "', pa_printcount= nvl(pa_printcount,0)+1 where pa_outboxcode='" + outboxcode.Text + "'", "update");
+                    outboxcode.Clear();
                 }
                 else OperateResult.AppendText(">>箱号" + outboxcode.Text + "不存在\n", Color.Red, outboxcode);
             }

+ 34 - 43
UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -88,10 +88,10 @@ namespace UAS_MES.Make
                         return;
                     }
                     //调用公共方法CheckStepSNAndMacode判断工序是否正确
-                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text==oMakeCode?oMakeCode:"", User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out oErrorMessage))
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text == oMakeCode ? oMakeCode : "", User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out oErrorMessage))
                     {
                         //IF (如果ma_code 为空)THEN
-                        if (ma_code.Text == ""||ma_code.Text!=oMakeCode)
+                        if (ma_code.Text == "" || ma_code.Text != oMakeCode)
                         {
                             //获取工单的其他信息
                             sql.Clear();
@@ -124,61 +124,52 @@ namespace UAS_MES.Make
                                 OperateResult.AppendText(">>无序列号" + sncode.Text + "对应工单信息\n", Color.Red);
                             }
                         }
-                        //更新打印的数据
-                        if (LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sncode.Text,  "机身标打印", "机身标打印成功", User.UserCode,  out oErrorMessage))
+                        //所选标签不为空
+                        if (PrintLabel.SelectedValue != null)
                         {
-                            //所选标签不为空
-                            if (PrintLabel.SelectedValue != null)
+                            //如果打印张数为空,返回
+                            if (PrintNum.Text == "" || int.Parse(PrintNum.Text) == 0)
                             {
-                                //如果打印张数为空,返回
-                                if (PrintNum.Text == "" || int.Parse(PrintNum.Text) == 0)
-                                {
-                                    OperateResult.AppendText(">>打印张数不可空或者为0\n", Color.Red);
-                                    //清空输入框的值,聚焦
-                                    sncode.Text = "";
-                                    sncode.Focus();
-                                    //提示用户“>>请输入SN”
-                                    OperateResult.AppendText(">>请输入SN\n", Color.Black);
-                                    return;
-                                }
-                                //按照打印张数打印
-                                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
-                                //提示用户打印成功
-                                OperateResult.AppendText(">>序列号:" + sncode.Text + "打印成功\n", Color.Green);
-
+                                OperateResult.AppendText(">>打印张数不可空或者为0\n", Color.Red);
                                 //清空输入框的值,聚焦
                                 sncode.Text = "";
                                 sncode.Focus();
-                                //刷新打印数量和剩余数量
-                                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 + "";
+                                //提示用户“>>请输入SN”
+                                OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                return;
+                            }
+                            //按照打印张数打印
+                            Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                            //提示用户打印成功
+                            OperateResult.AppendText(">>序列号:" + sncode.Text + "打印成功\n", Color.Green);
+                            //更新打印的数据
+                            LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sncode.Text, "机身标打印", "机身标打印成功", User.UserCode, out oErrorMessage);
+                            //清空输入框的值,聚焦
+                            sncode.Text = "";
+                            sncode.Focus();
+                            //刷新打印数量和剩余数量
+                            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 + "";
 
-                                //IF 剩余数=0,则清空form中的数据, 提示用户“工单:xx已经打印完成,>>请输入SN”, 清空mapB,listC 中的数据
-                                if (int.Parse(mcd_remainqty.Text) == 0)
-                                {
-                                    BaseUtil.CleanForm(this);
-                                    OperateResult.AppendText(">>工单:" + ma_code.Text + "打印完成,>>请输入SN\n", Color.Green);
-                                }
-                                //剩余数量不为0
-                                else
-                                {
-                                    //提示用户“>>请输入SN”
-                                    OperateResult.AppendText(">>请输入SN\n", Color.Black);
-                                }
+                            //IF 剩余数=0,则清空form中的数据, 提示用户“工单:xx已经打印完成,>>请输入SN”, 清空mapB,listC 中的数据
+                            if (int.Parse(mcd_remainqty.Text) == 0)
+                            {
+                                BaseUtil.CleanForm(this);
+                                OperateResult.AppendText(">>工单:" + ma_code.Text + "打印完成,>>请输入SN\n", Color.Green);
                             }
-                            //标签为空
+                            //剩余数量不为0
                             else
                             {
-                                OperateResult.AppendText(">>产品编号:" + ma_prodcode.Text + "未维护机身标签\n", Color.Red);
-                                sncode.Text = "";
+                                //提示用户“>>请输入SN”
+                                OperateResult.AppendText(">>请输入SN\n", Color.Black);
                             }
                         }
+                        //标签为空
                         else
                         {
+                            OperateResult.AppendText(">>产品编号:" + ma_prodcode.Text + "未维护机身标签\n", Color.Red);
                             sncode.Text = "";
-                            sncode.Focus();
-                            OperateResult.AppendText(">>更新工序失败" + oErrorMessage + "\n", Color.Red);
                         }
                     }
                     else

+ 14 - 14
UAS-MES/FunctionCode/Make/Make_PalletCollection.Designer.cs

@@ -107,7 +107,7 @@
             this.AutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.AutoPrint.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AutoPrint.Location = new System.Drawing.Point(985, 204);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4);
             this.AutoPrint.Name = "AutoPrint";
             this.AutoPrint.Size = new System.Drawing.Size(154, 31);
             this.AutoPrint.TabIndex = 153;
@@ -204,7 +204,7 @@
             // PrintNum
             // 
             this.PrintNum.Location = new System.Drawing.Point(1105, 161);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Size = new System.Drawing.Size(196, 25);
             this.PrintNum.TabIndex = 175;
@@ -217,7 +217,7 @@
             // PrinterList
             // 
             this.PrinterList.Location = new System.Drawing.Point(751, 99);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
             this.PrinterList.Name = "PrinterList";
             this.PrinterList.Size = new System.Drawing.Size(195, 25);
             this.PrinterList.TabIndex = 171;
@@ -243,7 +243,7 @@
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(1105, 651);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -258,7 +258,7 @@
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OperateResult.Location = new System.Drawing.Point(953, 409);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(368, 233);
             this.OperateResult.TabIndex = 167;
@@ -269,8 +269,8 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(1084, 363);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.outboxcode.Location = new System.Drawing.Point(1106, 363);
+            this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifwrite";
             this.outboxcode.Size = new System.Drawing.Size(195, 25);
@@ -286,8 +286,8 @@
             this.palletcode.AllPower = "ifall";
             this.palletcode.BackColor = System.Drawing.Color.White;
             this.palletcode.ID = null;
-            this.palletcode.Location = new System.Drawing.Point(1084, 308);
-            this.palletcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.palletcode.Location = new System.Drawing.Point(1106, 308);
+            this.palletcode.Margin = new System.Windows.Forms.Padding(4);
             this.palletcode.Name = "palletcode";
             this.palletcode.Power = "ifwrite";
             this.palletcode.Size = new System.Drawing.Size(195, 25);
@@ -306,7 +306,7 @@
             this.Printlab.Image = ((System.Drawing.Image)(resources.GetObject("Printlab.Image")));
             this.Printlab.IsShowBorder = true;
             this.Printlab.Location = new System.Drawing.Point(1220, 252);
-            this.Printlab.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Printlab.Margin = new System.Windows.Forms.Padding(4);
             this.Printlab.MoveImage = ((System.Drawing.Image)(resources.GetObject("Printlab.MoveImage")));
             this.Printlab.Name = "Printlab";
             this.Printlab.NormalImage = ((System.Drawing.Image)(resources.GetObject("Printlab.NormalImage")));
@@ -325,7 +325,7 @@
             this.ReleasePallet.Image = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.Image")));
             this.ReleasePallet.IsShowBorder = true;
             this.ReleasePallet.Location = new System.Drawing.Point(1104, 252);
-            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4);
             this.ReleasePallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.MoveImage")));
             this.ReleasePallet.Name = "ReleasePallet";
             this.ReleasePallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.NormalImage")));
@@ -344,7 +344,7 @@
             this.NewPallet.Image = ((System.Drawing.Image)(resources.GetObject("NewPallet.Image")));
             this.NewPallet.IsShowBorder = true;
             this.NewPallet.Location = new System.Drawing.Point(985, 252);
-            this.NewPallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.NewPallet.Margin = new System.Windows.Forms.Padding(4);
             this.NewPallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.MoveImage")));
             this.NewPallet.Name = "NewPallet";
             this.NewPallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.NormalImage")));
@@ -379,7 +379,7 @@
             this.Column4,
             this.Column5});
             this.PackageInf.Location = new System.Drawing.Point(4, 161);
-            this.PackageInf.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PackageInf.Margin = new System.Windows.Forms.Padding(4);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
             this.PackageInf.Size = new System.Drawing.Size(941, 519);
@@ -519,7 +519,7 @@
             this.Controls.Add(this.pa_outboxcode);
             this.Controls.Add(this.pa_outboxcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_PalletCollection";
             this.Tag = "Make!BigBoxCollection";
             this.Text = "栈板采集";

+ 0 - 15
UAS-MES/FunctionCode/Make/Make_PalletCollection.resx

@@ -657,19 +657,4 @@
   <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="pd_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>

+ 11 - 12
UAS-MES/FunctionCode/Make/Make_PositionStock.Designer.cs

@@ -72,7 +72,7 @@
             this.panel2.Controls.Add(this.label1);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Location = new System.Drawing.Point(0, 0);
-            this.panel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.panel2.Margin = new System.Windows.Forms.Padding(4);
             this.panel2.Name = "panel2";
             this.panel2.Size = new System.Drawing.Size(1229, 36);
             this.panel2.TabIndex = 31;
@@ -174,7 +174,7 @@
             this.ma_craftcode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.ma_craftcode.FormattingEnabled = true;
             this.ma_craftcode.Location = new System.Drawing.Point(553, 52);
-            this.ma_craftcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ma_craftcode.Margin = new System.Windows.Forms.Padding(4);
             this.ma_craftcode.Name = "ma_craftcode";
             this.ma_craftcode.Size = new System.Drawing.Size(199, 23);
             this.ma_craftcode.TabIndex = 185;
@@ -185,7 +185,7 @@
             this.Lock.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Lock.LeaveEvent = false;
             this.Lock.Location = new System.Drawing.Point(339, 54);
-            this.Lock.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Lock.Margin = new System.Windows.Forms.Padding(4);
             this.Lock.Name = "Lock";
             this.Lock.Size = new System.Drawing.Size(61, 24);
             this.Lock.TabIndex = 182;
@@ -221,7 +221,7 @@
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(1041, 634);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -237,7 +237,7 @@
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OperateResult.Location = new System.Drawing.Point(944, 179);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(271, 440);
             this.OperateResult.TabIndex = 178;
@@ -251,7 +251,7 @@
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
             this.Confirm.Location = new System.Drawing.Point(459, 636);
-            this.Confirm.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(4);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
@@ -271,7 +271,7 @@
             this.pr_batchnum.BackColor = System.Drawing.Color.White;
             this.pr_batchnum.ID = null;
             this.pr_batchnum.Location = new System.Drawing.Point(115, 638);
-            this.pr_batchnum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pr_batchnum.Margin = new System.Windows.Forms.Padding(4);
             this.pr_batchnum.Name = "pr_batchnum";
             this.pr_batchnum.Power = null;
             this.pr_batchnum.Size = new System.Drawing.Size(320, 25);
@@ -299,14 +299,14 @@
             this.pr_spec,
             this.DeleteRow});
             this.BatchProductDGV.Location = new System.Drawing.Point(0, 179);
-            this.BatchProductDGV.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.BatchProductDGV.Margin = new System.Windows.Forms.Padding(4);
             this.BatchProductDGV.Name = "BatchProductDGV";
             this.BatchProductDGV.RowTemplate.Height = 23;
             this.BatchProductDGV.Size = new System.Drawing.Size(936, 441);
             this.BatchProductDGV.TabIndex = 174;
-            this.BatchProductDGV.DataSourceChanged += new System.EventHandler(this.BatchProductDGV_DataSourceChanged);
             this.BatchProductDGV.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.BatchProduct_CellContentClick);
             this.BatchProductDGV.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.BatchProductDGV_CellEndEdit);
+            this.BatchProductDGV.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.BatchProductDGV_CellFormatting);
             // 
             // sp_soncode
             // 
@@ -320,7 +320,6 @@
             this.mss_id.DataPropertyName = "mss_id";
             this.mss_id.HeaderText = "ID";
             this.mss_id.Name = "mss_id";
-            this.mss_id.Visible = false;
             // 
             // mss_prodcode
             // 
@@ -440,7 +439,7 @@
             this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
             this.Screen.IsShowBorder = true;
             this.Screen.Location = new System.Drawing.Point(828, 104);
-            this.Screen.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Screen.Margin = new System.Windows.Forms.Padding(4);
             this.Screen.MoveImage = ((System.Drawing.Image)(resources.GetObject("Screen.MoveImage")));
             this.Screen.Name = "Screen";
             this.Screen.NormalImage = ((System.Drawing.Image)(resources.GetObject("Screen.NormalImage")));
@@ -478,7 +477,7 @@
             this.Controls.Add(this.Screen);
             this.Controls.Add(this.panel2);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_PositionStock";
             this.Tag = "Make!PositionStock";
             this.Text = "岗位备料";

+ 50 - 56
UAS-MES/FunctionCode/Make/Make_PositionStock.cs

@@ -72,51 +72,42 @@ namespace UAS_MES.Make
                 {
                     if (ma_code.Text != "")
                     {
-                        string ErrMessage = "";
-                        if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrMessage))
+                        sql.Clear();
+                        sql.Append("select cr_code from craft left join craftdetail on cd_crid=cr_id where cr_code in (" + craftcode_condition + ") ");
+                        sql.Append("and cr_prodcode='" + ma_prodcode.Text + "'  and  cr_statuscode='AUDITED'  and  cd_stepcode='" + User.CurrentStepCode + "'");
+                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        if (dt.Rows.Count > 0)
                         {
-                            sql.Clear();
-                            sql.Append("select cr_code from craft left join craftdetail on cd_crid=cr_id where cr_code in (" + craftcode_condition + ") ");
-                            sql.Append("and cr_prodcode='" + ma_prodcode.Text + "'  and  cr_statuscode='AUDITED'  and  cd_stepcode='" + User.CurrentStepCode + "'");
-                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            dt = (DataTable)dh.ExecuteSql("select bar_remain,bar_prodcode from barcode inner join product on pr_code=bar_prodcode where bar_code ='" + pr_batchnum.Text + "'", "select");
                             if (dt.Rows.Count > 0)
                             {
-                                dt = (DataTable)dh.ExecuteSql("select bar_remain,bar_prodcode from barcode inner join product on pr_code=bar_prodcode where bar_code ='" + pr_batchnum.Text + "' and bar_status = 1 ", "select");
+                                string bar_remain = dt.Rows[0]["bar_remain"].ToString();
+                                string bar_prodcode = dt.Rows[0]["bar_prodcode"].ToString();
+                                sql.Clear();
+                                sql.Append("select * from stepproduct inner join product on pr_code=sp_soncode left join makematerial on mm_prodcode=sp_soncode where ");
+                                sql.Append("sp_craftcode='" + ma_craftcode.Text + "' and sp_stepcode='" + User.CurrentStepCode + "' and sp_soncode='" + bar_prodcode + "' and sp_tracekind=2 ");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 if (dt.Rows.Count > 0)
                                 {
-                                    string bar_remain = dt.Rows[0]["bar_remain"].ToString();
-                                    string bar_prodcode = dt.Rows[0]["bar_prodcode"].ToString();
+                                    string mm_oneuseqty = dt.Rows[0]["mm_oneuseqty"].ToString();
+                                    string mm_prodcode = dt.Rows[0]["mm_prodcode"].ToString();
                                     sql.Clear();
-                                    sql.Append("select * from stepproduct inner join product on pr_code=sp_soncode left join makematerial on mm_prodcode=sp_soncode where ");
-                                    sql.Append("sp_craftcode='" + ma_craftcode.Text + "' and sp_stepcode='" + User.CurrentStepCode + "' and sp_soncode='" + bar_prodcode + "' and pr_tracekind=2 ");
-                                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                                    if (dt.Rows.Count > 0)
-                                    {
-                                        string mm_oneuseqty = dt.Rows[0]["mm_oneuseqty"].ToString();
-                                        string mm_prodcode = dt.Rows[0]["mm_prodcode"].ToString();
-                                        if (dh.getRowCount("makesourcestock", "mss_makecode='" + ma_code.Text + "' and mss_prodcode='" + mm_prodcode + "' and mss_barcode='" + pr_batchnum.Text + "'") == 0)
-                                        {
-                                            sql.Clear();
-                                            sql.Append("insert into makesourcestock (mss_id,mss_makecode,mss_linecode ,mss_craftcode,");
-                                            sql.Append("mss_stepcode,mss_barcode,mss_fprodcode,mss_indate,mss_inman,mss_qty,");
-                                            sql.Append("mss_remain,mss_baseqty,mss_prodcode,mss_maid) values(makesourcestock_seq.nextval,'" + ma_code.Text + "','" + User.UserLineCode + "',");
-                                            sql.Append("'" + ma_craftcode.Text + "','" + sc_stepcode.Text + "','" + pr_batchnum.Text + "','" + mm_prodcode + "',");
-                                            sql.Append("sysdate,'" + User.UserCode + "','" + bar_remain + "','" + bar_remain + "','" + mm_oneuseqty + "','" + bar_prodcode + "','" + ma_id + "')");
-                                            dh.ExecuteSql(sql.GetString(), "insert");
-                                            dh.UpdateByCondition("barcode", "bar_place='" + ma_code.Text + "'", "bar_code='" + pr_batchnum.Text + "'");
-                                            //数据插入成功后加载Grid的数据
-                                            FillDataGridView();
-                                            OperateResult.AppendText(">>条码号" + pr_batchnum.Text + "备料成功\n", Color.Green, pr_batchnum);
-                                        }
-                                        else OperateResult.AppendText(">>条码号" + pr_batchnum.Text + "的物料已分配\n", Color.Red, pr_batchnum);
-                                    }
-                                    else OperateResult.AppendText(">>条码号" + pr_batchnum.Text + "对应的物料不是当前工单当前工序需要备的物料\n", Color.Red, pr_batchnum);
+                                    sql.Append("insert into makesourcestock (mss_id,mss_makecode,mss_linecode ,mss_craftcode,");
+                                    sql.Append("mss_stepcode,mss_barcode,mss_fprodcode,mss_indate,mss_inman,mss_qty,");
+                                    sql.Append("mss_remain,mss_baseqty,mss_prodcode,mss_maid) values(makesourcestock_seq.nextval,'" + ma_code.Text + "','" + User.UserLineCode + "',");
+                                    sql.Append("'" + ma_craftcode.Text + "','" + sc_stepcode.Text + "','" + pr_batchnum.Text + "','" + mm_prodcode + "',");
+                                    sql.Append("sysdate,'" + User.UserCode + "','" + bar_remain + "','" + bar_remain + "','" + mm_oneuseqty + "','" + bar_prodcode + "','" + ma_id + "')");
+                                    dh.ExecuteSql(sql.GetString(), "insert");
+                                    dh.UpdateByCondition("barcode", "bar_place='" + ma_code.Text + "'", "bar_code='" + pr_batchnum.Text + "'");
+                                    //数据插入成功后加载Grid的数据
+                                    FillDataGridView();
+                                    OperateResult.AppendText(">>条码号" + pr_batchnum.Text + "备料成功\n", Color.Green, pr_batchnum);
                                 }
-                                else OperateResult.AppendText(">>条码号:" + pr_batchnum.Text + "不存在,或者状态无效\n", Color.Red, pr_batchnum);
+                                else OperateResult.AppendText(">>条码号" + pr_batchnum.Text + "对应的物料不是当前工单当前工序需要备的物料\n", Color.Red, pr_batchnum);
                             }
-                            else OperateResult.AppendText(">>当前岗位资源工序不在工单对应的途程中\n", Color.Red);
+                            else OperateResult.AppendText(">>条码号:" + pr_batchnum.Text + "不存在,或者状态无效\n", Color.Red, pr_batchnum);
                         }
-                        else OperateResult.AppendText(">>" + ErrMessage + "\n", Color.Red);
+                        else OperateResult.AppendText(">>当前岗位资源工序不在工单对应的途程中\n", Color.Red);
                     }
                     else OperateResult.AppendText(">>工单号不能为空\n", Color.Red, pr_batchnum);
                 }
@@ -174,6 +165,7 @@ namespace UAS_MES.Make
                     {
                         BatchProductDGV.Rows.RemoveAt(e.RowIndex);
                         dh.ExecuteSql("delete from makesourcestock where mss_id='" + id + "'", "delete");
+                        OperateResult.AppendText(">>删除成功\n");
                     }
                 }
             }
@@ -213,39 +205,41 @@ namespace UAS_MES.Make
 
         private void BatchProductDGV_CellEndEdit(object sender, DataGridViewCellEventArgs e)
         {
-            string id = BatchProductDGV.Rows[e.RowIndex].Cells["mss_id"].Value.ToString();
-            string qty = "0";
-            if (id != "0")
+            if (BatchProductDGV.Columns[e.ColumnIndex].Name == "mss_qty")
             {
-                try
+                string id = BatchProductDGV.Rows[e.RowIndex].Cells["mss_id"].Value.ToString();
+                string qty = "0";
+                if (id != "0")
                 {
-                    if (int.Parse(BatchProductDGV.Rows[e.RowIndex].Cells["mss_qty"].Value.ToString()) > 0)
+                    try
                     {
-                        qty = BatchProductDGV.Rows[e.RowIndex].Cells["mss_qty"].Value.ToString();
+                        if (int.Parse(BatchProductDGV.Rows[e.RowIndex].Cells["mss_qty"].Value.ToString()) > 0)
+                        {
+                            qty = BatchProductDGV.Rows[e.RowIndex].Cells["mss_qty"].Value.ToString();
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(">>数量必须大于0\n", Color.Red);
+                            return;
+                        }
                     }
-                    else
+                    catch (Exception)
                     {
                         OperateResult.AppendText(">>数量必须大于0\n", Color.Red);
                         return;
                     }
+                    dh.UpdateByCondition("makesourcestock", "mss_qty='" + qty + "'", "mss_id='" + id + "'");
                 }
-                catch (Exception)
-                {
-                    OperateResult.AppendText(">>数量必须大于0\n", Color.Red);
-                    return;
-                }
-                dh.UpdateByCondition("makesourcestock", "mss_qty='" + qty + "'", "mss_id='" + id + "'");
             }
         }
 
-        private void BatchProductDGV_DataSourceChanged(object sender, EventArgs e)
+        private void BatchProductDGV_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
         {
-            for (int i = 0; i < BatchProductDGV.Rows.Count; i++)
-            {
-                if (BatchProductDGV.Rows[i].Cells["mss_id"].Value.ToString() == "0")
-                {
-                    (BatchProductDGV.Columns["DeleteRow"] as DataGridViewImageColumn).Image = null;
-                }
+            if (BatchProductDGV.Columns[e.ColumnIndex].Name == "DeleteRow") {
+                if (BatchProductDGV.Rows[e.RowIndex].Cells["mss_id"].Value.ToString() == "0")
+                    e.Value = Properties.Resources.WhiteImage;
+                else
+                    e.Value = Properties.Resources.bindingNavigatorDeleteItem_Image;
             }
         }
     }

+ 14 - 4
UAS-MES/Properties/Resources.Designer.cs

@@ -401,7 +401,7 @@ namespace UAS_MES.Properties {
         }
         
         /// <summary>
-        ///   查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
+        ///   查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。
         /// </summary>
         internal static System.Drawing.Icon Internet_Explorer_Windows_8_Windows8_32px_566667_easyicon_net {
             get {
@@ -501,7 +501,7 @@ namespace UAS_MES.Properties {
         }
         
         /// <summary>
-        ///   查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
+        ///   查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。
         /// </summary>
         internal static System.Drawing.Icon matte_white_square_icon_business_tool_hammer_128px_571061_easyicon_net {
             get {
@@ -651,7 +651,7 @@ namespace UAS_MES.Properties {
         }
         
         /// <summary>
-        ///   查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
+        ///   查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。
         /// </summary>
         internal static System.Drawing.Icon U_Icon {
             get {
@@ -711,7 +711,17 @@ namespace UAS_MES.Properties {
         }
         
         /// <summary>
-        ///   查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap WhiteImage {
+            get {
+                object obj = ResourceManager.GetObject("WhiteImage", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。
         /// </summary>
         internal static System.Drawing.Icon Windows_32px_1063981_easyicon_net {
             get {

+ 3 - 0
UAS-MES/Properties/Resources.resx

@@ -322,4 +322,7 @@
   <data name="_0802192135" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\0802192135.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="WhiteImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\WhiteImage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

BIN
UAS-MES/Resources/WhiteImage.png