Эх сурвалжийг харах

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

shim 8 жил өмнө
parent
commit
596c3ba522

+ 1 - 1
UAS-MES/App.config

@@ -37,7 +37,7 @@
         <value />
       </setting>
       <setting name="FTPAddress" serializeAs="String">
-        <value>ftp://172.16.11.99/print/|uasmes|Administrator1@#</value>
+        <value>\\172.16.11.99\ShareTest</value>
       </setting>
     </UAS_MES.Properties.Settings>
   </userSettings>

+ 15 - 2
UAS-MES/Entity/SystemInf.cs

@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 
 namespace UAS_MES.Entity
 {
@@ -56,5 +57,17 @@ namespace UAS_MES.Entity
         /// 是否允许打印程序
         /// </summary>
         public static bool EnablePrint;
+        /// <summary>
+        /// 缓存数据的文件夹
+        /// </summary>
+        public static string CacheFolder= Environment.GetEnvironmentVariable("windir").Substring(0, 1)+@":\UAS_MES\CacheFile\";
+        /// <summary>
+        /// 日志文件的缓存路径
+        /// </summary>
+        public static string LogFolder = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\Log\";
+        /// <summary>
+        /// 缓存的XML文件的路径和名称
+        /// </summary>
+        public static string CacheFilePath= Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\CacheFile\CacheInfo.xml";
     }
-}
+}

+ 35 - 48
UAS-MES/FunctionCode/Make/Make_CollectBTMAC.Designer.cs

@@ -50,10 +50,9 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(612, 23);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(459, 18);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 206;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -63,10 +62,9 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.sncode_label.AutoSize = true;
             this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sncode_label.Location = new System.Drawing.Point(33, 518);
-            this.sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.sncode_label.Location = new System.Drawing.Point(25, 414);
             this.sncode_label.Name = "sncode_label";
-            this.sncode_label.Size = new System.Drawing.Size(72, 27);
+            this.sncode_label.Size = new System.Drawing.Size(58, 21);
             this.sncode_label.TabIndex = 205;
             this.sncode_label.Text = "录入框";
             // 
@@ -74,10 +72,9 @@
             // 
             this.mcd_remainqty_label.AutoSize = true;
             this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty_label.Location = new System.Drawing.Point(305, 72);
-            this.mcd_remainqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty_label.Location = new System.Drawing.Point(229, 58);
             this.mcd_remainqty_label.Name = "mcd_remainqty_label";
-            this.mcd_remainqty_label.Size = new System.Drawing.Size(72, 27);
+            this.mcd_remainqty_label.Size = new System.Drawing.Size(58, 21);
             this.mcd_remainqty_label.TabIndex = 202;
             this.mcd_remainqty_label.Text = "剩余数";
             // 
@@ -85,10 +82,9 @@
             // 
             this.mcd_okqty_label.AutoSize = true;
             this.mcd_okqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty_label.Location = new System.Drawing.Point(36, 72);
-            this.mcd_okqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_okqty_label.Location = new System.Drawing.Point(27, 58);
             this.mcd_okqty_label.Name = "mcd_okqty_label";
-            this.mcd_okqty_label.Size = new System.Drawing.Size(92, 27);
+            this.mcd_okqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_okqty_label.TabIndex = 201;
             this.mcd_okqty_label.Text = "采集计数";
             // 
@@ -96,10 +92,9 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(305, 23);
-            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_code_label.Location = new System.Drawing.Point(229, 18);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
             this.pr_code_label.TabIndex = 200;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -107,10 +102,9 @@
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(36, 23);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Location = new System.Drawing.Point(27, 18);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(92, 27);
+            this.ms_makecode_label.Size = new System.Drawing.Size(74, 21);
             this.ms_makecode_label.TabIndex = 199;
             this.ms_makecode_label.Text = "工单编号";
             // 
@@ -121,13 +115,12 @@
             this.DeleteButton.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteButton.DownImage")));
             this.DeleteButton.Image = null;
             this.DeleteButton.IsShowBorder = true;
-            this.DeleteButton.Location = new System.Drawing.Point(397, 518);
-            this.DeleteButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.DeleteButton.Location = new System.Drawing.Point(298, 414);
             this.DeleteButton.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteButton.MoveImage")));
             this.DeleteButton.Name = "DeleteButton";
             this.DeleteButton.NormalImage = ((System.Drawing.Image)(resources.GetObject("DeleteButton.NormalImage")));
             this.DeleteButton.Power = null;
-            this.DeleteButton.Size = new System.Drawing.Size(80, 30);
+            this.DeleteButton.Size = new System.Drawing.Size(60, 24);
             this.DeleteButton.TabIndex = 213;
             this.DeleteButton.Text = "取消";
             this.DeleteButton.UseVisualStyleBackColor = false;
@@ -138,20 +131,20 @@
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.CutLength = null;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(143, 23);
-            this.ms_makecode.MaximumSize = new System.Drawing.Size(267, 0);
+            this.ms_makecode.Location = new System.Drawing.Point(107, 18);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(200, 0);
             this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
             this.ms_makecode.TabIndex = 212;
             // 
             // mcd_remainqty
             // 
             this.mcd_remainqty.AutoSize = true;
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(417, 72);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty.Location = new System.Drawing.Point(313, 58);
             this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(24, 27);
+            this.mcd_remainqty.Size = new System.Drawing.Size(19, 21);
             this.mcd_remainqty.TabIndex = 210;
             this.mcd_remainqty.Text = "0";
             // 
@@ -159,10 +152,9 @@
             // 
             this.mcd_okqty.AutoSize = true;
             this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty.Location = new System.Drawing.Point(143, 72);
-            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_okqty.Location = new System.Drawing.Point(107, 58);
             this.mcd_okqty.Name = "mcd_okqty";
-            this.mcd_okqty.Size = new System.Drawing.Size(24, 27);
+            this.mcd_okqty.Size = new System.Drawing.Size(19, 21);
             this.mcd_okqty.TabIndex = 209;
             this.mcd_okqty.Text = "0";
             // 
