Browse Source

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

Hcsy 8 years ago
parent
commit
8bd89c535f

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

@@ -108,7 +108,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;
@@ -205,7 +205,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;
@@ -218,7 +218,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;
@@ -244,7 +244,7 @@
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(1105, 640);
-            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")));
@@ -259,7 +259,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, 198);
             this.OperateResult.TabIndex = 167;
@@ -271,7 +271,7 @@
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
             this.outboxcode.Location = new System.Drawing.Point(1105, 394);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            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);
@@ -288,7 +288,7 @@
             this.bigoutboxcode.BackColor = System.Drawing.Color.White;
             this.bigoutboxcode.ID = null;
             this.bigoutboxcode.Location = new System.Drawing.Point(1105, 339);
-            this.bigoutboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.bigoutboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.bigoutboxcode.Name = "bigoutboxcode";
             this.bigoutboxcode.Power = "ifwrite";
             this.bigoutboxcode.Size = new System.Drawing.Size(195, 25);
@@ -307,7 +307,7 @@
             this.Printlab.Image = ((System.Drawing.Image)(resources.GetObject("Printlab.Image")));
             this.Printlab.IsShowBorder = true;
             this.Printlab.Location = new System.Drawing.Point(1159, 246);
-            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")));
@@ -326,7 +326,7 @@
             this.ReleasePallet.Image = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.Image")));
             this.ReleasePallet.IsShowBorder = true;
             this.ReleasePallet.Location = new System.Drawing.Point(1027, 291);
-            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")));
@@ -345,7 +345,7 @@
             this.NewPallet.Image = ((System.Drawing.Image)(resources.GetObject("NewPallet.Image")));
             this.NewPallet.IsShowBorder = true;
             this.NewPallet.Location = new System.Drawing.Point(1027, 246);
-            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")));
@@ -380,7 +380,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);
@@ -493,14 +493,14 @@
             this.Packing.Image = ((System.Drawing.Image)(resources.GetObject("Packing.Image")));
             this.Packing.IsShowBorder = true;
             this.Packing.Location = new System.Drawing.Point(1159, 291);
-            this.Packing.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Packing.Margin = new System.Windows.Forms.Padding(4);
             this.Packing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Packing.MoveImage")));
             this.Packing.Name = "Packing";
             this.Packing.NormalImage = ((System.Drawing.Image)(resources.GetObject("Packing.NormalImage")));
             this.Packing.Power = null;
             this.Packing.Size = new System.Drawing.Size(80, 30);
             this.Packing.TabIndex = 178;
-            this.Packing.Text = "箱";
+            this.Packing.Text = "封大箱";
             this.Packing.UseVisualStyleBackColor = true;
             this.Packing.Click += new System.EventHandler(this.Packing_Click);
             // 
@@ -540,7 +540,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 = "栈板采集";

