Selaa lähdekoodia

修改栈板采集

章政 8 vuotta sitten
vanhempi
commit
3d478960ab

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

@@ -28,7 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_BigBoxCollection));
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_PalletCollection));
             this.pa_outboxcode_label = new System.Windows.Forms.Label();
             this.pa_totalqty_label = new System.Windows.Forms.Label();
             this.pa_makecode_label = new System.Windows.Forms.Label();
@@ -139,7 +139,7 @@
             this.palletcode_label.Name = "palletcode_label";
             this.palletcode_label.Size = new System.Drawing.Size(58, 21);
             this.palletcode_label.TabIndex = 165;
-            this.palletcode_label.Text = "大箱号";
+            this.palletcode_label.Text = "栈板号";
             // 
             // outboxcode_label
             // 
@@ -147,9 +147,9 @@
             this.outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.outboxcode_label.Location = new System.Drawing.Point(735, 335);
             this.outboxcode_label.Name = "outboxcode_label";
-            this.outboxcode_label.Size = new System.Drawing.Size(74, 21);
+            this.outboxcode_label.Size = new System.Drawing.Size(42, 21);
             this.outboxcode_label.TabIndex = 166;
-            this.outboxcode_label.Text = "卡通箱号";
+            this.outboxcode_label.Text = "箱号";
             // 
             // pa_prodcode_label
             // 
@@ -296,7 +296,7 @@
             this.SearchPallet.Power = null;
             this.SearchPallet.Size = new System.Drawing.Size(70, 24);
             this.SearchPallet.TabIndex = 162;
-            this.SearchPallet.Text = "大箱查询";
+            this.SearchPallet.Text = "栈板查询";
             this.SearchPallet.UseVisualStyleBackColor = true;
             this.SearchPallet.Click += new System.EventHandler(this.SearchPallet_Click);
             // 
@@ -332,7 +332,7 @@
             this.ReleasePallet.Power = null;
             this.ReleasePallet.Size = new System.Drawing.Size(70, 24);
             this.ReleasePallet.TabIndex = 160;
-            this.ReleasePallet.Text = "解除大箱";
+            this.ReleasePallet.Text = "解除栈板";
             this.ReleasePallet.UseVisualStyleBackColor = true;
             this.ReleasePallet.Click += new System.EventHandler(this.ReleasePallet_Click);
             // 
@@ -350,7 +350,7 @@
             this.NewPallet.Power = "ifwrite";
             this.NewPallet.Size = new System.Drawing.Size(70, 24);
             this.NewPallet.TabIndex = 159;
-            this.NewPallet.Text = "新增大箱";
+            this.NewPallet.Text = "新增栈板";
             this.NewPallet.UseVisualStyleBackColor = true;
             this.NewPallet.Click += new System.EventHandler(this.NewPallet_Click);
             // 
@@ -476,7 +476,7 @@
             this.pa_packageqty_label.TabIndex = 176;
             this.pa_packageqty_label.Text = "箱内容量";
             // 
-            // Make_BigBoxCollection
+            // Make_PalletCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@@ -512,7 +512,7 @@
             this.Controls.Add(this.pa_outboxcode);
             this.Controls.Add(this.pa_outboxcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Name = "Make_BigBoxCollection";
+            this.Name = "Make_PalletCollection";
             this.Tag = "Make!BigBoxCollection";
             this.Text = "栈板采集";
             this.Load += new System.EventHandler(this.栈板称重_Load);

+ 15 - 16
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -73,19 +73,18 @@ namespace UAS_MES.Make
             OperateResult.Clear();
         }
 
-        //大箱号Enter事件
         private void palletcode_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Enter)
             {
                 if (palletcode.Text == "")
                 {
-                    OperateResult.AppendText(">>大箱号不能为空\n", Color.Red);
+                    OperateResult.AppendText(">>栈板号不能为空\n", Color.Red);
                     return;
                 }
                 sql.Clear();
                 sql.Append("select pa_makecode,pa_packageqty,pa_prodcode,pa_outboxcode,pa_totalqty,pa_custcode,pa_salecode ");
-                sql.Append("from package where pa_outboxcode='" + palletcode.Text + "'  and pa_type =2");
+                sql.Append("from package where pa_outboxcode='" + palletcode.Text + "'  and pa_type =3");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 BaseUtil.SetFormValue(Controls, dt);
                 if (dt.Rows.Count > 0)
@@ -97,7 +96,7 @@ namespace UAS_MES.Make
                     FillPrintLabel();
                     outboxcode.Focus();
                 }