@@ -171,11 +163,10 @@
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.CutLength = null;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(417, 27);
-            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_prodcode.MaximumSize = new System.Drawing.Size(267, 0);
+            this.ma_prodcode.Location = new System.Drawing.Point(313, 22);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(200, 0);
             this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 21);
             this.ma_prodcode.TabIndex = 208;
             // 
             // pr_detail
@@ -183,11 +174,10 @@
             this.pr_detail.AutoSize = true;
             this.pr_detail.CutLength = null;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(725, 23);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(267, 0);
+            this.pr_detail.Location = new System.Drawing.Point(544, 18);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(200, 0);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 27);
+            this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 207;
             // 
             // sncode
@@ -197,34 +187,31 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.sncode.BackColor = System.Drawing.Color.White;
             this.sncode.ID = null;
-            this.sncode.Location = new System.Drawing.Point(117, 520);
-            this.sncode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.sncode.Location = new System.Drawing.Point(88, 416);
             this.sncode.Name = "sncode";
             this.sncode.Power = null;
-            this.sncode.Size = new System.Drawing.Size(260, 25);
+            this.sncode.Size = new System.Drawing.Size(196, 21);
             this.sncode.Str = null;
             this.sncode.Str1 = null;
             this.sncode.Str2 = null;
             this.sncode.TabIndex = 204;
             this.sncode.Tag = "ifwrite";
-            this.sncode.TextChanged += new System.EventHandler(this.sncode_TextChanged);
             this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
             // 
             // OperateResult
             // 
             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(16, 121);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Location = new System.Drawing.Point(12, 97);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(940, 380);
+            this.OperateResult.Size = new System.Drawing.Size(706, 305);
             this.OperateResult.TabIndex = 203;
             this.OperateResult.Text = "";
             // 
             // Make_CollectBTMAC
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(987, 560);
+            this.ClientSize = new System.Drawing.Size(740, 448);
             this.Controls.Add(this.DeleteButton);
             this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.mcd_remainqty);
@@ -240,7 +227,7 @@
             this.Controls.Add(this.pr_code_label);
             this.Controls.Add(this.ms_makecode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Name = "Make_CollectBTMAC";
             this.Tag = "Make!CollectBTMAC";
             this.Text = "BT/MAC采集";

+ 0 - 5
UAS-MES/FunctionCode/Make/Make_CollectBTMAC.cs

@@ -60,11 +60,6 @@ namespace UAS_MES.Make
             asc.controlAutoSize(this);
         }
 
-        private void sncode_TextChanged(object sender, EventArgs e)
-        {
-
-        }
-
         private void deleteButton1_Click(object sender, EventArgs e)
         {
             isBT = false;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_CollectNetCode.cs

@@ -127,7 +127,7 @@ namespace UAS_MES.Make
                         OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                         return;
                     }
-                    else if (dh.CheckExist("makeserial","ms_netcode = '"+sncode.Text+"'"))
+                    else if (dh.CheckExist("makeserial", "ms_netcode = '" + sncode.Text + "'"))
                     {
                         sncode.Text = "";
                         OperateResult.AppendText(">>录入错误,已存在此网标\n", Color.Red);

+ 0 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -97,7 +97,6 @@ namespace UAS_MES.Make
             {
                 lbl = new ApplicationClass();
                 BaseUtil.WriteLbl(lbl);
-                ftpOperater ftp = new ftpOperater();
             }
             catch (Exception ex)
             {

+ 14 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollection.Designer.cs

@@ -76,6 +76,7 @@
             this.pa_sccode = new System.Windows.Forms.Label();
             this.pa_checkno = new System.Windows.Forms.Label();
             this.pa_downstatus = new System.Windows.Forms.Label();
+            this.ms_makecode = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
@@ -675,11 +676,23 @@
             this.pa_downstatus.TabIndex = 178;
             this.pa_downstatus.Visible = false;
             // 
+            // ms_makecode
+            // 
+            this.ms_makecode.AutoSize = true;
+            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode.Location = new System.Drawing.Point(1137, 588);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_makecode.TabIndex = 179;
+            this.ms_makecode.Visible = false;
+            // 
             // Make_PackageCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1172, 730);
+            this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.pa_downstatus);
             this.Controls.Add(this.pa_checkno);
             this.Controls.Add(this.pa_sccode);
@@ -766,5 +779,6 @@
         private System.Windows.Forms.Label pa_sccode;
         private System.Windows.Forms.Label pa_checkno;
         private System.Windows.Forms.Label pa_downstatus;
+        private System.Windows.Forms.Label ms_makecode;
     }
 }