+ 9 - 1
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -228,7 +228,7 @@ namespace UAS_MES.Make
                     {
                         if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, code.Text, User.UserCode, out oMakeCode, out oMsid, out ErrorMessage))
                         {
-                            dt = (DataTable)dh.ExecuteSql("select nvl(cm_status,0)cm_status,cm_id,cm_stepcode,ms_makecode,cm_mccode,cm_materialtype from craftmaterial left join makeserial on cm_makecode=ms_makecode and cm_sncode=ms_sncode where ms_sncode='" + code.Text + "' and cm_makecode='" + ma_code.Text + "'", "select");
+                            dt = (DataTable)dh.ExecuteSql("select cm_makecode,cm_craftcode,nvl(cm_status,0)cm_status,cm_id,cm_stepcode,ms_makecode,cm_mccode,cm_materialtype from craftmaterial left join makeserial on cm_makecode=ms_makecode and cm_sncode=ms_sncode where ms_sncode='" + code.Text + "' and cm_makecode='" + ma_code.Text + "'", "select");
                             if (dt.Rows.Count > 0)
                             {
                                 string ms_macode = dt.Rows[0]["ms_makecode"].ToString();
@@ -236,6 +236,8 @@ namespace UAS_MES.Make
                                 string cm_mccode = dt.Rows[0]["cm_mccode"].ToString();
                                 string cm_materialtype = dt.Rows[0]["cm_materialtype"].ToString();
                                 string cm_status = dt.Rows[0]["cm_status"].ToString();
+                                string cm_makecode = dt.Rows[0]["cm_makecode"].ToString();
+                                string cm_craftcode = dt.Rows[0]["cm_craftcode"].ToString();
                                 if (cm_materialtype == "1" && cm_status == "0")
                                 {
                                     dh.ExecuteSql("delete from craftmaterial where cm_sncode='" + code.Text + "' and cm_makecode='" + ma_code.Text + "'", "delete");
@@ -243,6 +245,12 @@ namespace UAS_MES.Make
                                     int count = dh.getRowCount("craftMaterial", "cm_mccode='" + cm_mccode + "' and cm_stepcode='" + cm_stepcode + "' and cm_sncode='" + code.Text + "'");
                                     if (count == 0)
                                         dh.UpdateByCondition("makecraftdetail ", "mcd_inqty=mcd_inqty-1,mcd_outqty=mcd_outqty-1,mcd_okqty = mcd_okqty - 1", "mcd_mccode='" + cm_mccode + "' and mcd_stepcode='" + cm_stepcode + "'");
+                                    //清除已被使用的序列号
+                                    sql.Clear();
+                                    sql.Append("update makeserial set ms_nextmacode='' where ms_sncode in(select cm_barcode from craftmaterial where ");
+                                    sql.Append("cm_makecode='" + cm_makecode + "' and cm_stepcode='" + cm_stepcode + "' and cm_craftcode='" + cm_craftcode + "' ");
+                                    sql.Append("and cm_materialtype=1 and nvl(cm_status,0) =0) and ms_nextmacode='" + ma_code.Text + "'");
+                                    dh.ExecuteSql(sql.GetString(), "update");
                                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "上料采集", "下料成功", code.Text, "");
                                     OperateResult.AppendText(">>序列号" + code.Text + "下料成功\n", Color.Green, code);
                                 }

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

@@ -190,7 +190,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;
@@ -203,7 +203,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;
@@ -229,7 +229,7 @@
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(1105, 637);
-            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")));
@@ -244,7 +244,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, 220);
             this.OperateResult.TabIndex = 167;
@@ -256,7 +256,7 @@
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
             this.outboxcode.Location = new System.Drawing.Point(1106, 363);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            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);
@@ -273,7 +273,7 @@
             this.palletcode.BackColor = System.Drawing.Color.White;
             this.palletcode.ID = null;
             this.palletcode.Location = new System.Drawing.Point(1106, 308);
-            this.palletcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            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);
@@ -292,7 +292,7 @@
             this.Printlab.Image = ((System.Drawing.Image)(resources.GetObject("Printlab.Image")));
             this.Printlab.IsShowBorder = true;
             this.Printlab.Location = new System.Drawing.Point(1168, 209);
-            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")));
@@ -311,7 +311,7 @@
             this.ReleasePallet.Image = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.Image")));
             this.ReleasePallet.IsShowBorder = true;
             this.ReleasePallet.Location = new System.Drawing.Point(1041, 265);
-            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")));
@@ -330,7 +330,7 @@
             this.NewPalletCode.Image = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.Image")));
             this.NewPalletCode.IsShowBorder = true;
             this.NewPalletCode.Location = new System.Drawing.Point(1041, 209);
-            this.NewPalletCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.NewPalletCode.Margin = new System.Windows.Forms.Padding(4);
             this.NewPalletCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.MoveImage")));
             this.NewPalletCode.Name = "NewPalletCode";
             this.NewPalletCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.NormalImage")));
@@ -365,7 +365,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);
@@ -478,14 +478,14 @@
             this.Packing.Image = ((System.Drawing.Image)(resources.GetObject("Packing.Image")));
             this.Packing.IsShowBorder = true;
             this.Packing.Location = new System.Drawing.Point(1168, 265);
-            this.Packing.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Packing.Margin = new System.Windows.Forms.Padding(4);
             this.Packing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Packing.MoveImage")));
             this.Packing.Name = "Packing";
             this.Packing.NormalImage = ((System.Drawing.Image)(resources.GetObject("Packing.NormalImage")));
             this.Packing.Power = null;
             this.Packing.Size = new System.Drawing.Size(80, 30);
             this.Packing.TabIndex = 178;
-            this.Packing.Text = "装箱";
+            this.Packing.Text = "封展板";
             this.Packing.UseVisualStyleBackColor = true;
             this.Packing.Click += new System.EventHandler(this.Packing_Click);
             // 
@@ -524,7 +524,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 = "栈板采集";