Browse Source

修改界面,添加白色图片

章政 8 năm trước cách đây
mục cha
commit
10ee9a3c0c

+ 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);
             }

+ 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>

+ 29 - 37
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 pr_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");
                     }
                 }
             }
@@ -244,7 +236,7 @@ namespace UAS_MES.Make
             {
                 if (BatchProductDGV.Rows[i].Cells["mss_id"].Value.ToString() == "0")
                 {
-                    (BatchProductDGV.Columns["DeleteRow"] as DataGridViewImageColumn).Image = null;
+                    (BatchProductDGV.Columns["DeleteRow"] as DataGridViewImageColumn).Image = Properties.Resources.WhiteImage;
                 }
             }
         }

+ 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