+ 4 - 4
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -166,7 +166,7 @@ namespace UAS_MES.Make
                         switch (pr_packrule.Text.ToUpper())
                         {
                             case "MAKE":
-                                if (dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_id='" + oMsID + "'").ToString() != pa_makecode.Text)
+                                if (dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_id='" + oMsID + "'").ToString() != pa_makecode.Text && pa_makecode.Text != "")
                                 {
                                     OperateResult.AppendText(">>序列号" + sn_code.Text + "所属工单和当前箱号工单不相等\n", Color.Red, sn_code);
                                     return;
@@ -195,8 +195,6 @@ namespace UAS_MES.Make
                                 break;
                             case "MIX":
                                 break;
-                            case "SPEC":
-                                break;
                             default:
                                 break;
                         }
@@ -228,8 +226,9 @@ namespace UAS_MES.Make
                                 ////箱号不存在的情况
                                 if (LogicHandler.Packing(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
                                 {
-                                    if (LogicHandler.SetStepResult(pa_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
+                                    if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
                                     {
+                                        LoadCheckQTY();
                                         OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
                                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "采集成功", sn_code.Text, "");
                                         //满箱更新状态为1
@@ -243,6 +242,7 @@ namespace UAS_MES.Make
                                         LoadGridData();
                                         sn_code.Clear();
                                     }
+                                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                                 }
                                 else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                             }

+ 14 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.Designer.cs

@@ -85,6 +85,7 @@
             this.pa_downstatus = new System.Windows.Forms.Label();
             this.pa_checkno = new System.Windows.Forms.Label();
             this.pa_sccode = new System.Windows.Forms.Label();
+            this.ms_makecode = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
@@ -790,11 +791,23 @@
             this.pa_sccode.TabIndex = 181;
             this.pa_sccode.Visible = false;
             // 
+            // ms_makecode
+            // 
+            this.ms_makecode.AutoSize = true;
+            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode.Location = new System.Drawing.Point(1008, 579);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_makecode.TabIndex = 182;
+            this.ms_makecode.Visible = false;
+            // 
             // Make_PackageCollectionWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1172, 727);
+            this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.pa_sccode);
             this.Controls.Add(this.pa_checkno);
             this.Controls.Add(this.pa_downstatus);
@@ -895,5 +908,6 @@
         private System.Windows.Forms.Label pr_detail;
         private System.Windows.Forms.Label pr_outboxinnerqty_label;
         private System.Windows.Forms.Label pr_code;
+        private System.Windows.Forms.Label ms_makecode;
     }
 }

+ 3 - 32
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -190,37 +190,6 @@ namespace UAS_MES.Make
             pa_currentqty.Text = dh.getFieldDataByCondition("package", "pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString();
         }
 
-        private void InsertDetail()
-        {
-            if (dh.getFieldDataByCondition("makeserial", "ms_sncode", "ms_id='" + oMsID + "'").ToString() == sn_code.Text)
-            {
-                if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) < int.Parse(pr_outboxinnerqty.Text))
-                {
-                    if (LogicHandler.SetStepResult(pa_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
-                    {
-                        LoadCheckQTY();
-                        OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
-                        //满箱更新状态为1
-                        if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) + 1 == int.Parse(pr_outboxinnerqty.Text))
-                        {
-                            //检查重量合格
-                            if (float.Parse(weight.Text) > MinWeight && float.Parse(weight.Text) < MaxWeight)
-                            {
-                                dh.UpdateByCondition("package", "pa_status=1", "pa_outboxcode='" + pa_outboxcode.Text + "'");
-                                if (AutoPrint.Checked)
-                                    Print_Click(new object(), new EventArgs());
-                            }
-                            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.Red);
-                        }
-                        LoadGridData();
-                        sn_code.Clear();
-                    }
-                }
-                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已采集满\n", Color.Red);
-            }
-            else OperateResult.AppendText("序列号" + sn_code.Text + "不存在", Color.Red, sn_code);
-        }
-
         private void Print_Click(object sender, EventArgs e)
         {
             if (PrintLabel.Items.Count != 0)
@@ -306,6 +275,8 @@ namespace UAS_MES.Make
                                     return;
                                 }
                                 break;
+                            case "MIX":
+                                break;
                             default:
                                 break;
                         }