-                else OperateResult.AppendText(">>大箱号不存在\n", Color.Red);
+                else OperateResult.AppendText(">>栈板号不存在\n", Color.Red);
             }
         }
 
@@ -108,12 +107,12 @@ namespace UAS_MES.Make
             {
                 if (outboxcode.Text == "")
                 {
-                    OperateResult.AppendText(">>卡通箱号不能为空\n", Color.Red);
+                    OperateResult.AppendText(">>箱号不能为空\n", Color.Red);
                     return;
                 }
-                if (!dh.CheckExist("package", "pa_outboxcode='" + palletcode.Text + "' and pa_type=2"))
+                if (!dh.CheckExist("package", "pa_outboxcode='" + palletcode.Text + "' and pa_type=3"))
                 {
-                    OperateResult.AppendText(">>大箱号不存在\n", Color.Red);
+                    OperateResult.AppendText(">>栈板号不存在\n", Color.Red);
                     return;
                 }
                 sql.Clear();
@@ -132,22 +131,22 @@ 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");
-                            OperateResult.AppendText(">>卡通箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
+                            dh.UpdateByCondition("package", "pa_totalqty=pa_totalqty+1", "pa_outboxcode='" + outboxcode.Text + "' and pa_type=3");
+                            OperateResult.AppendText(">>箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
                             LoadGridData();
                             LoadCollectNum();
                             //判断明细和箱内的件数的差是不是1,如果只相差1则表示此时已经采集慢了
                             if (packageqty + 1 == pa_packqty && AutoPrint.Checked)
                             {
-                                OperateResult.AppendText(">>已装满,自动打印!\n", Color.Green);
+                                OperateResult.AppendText(">>栈板"+outboxcode.Text+"已装满,自动打印!\n", Color.Green);
                                 Printlab.PerformClick();
                             }
                         }
-                        else OperateResult.AppendText(">>卡通箱号" + outboxcode.Text + "已采集\n", Color.Red, outboxcode);
+                        else OperateResult.AppendText(">>箱号" + outboxcode.Text + "已采集\n", Color.Red, outboxcode);
                     }
-                    else OperateResult.AppendText(">>卡通箱号" + outboxcode.Text + "不存在\n", Color.Red, outboxcode);
+                    else OperateResult.AppendText(">>箱号" + outboxcode.Text + "不存在\n", Color.Red, outboxcode);
                 }
-                else OperateResult.AppendText(">>大箱" + palletcode.Text + "已装满\n", Color.Red, outboxcode);
+                else OperateResult.AppendText(">>栈板号" + palletcode.Text + "已装满\n", Color.Red, outboxcode);
             }
         }
 
@@ -156,7 +155,7 @@ namespace UAS_MES.Make
             sql.Clear();
             sql.Append("select pa_prodcode,nvl(pd_barcode,PD_INNERBOXCODE) code ,pd_innerqty,pa_salecode");
             sql.Append(",pa_makecode,pa_custcode,pa_packageqty from packagedetail left join package on pd_paid=pa_id left ");
-            sql.Append("join product on pr_code=pa_prodcode where pa_outboxcode ='" + palletcode.Text + "' and pa_type=2");
+            sql.Append("join product on pr_code=pa_prodcode where pa_outboxcode ='" + palletcode.Text + "' and pa_type=3");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             BaseUtil.FillDgvWithDataTable(PackageInf, dt);
         }
@@ -178,7 +177,7 @@ namespace UAS_MES.Make
 
         private void LoadCollectNum()
         {
-            pa_totalqty.Text = dh.getFieldDataByCondition("package", "pa_totalqty", "pa_outboxcode='" + outboxcode.Text + "' and pa_type=2").ToString();
+            pa_totalqty.Text = dh.getFieldDataByCondition("package", "pa_totalqty", "pa_outboxcode='" + outboxcode.Text + "' and pa_type=3").ToString();
         }
 
         private void 栈板称重_SizeChanged(object sender, EventArgs e)
@@ -188,7 +187,7 @@ namespace UAS_MES.Make
 
         private void NewPallet_Click(object sender, EventArgs e)
         {
-            Make_NewPallet NewPallet = new Make_NewPallet("PACKAGE", pa_makecode.Text);
+            Make_NewPallet NewPallet = new Make_NewPallet("PALLET", pa_makecode.Text);
             BaseUtil.SetFormCenter(NewPallet);
             NewPallet.ShowDialog();
         }