Browse Source

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

章政 8 years ago
parent
commit
a4737d6c43

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

@@ -171,7 +171,7 @@ namespace UAS_MES.Make
                                         else
                                         //不为空,进行过转换。不勾选修改结果,就不能再修改
                                         {
-                                            OperateResult.AppendText(">>序列号" + code.Text + "错误,或者已经转换过\n", Color.Red);
+                                            OperateResult.AppendText(">>序列号" + code.Text + "已经转换过\n", Color.Red);
                                             code.Text = "";
                                             OperateResult.AppendText("<<请重新输入TSN\n", Color.Black);
                                         }
@@ -193,7 +193,7 @@ namespace UAS_MES.Make
                         {
                             OperateResult.AppendText(">>" + code.Text + "\n", Color.Black);
                             //开始录入SN
-                            if (ChangeResult.Checked||!dh.CheckExist("makeserial", "ms_sncode='" + code.Text + "'"))
+                            if ((ChangeResult.Checked && dh.CheckExist("makeserial", "ms_sncode='" + code.Text + "' and ms_id='"+oMsid+"'"))||!dh.CheckExist("makeserial", "ms_sncode='" + code.Text + "'"))
                             {
                                 //判断用户是否锁定输入SN长度,
                                 if (!checkLengthOrPre(SNLength_checkBox, SNLength, "长度", "SN"))
@@ -381,7 +381,7 @@ namespace UAS_MES.Make
             {
                 //校验已经完成,此时要再次校验之前的SN和关联采集信息
                 //再次校验SN
-                if (!dh.CheckExist("makeserial", "ms_sncode='" + SN + "'"))
+                if ((ChangeResult.Checked && dh.CheckExist("makeserial", "ms_sncode='" + SN + "' and ms_id='" + oMsid + "'"))||!dh.CheckExist("makeserial", "ms_sncode='" + SN + "'"))
                 {
                     bool flag = true;
                     if (!ChangeResult.Checked)
@@ -610,7 +610,7 @@ namespace UAS_MES.Make
             else
             {
                 //十六进制
-                if (int.Parse(code.Text.Substring(SNPre.Text.Length)) >= int.Parse(startNo, System.Globalization.NumberStyles.HexNumber) && int.Parse(code.Text.Substring(SNPre.Text.Length)) <= int.Parse(endNo, System.Globalization.NumberStyles.HexNumber))
+                if (int.Parse(code.Text.Substring(SNPre.Text.Length), System.Globalization.NumberStyles.HexNumber) >= int.Parse(startNo, System.Globalization.NumberStyles.HexNumber) && int.Parse(code.Text.Substring(SNPre.Text.Length), System.Globalization.NumberStyles.HexNumber) <= int.Parse(endNo, System.Globalization.NumberStyles.HexNumber))
                 {
                     //满足
                     return true;

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

@@ -469,7 +469,7 @@ namespace UAS_MES.Make
             else
             {
                 //十六进制
-                if (int.Parse(sncode.Text.Substring(afterTransSNPre.Text.Length)) >= int.Parse(startNo, System.Globalization.NumberStyles.HexNumber) && int.Parse(sncode.Text.Substring(afterTransSNPre.Text.Length)) <= int.Parse(endNo, System.Globalization.NumberStyles.HexNumber))
+                if (int.Parse(sncode.Text.Substring(afterTransSNPre.Text.Length), System.Globalization.NumberStyles.HexNumber) >= int.Parse(startNo, System.Globalization.NumberStyles.HexNumber) && int.Parse(sncode.Text.Substring(afterTransSNPre.Text.Length), System.Globalization.NumberStyles.HexNumber) <= int.Parse(endNo, System.Globalization.NumberStyles.HexNumber))
                 {
                     //满足
                     return true;

+ 51 - 46
UAS-MES/FunctionCode/Query/Query_ExeProgress.Designer.cs

@@ -48,6 +48,8 @@
             this.mp_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ma_craftcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.sc_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_inman = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.em_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
@@ -60,10 +62,9 @@
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(13, 14);
-            this.sn_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.sn_code_label.Location = new System.Drawing.Point(10, 11);
             this.sn_code_label.Name = "sn_code_label";
-            this.sn_code_label.Size = new System.Drawing.Size(72, 27);
+            this.sn_code_label.Size = new System.Drawing.Size(58, 21);
             this.sn_code_label.TabIndex = 183;
             this.sn_code_label.Text = "序列号";
             // 
@@ -72,10 +73,10 @@
             this.SerialPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.SerialPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.SerialPanel.Location = new System.Drawing.Point(19, 134);
-            this.SerialPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.SerialPanel.Location = new System.Drawing.Point(14, 107);
+            this.SerialPanel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.SerialPanel.Name = "SerialPanel";
-            this.SerialPanel.Size = new System.Drawing.Size(1265, 316);
+            this.SerialPanel.Size = new System.Drawing.Size(950, 254);
             this.SerialPanel.TabIndex = 194;
             this.SerialPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.SerialPanel_Paint);
             // 
@@ -91,12 +92,14 @@
             this.mp_sourcecode,
             this.mp_indate,
             this.ma_craftcode,
-            this.sc_linecode});
-            this.CraftInfDgv.Location = new System.Drawing.Point(0, 485);
-            this.CraftInfDgv.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.sc_linecode,
+            this.mp_inman,
+            this.em_name});
+            this.CraftInfDgv.Location = new System.Drawing.Point(0, 388);
+            this.CraftInfDgv.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.CraftInfDgv.Name = "CraftInfDgv";
             this.CraftInfDgv.RowTemplate.Height = 27;
-            this.CraftInfDgv.Size = new System.Drawing.Size(1300, 238);
+            this.CraftInfDgv.Size = new System.Drawing.Size(975, 190);
             this.CraftInfDgv.TabIndex = 193;
             // 
             // groupBoxWithBorder1
@@ -113,11 +116,9 @@
             this.groupBoxWithBorder1.Controls.Add(this.label2);
             this.groupBoxWithBorder1.Controls.Add(this.label3);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(16, 50);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(12, 40);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1271, 50);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(953, 40);
             this.groupBoxWithBorder1.TabIndex = 192;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "颜色说明";
@@ -127,30 +128,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(1129, 17);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(848, 14);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
+            this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 193;
             this.label1.Text = "尚未执行";
             // 
             // pictureBox4
             // 
             this.pictureBox4.BackColor = System.Drawing.Color.White;
-            this.pictureBox4.Location = new System.Drawing.Point(1034, 15);
-            this.pictureBox4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pictureBox4.Location = new System.Drawing.Point(776, 12);
             this.pictureBox4.Name = "pictureBox4";
-            this.pictureBox4.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox4.Size = new System.Drawing.Size(60, 20);
             this.pictureBox4.TabIndex = 192;
             this.pictureBox4.TabStop = false;
             // 
             // pictureBox2
             // 
             this.pictureBox2.BackColor = System.Drawing.Color.Green;
-            this.pictureBox2.Location = new System.Drawing.Point(132, 15);
-            this.pictureBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pictureBox2.Location = new System.Drawing.Point(99, 12);
             this.pictureBox2.Name = "pictureBox2";
-            this.pictureBox2.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox2.Size = new System.Drawing.Size(60, 20);
             this.pictureBox2.TabIndex = 187;
             this.pictureBox2.TabStop = false;
             // 
@@ -158,30 +156,27 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(870, 17);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Location = new System.Drawing.Point(653, 14);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(72, 27);
+            this.label4.Size = new System.Drawing.Size(58, 21);
             this.label4.TabIndex = 191;
             this.label4.Text = "已报废";
             // 
             // pictureBox1
             // 
             this.pictureBox1.BackColor = System.Drawing.Color.Red;
-            this.pictureBox1.Location = new System.Drawing.Point(451, 15);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pictureBox1.Location = new System.Drawing.Point(338, 12);
             this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox1.Size = new System.Drawing.Size(60, 20);
             this.pictureBox1.TabIndex = 186;
             this.pictureBox1.TabStop = false;
             // 
             // pictureBox3
             // 
             this.pictureBox3.BackColor = System.Drawing.Color.Black;
-            this.pictureBox3.Location = new System.Drawing.Point(775, 15);
-            this.pictureBox3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pictureBox3.Location = new System.Drawing.Point(581, 12);
             this.pictureBox3.Name = "pictureBox3";
-            this.pictureBox3.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox3.Size = new System.Drawing.Size(60, 20);
             this.pictureBox3.TabIndex = 190;
             this.pictureBox3.TabStop = false;
             // 
@@ -189,10 +184,9 @@
             // 
             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(227, 17);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(171, 14);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(152, 27);
+            this.label2.Size = new System.Drawing.Size(122, 21);
             this.label2.TabIndex = 188;
             this.label2.Text = "已执行且为良品";
             // 
@@ -200,10 +194,9 @@
             // 
             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(546, 17);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(410, 14);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(172, 27);
+            this.label3.Size = new System.Drawing.Size(138, 21);
             this.label3.TabIndex = 189;
             this.label3.Text = "已执行且为不良品";
             // 
@@ -212,11 +205,10 @@
             this.sn_code.AllPower = null;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(123, 16);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.sn_code.Location = new System.Drawing.Point(92, 13);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(192, 25);
+            this.sn_code.Size = new System.Drawing.Size(145, 21);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -273,31 +265,42 @@
             this.sc_linecode.Name = "sc_linecode";
             this.sc_linecode.Width = 120;
             // 
+            // mp_inman
+            // 
+            this.mp_inman.DataPropertyName = "mp_inman";
+            this.mp_inman.HeaderText = "人员工号";
+            this.mp_inman.Name = "mp_inman";
+            // 
+            // em_name
+            // 
+            this.em_name.DataPropertyName = "em_name";
+            this.em_name.HeaderText = "人员姓名";
+            this.em_name.Name = "em_name";
+            // 
             // Query_ExeProgress
             // 
-            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(1300, 722);
+            this.ClientSize = new System.Drawing.Size(975, 578);
             this.Controls.Add(this.SerialPanel);
             this.Controls.Add(this.CraftInfDgv);
             this.Controls.Add(this.groupBoxWithBorder1);
             this.Controls.Add(this.sn_code);
             this.Controls.Add(this.sn_code_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Query_ExeProgress";
             this.Tag = "Query!ExeProgress";
             this.Text = "工单执行进度";
             this.Load += new System.EventHandler(this.工单执行进度_Load);
             this.SizeChanged += new System.EventHandler(this.工单执行进度_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).EndInit();
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -323,5 +326,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_indate;
         private System.Windows.Forms.DataGridViewTextBoxColumn ma_craftcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn sc_linecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mp_inman;
+        private System.Windows.Forms.DataGridViewTextBoxColumn em_name;
     }
 }

+ 1 - 1
UAS-MES/FunctionCode/Query/Query_ExeProgress.cs

@@ -179,7 +179,7 @@ namespace UAS_MES.Query
                     SerialPanel.Refresh();
                     sql.Clear();
                     sql.Append("select mp_makecode,ma_prodcode,sc_linecode,ma_craftcode,mp_sourcecode,mp_sncode,");
-                    sql.Append("mp_indate from makeprocess left join make on mp_makecode=ma_code left join source on ");
+                    sql.Append("mp_indate,mp_inman,em_name from makeprocess left join make on mp_makecode=ma_code left join employee on mp_inman = em_code left join source on ");
                     sql.Append("mp_sourcecode=sc_code where mp_sncode='" + sn_code.Text + "'");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     BaseUtil.FillDgvWithDataTable(CraftInfDgv, dt);

+ 6 - 0
UAS-MES/FunctionCode/Query/Query_ExeProgress.resx

@@ -138,4 +138,10 @@
   <metadata name="sc_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="mp_inman.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="em_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 9 - 0
UAS-MES/UAS-MES.csproj

@@ -501,6 +501,12 @@
     <Compile Include="FunctionCode\Make\Make_NewPallet.Designer.cs">
       <DependentUpon>Make_NewPallet.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_PackageCollectionWeigh.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_PackageCollectionWeigh.Designer.cs">
+      <DependentUpon>Make_PackageCollectionWeigh.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_PalletCollection.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -997,6 +1003,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_NewPallet.resx">
       <DependentUpon>Make_NewPallet.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_PackageCollectionWeigh.resx">
+      <DependentUpon>Make_PackageCollectionWeigh.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_PalletCollection.resx">
       <DependentUpon>Make_PalletCollection.cs</DependentUpon>
     </EmbeddedResource>