@@ -337,7 +308,7 @@ namespace UAS_MES.Make
                                 ////箱号不存在的情况
                                 if (LogicHandler.Packing(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
                                 {
-                                    if (LogicHandler.SetStepResult(pa_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
+                                    if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
                                     {
                                         LoadCheckQTY();
                                         OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);

+ 0 - 1
UAS-MES/FunctionCode/Packing/Packing_CartonTransfer.cs

@@ -71,7 +71,6 @@ namespace UAS_MES.Packing
                     pa_standardqty.Enabled = true;
                     pa_outboxcode.Focus();
                 }
-
             }
         }
 

+ 67 - 100
UAS-MES/FunctionCode/SystemSetting/SystemSetting_LabelMaintain.Designer.cs

@@ -85,10 +85,9 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(28, 15);
-            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_code_label.Location = new System.Drawing.Point(21, 12);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
             this.pr_code_label.TabIndex = 145;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -96,10 +95,9 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(387, 15);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(290, 12);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 144;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -107,10 +105,9 @@
             // 
             this.pr_spec_label.AutoSize = true;
             this.pr_spec_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_spec_label.Location = new System.Drawing.Point(781, 14);
-            this.pr_spec_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_spec_label.Location = new System.Drawing.Point(586, 11);
             this.pr_spec_label.Name = "pr_spec_label";
-            this.pr_spec_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_spec_label.Size = new System.Drawing.Size(74, 21);
             this.pr_spec_label.TabIndex = 150;
             this.pr_spec_label.Text = "产品规格";
             // 
@@ -123,10 +120,9 @@
             this.CodeSoft.AutoSize = true;
             this.CodeSoft.Checked = true;
             this.CodeSoft.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CodeSoft.Location = new System.Drawing.Point(1291, 15);
-            this.CodeSoft.Margin = new System.Windows.Forms.Padding(4);
+            this.CodeSoft.Location = new System.Drawing.Point(968, 12);
             this.CodeSoft.Name = "CodeSoft";
-            this.CodeSoft.Size = new System.Drawing.Size(122, 31);
+            this.CodeSoft.Size = new System.Drawing.Size(99, 25);
             this.CodeSoft.TabIndex = 161;
             this.CodeSoft.TabStop = true;
             this.CodeSoft.Text = "CodeSoft";
@@ -136,10 +132,9 @@
             // 
             this.labelSoft_label.AutoSize = true;
             this.labelSoft_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.labelSoft_label.Location = new System.Drawing.Point(1165, 15);
-            this.labelSoft_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.labelSoft_label.Location = new System.Drawing.Point(874, 12);
             this.labelSoft_label.Name = "labelSoft_label";
-            this.labelSoft_label.Size = new System.Drawing.Size(92, 27);
+            this.labelSoft_label.Size = new System.Drawing.Size(74, 21);
             this.labelSoft_label.TabIndex = 163;
             this.labelSoft_label.Text = "模板软件";
             // 
@@ -147,30 +142,27 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(1119, 112);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(839, 90);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(132, 27);
+            this.label1.Size = new System.Drawing.Size(106, 21);
             this.label1.TabIndex = 164;
             this.label1.Text = "模板参数预览";
             // 
             // la_name
             // 
             this.la_name.Enabled = false;
-            this.la_name.Location = new System.Drawing.Point(127, 650);
-            this.la_name.Margin = new System.Windows.Forms.Padding(4);
+            this.la_name.Location = new System.Drawing.Point(95, 520);
             this.la_name.Name = "la_name";
-            this.la_name.Size = new System.Drawing.Size(213, 25);
+            this.la_name.Size = new System.Drawing.Size(161, 21);
             this.la_name.TabIndex = 201;
             // 
             // la_name_label
             // 
             this.la_name_label.AutoSize = true;
             this.la_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.la_name_label.Location = new System.Drawing.Point(19, 650);
-            this.la_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.la_name_label.Location = new System.Drawing.Point(14, 520);
             this.la_name_label.Name = "la_name_label";
-            this.la_name_label.Size = new System.Drawing.Size(92, 27);
+            this.la_name_label.Size = new System.Drawing.Size(74, 21);
             this.la_name_label.TabIndex = 202;
             this.la_name_label.Text = "模板名称";
             // 
@@ -179,10 +171,9 @@
             this.FTPShare.AutoSize = true;
             this.FTPShare.Checked = true;
             this.FTPShare.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.FTPShare.Location = new System.Drawing.Point(1067, 602);
-            this.FTPShare.Margin = new System.Windows.Forms.Padding(4);
+            this.FTPShare.Location = new System.Drawing.Point(800, 482);
             this.FTPShare.Name = "FTPShare";
-            this.FTPShare.Size = new System.Drawing.Size(83, 19);
+            this.FTPShare.Size = new System.Drawing.Size(66, 16);
             this.FTPShare.TabIndex = 200;
             this.FTPShare.Text = "FTP共享";
             this.FTPShare.UseVisualStyleBackColor = true;
@@ -190,10 +181,9 @@
             // 
             // OpenFolder
             // 
-            this.OpenFolder.Location = new System.Drawing.Point(639, 650);
-            this.OpenFolder.Margin = new System.Windows.Forms.Padding(4);
+            this.OpenFolder.Location = new System.Drawing.Point(479, 520);
             this.OpenFolder.Name = "OpenFolder";
-            this.OpenFolder.Size = new System.Drawing.Size(51, 28);
+            this.OpenFolder.Size = new System.Drawing.Size(38, 22);
             this.OpenFolder.TabIndex = 192;
             this.OpenFolder.Text = "浏览";
             this.OpenFolder.UseVisualStyleBackColor = true;
@@ -203,30 +193,27 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(371, 598);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(278, 478);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(92, 27);
+            this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 199;
             this.label3.Text = "模板类型";
             // 
             // FolderPath
             // 
             this.FolderPath.Enabled = false;
-            this.FolderPath.Location = new System.Drawing.Point(476, 650);
-            this.FolderPath.Margin = new System.Windows.Forms.Padding(4);
+            this.FolderPath.Location = new System.Drawing.Point(357, 520);
             this.FolderPath.Name = "FolderPath";
-            this.FolderPath.Size = new System.Drawing.Size(155, 25);
+            this.FolderPath.Size = new System.Drawing.Size(117, 21);
             this.FolderPath.TabIndex = 193;
             // 
             // FolderPath_Label
             // 
             this.FolderPath_Label.AutoSize = true;
             this.FolderPath_Label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.FolderPath_Label.Location = new System.Drawing.Point(371, 650);
-            this.FolderPath_Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.FolderPath_Label.Location = new System.Drawing.Point(278, 520);
             this.FolderPath_Label.Name = "FolderPath_Label";
-            this.FolderPath_Label.Size = new System.Drawing.Size(92, 27);
+            this.FolderPath_Label.Size = new System.Drawing.Size(74, 21);
             this.FolderPath_Label.TabIndex = 194;
             this.FolderPath_Label.Text = "本地路径";
             // 
@@ -234,10 +221,9 @@
             // 
             this.la_code_label.AutoSize = true;
             this.la_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.la_code_label.Location = new System.Drawing.Point(16, 598);
-            this.la_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.la_code_label.Location = new System.Drawing.Point(12, 478);
             this.la_code_label.Name = "la_code_label";
-            this.la_code_label.Size = new System.Drawing.Size(92, 27);
+            this.la_code_label.Size = new System.Drawing.Size(74, 21);
             this.la_code_label.TabIndex = 195;
             this.la_code_label.Text = "模板编号";
             // 
@@ -245,29 +231,26 @@
             // 
             this.LabelParam.AutoScroll = true;
             this.LabelParam.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.LabelParam.Location = new System.Drawing.Point(1116, 152);
-            this.LabelParam.Margin = new System.Windows.Forms.Padding(4);
+            this.LabelParam.Location = new System.Drawing.Point(837, 122);
             this.LabelParam.Name = "LabelParam";
-            this.LabelParam.Size = new System.Drawing.Size(343, 432);
+            this.LabelParam.Size = new System.Drawing.Size(258, 346);
             this.LabelParam.TabIndex = 203;
             // 
             // label2
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(717, 598);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(538, 478);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(92, 27);
+            this.label2.Size = new System.Drawing.Size(74, 21);
             this.label2.TabIndex = 205;
             this.label2.Text = "产品编号";
             // 
             // OpernSaveFolder
             // 
-            this.OpernSaveFolder.Location = new System.Drawing.Point(1067, 649);
-            this.OpernSaveFolder.Margin = new System.Windows.Forms.Padding(4);
+            this.OpernSaveFolder.Location = new System.Drawing.Point(800, 519);
             this.OpernSaveFolder.Name = "OpernSaveFolder";
-            this.OpernSaveFolder.Size = new System.Drawing.Size(51, 28);
+            this.OpernSaveFolder.Size = new System.Drawing.Size(38, 22);
             this.OpernSaveFolder.TabIndex = 209;
             this.OpernSaveFolder.Text = "浏览";
             this.OpernSaveFolder.UseVisualStyleBackColor = true;
@@ -275,21 +258,18 @@
             // 
             // SavePath
             // 
-            this.SavePath.Location = new System.Drawing.Point(827, 651);
-            this.SavePath.Margin = new System.Windows.Forms.Padding(4);
+            this.SavePath.Location = new System.Drawing.Point(620, 521);
             this.SavePath.Name = "SavePath";
-            this.SavePath.Size = new System.Drawing.Size(213, 25);
+            this.SavePath.Size = new System.Drawing.Size(161, 21);
             this.SavePath.TabIndex = 210;
-            this.SavePath.Text = "\\\\172.16.11.99\\ShareTest";
             // 
             // SavePath_label
             // 
             this.SavePath_label.AutoSize = true;
             this.SavePath_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SavePath_label.Location = new System.Drawing.Point(713, 651);
-            this.SavePath_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.SavePath_label.Location = new System.Drawing.Point(535, 521);
             this.SavePath_label.Name = "SavePath_label";
-            this.SavePath_label.Size = new System.Drawing.Size(92, 27);
+            this.SavePath_label.Size = new System.Drawing.Size(74, 21);
             this.SavePath_label.TabIndex = 211;
             this.SavePath_label.Text = "存放路径";
             // 
@@ -300,13 +280,12 @@
             this.Delete.DownImage = ((System.Drawing.Image)(resources.GetObject("Delete.DownImage")));
             this.Delete.Image = ((System.Drawing.Image)(resources.GetObject("Delete.Image")));
             this.Delete.IsShowBorder = true;
-            this.Delete.Location = new System.Drawing.Point(857, 69);
-            this.Delete.Margin = new System.Windows.Forms.Padding(4);
+            this.Delete.Location = new System.Drawing.Point(643, 55);
             this.Delete.MoveImage = ((System.Drawing.Image)(resources.GetObject("Delete.MoveImage")));
             this.Delete.Name = "Delete";
             this.Delete.NormalImage = ((System.Drawing.Image)(resources.GetObject("Delete.NormalImage")));
             this.Delete.Power = "IfWrite";
-            this.Delete.Size = new System.Drawing.Size(84, 30);
+            this.Delete.Size = new System.Drawing.Size(63, 24);
             this.Delete.TabIndex = 208;
             this.Delete.Tag = "Ifdelete";
             this.Delete.Text = "删除";
@@ -318,10 +297,10 @@
             this.pagination1.AddEnable = false;
             this.pagination1.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pagination1.DeleteEnable = false;
-            this.pagination1.Location = new System.Drawing.Point(0, 690);
-            this.pagination1.Margin = new System.Windows.Forms.Padding(5);
+            this.pagination1.Location = new System.Drawing.Point(0, 552);
+            this.pagination1.Margin = new System.Windows.Forms.Padding(4);
             this.pagination1.Name = "pagination1";
-            this.pagination1.Size = new System.Drawing.Size(1469, 40);
+            this.pagination1.Size = new System.Drawing.Size(1102, 32);
             this.pagination1.TabIndex = 207;
             // 
             // pr_code2
@@ -329,11 +308,10 @@
             this.pr_code2.AllPower = null;
             this.pr_code2.BackColor = System.Drawing.Color.White;
             this.pr_code2.ID = null;
-            this.pr_code2.Location = new System.Drawing.Point(137, 18);
-            this.pr_code2.Margin = new System.Windows.Forms.Padding(4);
+            this.pr_code2.Location = new System.Drawing.Point(103, 14);
             this.pr_code2.Name = "pr_code2";
             this.pr_code2.Power = null;
-            this.pr_code2.Size = new System.Drawing.Size(199, 25);
+            this.pr_code2.Size = new System.Drawing.Size(150, 21);
             this.pr_code2.Str = null;
             this.pr_code2.Str1 = null;
             this.pr_code2.Str2 = null;
@@ -347,13 +325,12 @@
             this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
             this.Save.Image = ((System.Drawing.Image)(resources.GetObject("Save.Image")));
             this.Save.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(1140, 649);
-            this.Save.Margin = new System.Windows.Forms.Padding(4);
+            this.Save.Location = new System.Drawing.Point(855, 519);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
             this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
             this.Save.Power = "IfWrite";
-            this.Save.Size = new System.Drawing.Size(80, 30);
+            this.Save.Size = new System.Drawing.Size(60, 24);
             this.Save.TabIndex = 198;
             this.Save.Tag = "IfWrite";
             this.Save.Text = "保存";
@@ -373,10 +350,9 @@
             "栈板标",
             "SN标签",
             "自定义"});
-            this.la_type.Location = new System.Drawing.Point(476, 598);
-            this.la_type.Margin = new System.Windows.Forms.Padding(4);
+            this.la_type.Location = new System.Drawing.Point(357, 478);
             this.la_type.Name = "la_type";
-            this.la_type.Size = new System.Drawing.Size(213, 23);
+            this.la_type.Size = new System.Drawing.Size(161, 20);
             this.la_type.TabIndex = 197;
             // 
             // la_code
@@ -386,14 +362,13 @@
             this.la_code.Condition = null;
             this.la_code.DBTitle = "模板查询";
             this.la_code.FormName = null;
-            this.la_code.Location = new System.Drawing.Point(127, 598);
-            this.la_code.Margin = new System.Windows.Forms.Padding(4);
+            this.la_code.Location = new System.Drawing.Point(95, 478);
             this.la_code.Name = "la_code";
             this.la_code.Power = null;
             this.la_code.ReturnData = null;
             this.la_code.SelectField = null;
             this.la_code.SetValueField = null;
-            this.la_code.Size = new System.Drawing.Size(213, 26);
+            this.la_code.Size = new System.Drawing.Size(160, 21);
             this.la_code.TabIndex = 196;
             this.la_code.TableName = null;
             this.la_code.Tag = "IfRead";
@@ -401,10 +376,9 @@
             // 
             // ChooseAll
             // 
-            this.ChooseAll.Location = new System.Drawing.Point(21, 94);
-            this.ChooseAll.Margin = new System.Windows.Forms.Padding(4);
+            this.ChooseAll.Location = new System.Drawing.Point(16, 75);
             this.ChooseAll.Name = "ChooseAll";
-            this.ChooseAll.Size = new System.Drawing.Size(51, 25);
+            this.ChooseAll.Size = new System.Drawing.Size(38, 20);
             this.ChooseAll.TabIndex = 174;
             this.ChooseAll.Text = "全选";
             this.ChooseAll.UseVisualStyleBackColor = true;
@@ -429,11 +403,10 @@
             this.pl_labelurl,
             this.pl_id,
             this.pl_prodcode});
-            this.LabelDataGridView.Location = new System.Drawing.Point(21, 126);
-            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(4);
+            this.LabelDataGridView.Location = new System.Drawing.Point(16, 101);
             this.LabelDataGridView.Name = "LabelDataGridView";
             this.LabelDataGridView.RowTemplate.Height = 23;
-            this.LabelDataGridView.Size = new System.Drawing.Size(1077, 458);
+            this.LabelDataGridView.Size = new System.Drawing.Size(808, 366);
             this.LabelDataGridView.TabIndex = 172;
             this.LabelDataGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelDataGridView_CellContentClick);
             this.LabelDataGridView.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.LabelDataGridView_CellFormatting);
@@ -555,14 +528,13 @@
             this.pr_code.Condition = null;
             this.pr_code.DBTitle = "产品编号查询";
             this.pr_code.FormName = null;
-            this.pr_code.Location = new System.Drawing.Point(827, 598);
-            this.pr_code.Margin = new System.Windows.Forms.Padding(4);
+            this.pr_code.Location = new System.Drawing.Point(620, 478);
             this.pr_code.Name = "pr_code";
             this.pr_code.Power = null;
             this.pr_code.ReturnData = null;
             this.pr_code.SelectField = null;
             this.pr_code.SetValueField = null;
-            this.pr_code.Size = new System.Drawing.Size(213, 26);
+            this.pr_code.Size = new System.Drawing.Size(160, 21);
             this.pr_code.TabIndex = 159;
             this.pr_code.TableName = null;
             this.pr_code.Tag = "pr_code";
@@ -575,13 +547,12 @@
             this.UpdateGrid.DownImage = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.DownImage")));
             this.UpdateGrid.Image = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.Image")));
             this.UpdateGrid.IsShowBorder = true;
-            this.UpdateGrid.Location = new System.Drawing.Point(728, 69);
-            this.UpdateGrid.Margin = new System.Windows.Forms.Padding(4);
+            this.UpdateGrid.Location = new System.Drawing.Point(546, 55);
             this.UpdateGrid.MoveImage = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.MoveImage")));
             this.UpdateGrid.Name = "UpdateGrid";
             this.UpdateGrid.NormalImage = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.NormalImage")));
             this.UpdateGrid.Power = "IfWrite";
-            this.UpdateGrid.Size = new System.Drawing.Size(84, 30);
+            this.UpdateGrid.Size = new System.Drawing.Size(63, 24);
             this.UpdateGrid.TabIndex = 154;
             this.UpdateGrid.Tag = "IfWrite";
             this.UpdateGrid.Text = "更新";
@@ -595,13 +566,12 @@
             this.Screen.DownImage = ((System.Drawing.Image)(resources.GetObject("Screen.DownImage")));
             this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
             this.Screen.IsShowBorder = true;
-            this.Screen.Location = new System.Drawing.Point(596, 69);
-            this.Screen.Margin = new System.Windows.Forms.Padding(4);
+            this.Screen.Location = new System.Drawing.Point(447, 55);
             this.Screen.MoveImage = ((System.Drawing.Image)(resources.GetObject("Screen.MoveImage")));
             this.Screen.Name = "Screen";
             this.Screen.NormalImage = ((System.Drawing.Image)(resources.GetObject("Screen.NormalImage")));
             this.Screen.Power = "IfRead";
-            this.Screen.Size = new System.Drawing.Size(84, 30);
+            this.Screen.Size = new System.Drawing.Size(63, 24);
             this.Screen.TabIndex = 153;
             this.Screen.Tag = "IfRead";
             this.Screen.Text = "筛选";
@@ -613,11 +583,10 @@
             this.pr_spec.AllPower = null;
             this.pr_spec.BackColor = System.Drawing.Color.White;
             this.pr_spec.ID = null;
-            this.pr_spec.Location = new System.Drawing.Point(900, 15);
-            this.pr_spec.Margin = new System.Windows.Forms.Padding(4);
+            this.pr_spec.Location = new System.Drawing.Point(675, 12);
             this.pr_spec.Name = "pr_spec";
             this.pr_spec.Power = null;
-            this.pr_spec.Size = new System.Drawing.Size(199, 25);
+            this.pr_spec.Size = new System.Drawing.Size(150, 21);
             this.pr_spec.Str = null;
             this.pr_spec.Str1 = null;
             this.pr_spec.Str2 = null;
@@ -629,11 +598,10 @@
             this.pr_detail.AllPower = null;
             this.pr_detail.BackColor = System.Drawing.Color.White;
             this.pr_detail.ID = null;
-            this.pr_detail.Location = new System.Drawing.Point(497, 16);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(4);
+            this.pr_detail.Location = new System.Drawing.Point(373, 13);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Power = null;
-            this.pr_detail.Size = new System.Drawing.Size(199, 25);
+            this.pr_detail.Size = new System.Drawing.Size(150, 21);
             this.pr_detail.Str = null;
             this.pr_detail.Str1 = null;
             this.pr_detail.Str2 = null;
@@ -648,9 +616,9 @@
             // 
             // SystemSetting_LabelMaintain
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1467, 730);
+            this.ClientSize = new System.Drawing.Size(1100, 584);
             this.Controls.Add(this.OpernSaveFolder);
             this.Controls.Add(this.SavePath);
             this.Controls.Add(this.SavePath_label);
@@ -684,7 +652,6 @@
             this.Controls.Add(this.pr_code_label);
             this.Controls.Add(this.pr_detail_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "SystemSetting_LabelMaintain";
             this.Tag = "Make!ProLabel";
             this.Text = "产品标签维护";

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

@@ -122,8 +122,8 @@ namespace UAS_MES.SystemSetting
             pr_detail.KeyDown += ScreenEvent;
             pr_spec.KeyDown += ScreenEvent;
 
-            //SavePath.Text = BaseUtil.GetCacheData("SavePath").ToString();
-            BaseUtil.SetCacheData("SavePath", SavePath.Text);
+            SavePath.Text = Properties.Settings.Default.Properties["FTPAddress"].DefaultValue.ToString();
+            //BaseUtil.SetCacheData("SavePath", SavePath.Text);
 
             ftp = new ftpOperater();
         }
@@ -244,7 +244,7 @@ namespace UAS_MES.SystemSetting
             }
             else
             {
-                sql.Append("select pl_labelurl,pl_labeltype,pl_isdefault,pl_prodcode,pl_id,pl_labelcode,pl_detno,pl_labelsoft,pr_detail,pr_spec,pr_code from productlabel left join product on pl_prodcode=pr_code");
+                sql.Append("select pl_labelurl,pl_labeltype,pl_labelname,pl_isdefault,pl_prodcode,pl_id,pl_labelcode,pl_detno,pl_labelsoft,pr_detail,pr_spec,pr_code from productlabel left join product on pl_prodcode=pr_code");
                 //设置筛选的条件
                 condition.Append(BaseUtil.GetScreenSqlCondition(pr_code2, pr_detail, pr_spec));
                 //最终刷选条件拼接成的sql

+ 3 - 3
UAS-MES/Main.cs

@@ -83,7 +83,7 @@ namespace UAS_MES
         private void Main_Load(object sender, EventArgs e)
         {
             //杀死全部未关闭的打印进程
-            string[] lines = System.IO.File.ReadAllLines(lblpath + @"\" + "lblprocess" + ".txt");
+            string[] lines = System.IO.File.ReadAllLines(SystemInf.CacheFolder+ "lblprocess.txt");
             foreach (string line in lines)
             {
                 if (line != "")
@@ -104,12 +104,12 @@ namespace UAS_MES
                         catch (Exception)
                         {
                         }
-                        FileStream fs = new FileStream(lblpath + @"\" + "lblprocess" + ".txt", FileMode.Open, FileAccess.Read);
+                        FileStream fs = new FileStream(SystemInf.CacheFolder+ "lblprocess.txt", FileMode.Open, FileAccess.Read);
                         StreamReader sr = new StreamReader(fs);
                         String s = sr.ReadToEnd();
                         sr.Close();
                         fs.Close();
-                        FileStream fas = new FileStream(lblpath + @"\" + "lblprocess" + ".txt", FileMode.Create, FileAccess.ReadWrite);
+                        FileStream fas = new FileStream(SystemInf.CacheFolder + "lblprocess.txt", FileMode.Create, FileAccess.ReadWrite);
                         StreamWriter sw = new StreamWriter(fas);
                         sw.Write(s.Replace(line+"\r\n",""));
                         sw.Flush();

+ 11 - 11
UAS-MES/Program.cs

@@ -4,6 +4,7 @@ using System.Security.Principal;
 using System.Text;
 using System.Windows.Forms;
 using System.Xml;
+using UAS_MES.Entity;
 using UAS_MES.PublicMethod;
 
 namespace UAS_MES
@@ -35,22 +36,21 @@ namespace UAS_MES
                 Application.AddMessageFilter(g);
                 //启用异常记录日志的操作
                 string sysdisc = Environment.GetEnvironmentVariable("windir").Substring(0, 1);
-                string lblpath = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\Log\cacheInfo";
                 //创建标签缓存的文件夹
                 if (!Directory.Exists(ftpOperater.DownLoadTo))
                     Directory.CreateDirectory(ftpOperater.DownLoadTo);
-                if (!Directory.Exists(sysdisc + @":\Log"))
-                    Directory.CreateDirectory(sysdisc + @":\Log");
-                FileStream fs = new FileStream(sysdisc + @":\Log\" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt", FileMode.OpenOrCreate, FileAccess.ReadWrite);
+                if (!Directory.Exists(SystemInf.LogFolder))
+                    Directory.CreateDirectory(SystemInf.LogFolder);
+                FileStream fs = new FileStream(SystemInf.LogFolder + DateTime.Now.ToString("yyyy-MM-dd") + ".txt", FileMode.OpenOrCreate, FileAccess.ReadWrite);
                 fs.Close();
                 //创建存储登录信息的文件
-                if (!Directory.Exists(sysdisc + @":\Log\cacheInfo"))
-                    Directory.CreateDirectory(sysdisc + @":\Log\cacheInfo");
-                FileStream fcaches = new FileStream(sysdisc + @":\Log\cacheInfo\cacheInfo.xml", FileMode.OpenOrCreate, FileAccess.ReadWrite);
+                if (!Directory.Exists(SystemInf.CacheFolder))
+                    Directory.CreateDirectory(SystemInf.CacheFolder);
+                FileStream fcaches = new FileStream(SystemInf.CacheFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
                 fcaches.Close();
                 //判断是否xml文件大小为0
-                FileInfo info = new FileInfo(sysdisc + @":\Log\cacheInfo\cacheInfo.xml");
-                if (info.Length==0)
+                FileInfo info = new FileInfo(SystemInf.CacheFilePath);
+                if (info.Length == 0)
                 {
                     XmlDocument doc = new XmlDocument();
                     //创建类型声明节点  
@@ -59,10 +59,10 @@ namespace UAS_MES
                     //创建根节点  
                     XmlElement xeRoot = doc.CreateElement("cacheInfo");
                     doc.AppendChild(xeRoot);
-                    doc.Save(Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\Log\cacheInfo\cacheInfo.xml");
+                    doc.Save(SystemInf.CacheFilePath);
                 }
                 //创建记录打印进程的文件
-                FileStream fas = new FileStream(lblpath + @"\" + "lblprocess" + ".txt", FileMode.OpenOrCreate, FileAccess.ReadWrite);
+                FileStream fas = new FileStream(SystemInf.CacheFolder + "lblprocess.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite);
                 fas.Close();
                 if (principal.IsInRole(WindowsBuiltInRole.Administrator))
                     Application.Run(new Login());

+ 1 - 1
UAS-MES/Properties/Settings.Designer.cs

@@ -109,7 +109,7 @@ namespace UAS_MES.Properties {
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("ftp://172.16.11.99/print/|uasmes|Administrator1@#")]
+        [global::System.Configuration.DefaultSettingValueAttribute("\\\\172.16.11.99\\ShareTest")]
         public string FTPAddress {
             get {
                 return ((string)(this["FTPAddress"]));

+ 1 - 1
UAS-MES/Properties/Settings.settings

@@ -24,7 +24,7 @@
       <Value Profile="(Default)" />
     </Setting>
     <Setting Name="FTPAddress" Type="System.String" Scope="User">
-      <Value Profile="(Default)">ftp://172.16.11.99/print/|uasmes|Administrator1@#</Value>
+      <Value Profile="(Default)">\\172.16.11.99\ShareTest</Value>
     </Setting>
     <Setting Name="MES" Type="System.String" Scope="Application">
       <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.230.200)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>

+ 4 - 5
UAS-MES/PublicMethod/BaseUtil.cs

@@ -987,8 +987,7 @@ namespace UAS_MES.PublicMethod
             }
             var temp = ProInf.Keys.Max();
             String str = SystemInf.ProcessesID + "|" + ProInf[temp];
-            string lblpath = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\Log\cacheInfo";
-            FileStream fs = new FileStream(lblpath + @"\" + "lblprocess" + ".txt", FileMode.Append, FileAccess.Write);
+            FileStream fs = new FileStream(SystemInf.CacheFolder + "lblprocess.txt", FileMode.Append, FileAccess.Write);
             StreamWriter sw = new StreamWriter(fs);
             sw.WriteLine(str, Encoding.UTF8);
             sw.Close();
@@ -1005,7 +1004,7 @@ namespace UAS_MES.PublicMethod
                 XmlReaderSettings settings = new XmlReaderSettings();
                 //忽略文档里面的注释
                 settings.IgnoreComments = true;
-                XmlReader reader = XmlReader.Create(Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\Log\cacheInfo\cacheInfo.xml", settings);
+                XmlReader reader = XmlReader.Create(SystemInf.CacheFilePath, settings);
                 doc.Load(reader);
                 //先得到根节点
                 XmlNode rootNode = doc.SelectSingleNode("cacheInfo");
@@ -1057,7 +1056,7 @@ namespace UAS_MES.PublicMethod
                 XmlReaderSettings settings = new XmlReaderSettings();
                 //忽略文档里面的注释
                 settings.IgnoreComments = true;
-                XmlReader reader = XmlReader.Create(Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\Log\cacheInfo\cacheInfo.xml", settings);
+                XmlReader reader = XmlReader.Create(SystemInf.CacheFilePath, settings);
                 doc.Load(reader);
                 //先得到根节点
                 XmlNode rootNode = doc.SelectSingleNode("cacheInfo");
@@ -1088,7 +1087,7 @@ namespace UAS_MES.PublicMethod
                 }
                 //关闭Reader
                 reader.Close();
-                doc.Save(Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\Log\cacheInfo\cacheInfo.xml");
+                doc.Save(SystemInf.CacheFilePath);
             }
             catch (Exception e)
             {

+ 2 - 1
UAS-MES/PublicMethod/LogManager.cs

@@ -1,11 +1,12 @@
 using System;
 using System.IO;
+using UAS_MES.Entity;
 
 namespace UAS_MES.PublicMethod
 {
     class LogManager
     {
-        public static string LogAddress = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\" + @"Log\";
+        public static string LogAddress = SystemInf.LogFolder;
         /// <summary>
         /// 记录操作
         /// </summary>

+ 9 - 8
UAS-MES/PublicMethod/ftpOperater.cs

@@ -14,6 +14,7 @@ namespace UAS_MES.PublicMethod
 
         public static string DownLoadTo = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\" + @"打印标签\";
 
+        private string FTPInf;
         private string ftpServerIP;
         private string ftpUser;
         private string ftpPwd;
@@ -21,14 +22,14 @@ namespace UAS_MES.PublicMethod
 
         public ftpOperater()
         {
-            string[] FTPInf = Properties.Settings.Default.Properties["FTPAddress"].DefaultValue.ToString().Split('|');
-            this.ftpServerIP = FTPInf[0];
-            this.ftpUser = FTPInf[1];
-            this.ftpPwd = FTPInf[2];
-          
-
+            //string[] FTPInf = Properties.Settings.Default.Properties["FTPAddress"].DefaultValue.ToString().Split('|');
+            //this.ftpServerIP = FTPInf[0];
+            //this.ftpUser = FTPInf[1];
+            //this.ftpPwd = FTPInf[2];
+             string FTPInf = Properties.Settings.Default.Properties["FTPAddress"].DefaultValue.ToString();
+           
             //连接共享文件夹
-            status = BaseUtil.connectState(BaseUtil.GetCacheData("SavePath").ToString(), "Administrator", "malata@123456");
+            status = BaseUtil.connectState(FTPInf, "Administrator", "malata@123456");
 
         }
         #region
@@ -273,7 +274,7 @@ namespace UAS_MES.PublicMethod
         public string DownLoadFromSharePath(string URL,string fileName)
         {
             //目标路径
-            string targetPath = BaseUtil.GetCacheData("SavePath").ToString();
+            string targetPath = FTPInf;
             //var file = Directory.GetFiles(targetPath);
             string sourceFile = Path.Combine(URL);
             string destFile = Path.Combine(DownLoadTo, fileName);

+ 1 - 1
UAS_MesInterface(4.0)/MesHelper.cs

@@ -7,7 +7,7 @@ using System.Text;
 
 namespace BenQGuru.eMES.DLLService
 {
-
+     
     [Guid("99D0E96E-1058-415D-9874-D34537625284")]
     [InterfaceType(ComInterfaceType.InterfaceIsDual)]
     public interface IMESHelper

+ 1 - 1
UAS_MesInterface(4.0)/Properties/AssemblyInfo.cs

@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("UAS_MesInterface(4.0)")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany("深圳市优软科技有限公司")]
 [assembly: AssemblyProduct("UAS_MesInterface(4.0)")]
 [assembly: AssemblyCopyright("Copyright ©  2017")]
 [assembly: AssemblyTrademark("")]

+ 58 - 0
UAS_MesInterface(4.0)/UAS_MesInterface(4.0).csproj

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{A35F767D-0858-4061-AF7C-C5C594034668}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>BenQGuru.eMES.DLLService</RootNamespace>
+    <AssemblyName>BenQGuru.eMES.DLLService</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <RegisterForComInterop>true</RegisterForComInterop>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Oracle.ManagedDataAccess">
+      <HintPath>tool\Oracle.ManagedDataAccess.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Data.OracleClient" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="MesHelper.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>