Jelajahi Sumber

按照工装篮过站

callm 2 minggu lalu
induk
melakukan
18bdc4a0d6

+ 46 - 61
UAS_MES_XMW/FunctionCode/Make/Make_BoxStepPass.Designer.cs

@@ -33,14 +33,12 @@
             this.pr_code_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
             this.LabelDataGridView = new System.Windows.Forms.DataGridView();
-            this.quxiao = new System.Windows.Forms.CheckBox();
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.ma_wccode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ma_craftcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.agsum = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
@@ -48,7 +46,8 @@
             this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
-            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ms_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ms_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
@@ -118,18 +117,6 @@
             this.LabelDataGridView.Size = new System.Drawing.Size(1131, 609);
             this.LabelDataGridView.TabIndex = 200;
             // 
-            // quxiao
-            // 
-            this.quxiao.AutoSize = true;
-            this.quxiao.Location = new System.Drawing.Point(656, 856);
-            this.quxiao.Margin = new System.Windows.Forms.Padding(4);
-            this.quxiao.Name = "quxiao";
-            this.quxiao.Size = new System.Drawing.Size(138, 28);
-            this.quxiao.TabIndex = 204;
-            this.quxiao.Text = "取消采集";
-            this.quxiao.UseVisualStyleBackColor = true;
-            this.quxiao.Visible = false;
-            // 
             // label2
             // 
             this.label2.AutoSize = true;
@@ -145,7 +132,7 @@
             // 
             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(472, 88);
+            this.label3.Location = new System.Drawing.Point(472, 91);
             this.label3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(146, 41);
@@ -156,7 +143,7 @@
             // 
             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(13, 91);
+            this.label4.Location = new System.Drawing.Point(14, 91);
             this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(146, 41);
@@ -181,31 +168,33 @@
             this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
             this.dataGridViewTextBoxColumn2.Width = 200;
             // 
-            // dataGridViewTextBoxColumn3
-            // 
-            this.dataGridViewTextBoxColumn3.DataPropertyName = "BI_PRODUCTSPECNAME";
-            this.dataGridViewTextBoxColumn3.HeaderText = "产品名称";
-            this.dataGridViewTextBoxColumn3.MinimumWidth = 10;
-            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
-            this.dataGridViewTextBoxColumn3.ReadOnly = true;
-            this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn3.Width = 200;
-            // 
-            // dataGridViewTextBoxColumn4
+            // ma_code
             // 
-            this.dataGridViewTextBoxColumn4.DataPropertyName = "BI_UPDATETIME";
-            this.dataGridViewTextBoxColumn4.HeaderText = "更新时间";
-            this.dataGridViewTextBoxColumn4.MinimumWidth = 300;
-            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
-            this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn4.Width = 300;
+            this.ma_code.AllPower = "IFALL";
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = "";
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(142, 24);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = "";
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(319, 46);
+            this.ma_code.TabIndex = 235;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "makecode";
+            this.ma_code.TextBoxEnable = true;
             // 
             // ma_wccode
             // 
             this.ma_wccode.AutoSize = true;
             this.ma_wccode.CutLength = null;
             this.ma_wccode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_wccode.Location = new System.Drawing.Point(169, 88);
+            this.ma_wccode.Location = new System.Drawing.Point(194, 91);
             this.ma_wccode.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.ma_wccode.MaximumSize = new System.Drawing.Size(400, 0);
             this.ma_wccode.Name = "ma_wccode";
@@ -217,7 +206,7 @@
             this.ma_craftcode.AutoSize = true;
             this.ma_craftcode.CutLength = null;
             this.ma_craftcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_craftcode.Location = new System.Drawing.Point(636, 88);
+            this.ma_craftcode.Location = new System.Drawing.Point(652, 91);
             this.ma_craftcode.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.ma_craftcode.MaximumSize = new System.Drawing.Size(400, 0);
             this.ma_craftcode.Name = "ma_craftcode";
@@ -289,32 +278,30 @@
             this.OperateResult.TabIndex = 188;
             this.OperateResult.Text = "";
             // 
-            // ma_code
+            // dataGridViewTextBoxColumn3
             // 
-            this.ma_code.AllPower = "IFALL";
-            this.ma_code.Caller = null;
-            this.ma_code.Condition = null;
-            this.ma_code.DBTitle = "";
-            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(169, 24);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
-            this.ma_code.Name = "ma_code";
-            this.ma_code.Power = "";
-            this.ma_code.ReturnData = null;
-            this.ma_code.SelectField = null;
-            this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(319, 46);
-            this.ma_code.TabIndex = 235;
-            this.ma_code.TableName = null;
-            this.ma_code.Tag = "makecode";
-            this.ma_code.TextBoxEnable = true;
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "BI_PRODUCTSPECNAME";
+            this.dataGridViewTextBoxColumn3.HeaderText = "产品名称";
+            this.dataGridViewTextBoxColumn3.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.ReadOnly = true;
+            this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn3.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "BI_UPDATETIME";
+            this.dataGridViewTextBoxColumn4.HeaderText = "更新时间";
+            this.dataGridViewTextBoxColumn4.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn4.Width = 300;
             // 
             // ms_sncode
             // 
             this.ms_sncode.DataPropertyName = "ms_sncode";
             this.ms_sncode.HeaderText = "SN";
-            this.ms_sncode.MinimumWidth = 10;
+            this.ms_sncode.MinimumWidth = 200;
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.ReadOnly = true;
             this.ms_sncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
@@ -323,8 +310,8 @@
             // ms_lotno
             // 
             this.ms_lotno.DataPropertyName = "ms_lotno";
-            this.ms_lotno.HeaderText = "LotNO";
-            this.ms_lotno.MinimumWidth = 10;
+            this.ms_lotno.HeaderText = "LotNo";
+            this.ms_lotno.MinimumWidth = 200;
             this.ms_lotno.Name = "ms_lotno";
             this.ms_lotno.Width = 200;
             // 
@@ -340,7 +327,6 @@
             this.Controls.Add(this.label3);
             this.Controls.Add(this.agsum);
             this.Controls.Add(this.label2);
-            this.Controls.Add(this.quxiao);
             this.Controls.Add(this.LabelDataGridView);
             this.Controls.Add(this.pr_code);
             this.Controls.Add(this.pr_detail);
@@ -374,7 +360,6 @@
         private System.Windows.Forms.Label pr_code_label;
         private System.Windows.Forms.Label ms_makecode_label;
         private System.Windows.Forms.DataGridView LabelDataGridView;
-        private System.Windows.Forms.CheckBox quxiao;
         private CustomControl.ValueLabel.ValueLabel agsum;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;

+ 17 - 9
UAS_MES_XMW/FunctionCode/Make/Make_BoxStepPass.cs

@@ -19,6 +19,8 @@ namespace UAS_MES_NEW.Make
 
         DataTable dt;
 
+        string ErrorMessage;
+
         public Make_BoxStepPass()
         {
             InitializeComponent();
@@ -50,23 +52,29 @@ namespace UAS_MES_NEW.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                if (ma_code.Text == "")
+                DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode,ms_sncode,ms_lotno,ms_nextstepcode from makeserial where ms_boxcode='" + sncode.Text + "'", "select");
+                if (dt.Rows.Count == 0)
                 {
-                    OperateResult.AppendText(">>工单号不能为空\n", Color.Red);
+                    OperateResult.AppendText(">>工装篮" + sncode.Text + "不存在或者未绑定条码\n", Color.Red);
                     return;
                 }
-                DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_lotno from makeserial where ms_boxcode='" + sncode.Text + "'", "select");
-                if (dt.Rows.Count == 0)
+                string ms_nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
+                string ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
+                if (ms_nextstepcode != User.CurrentStepCode)
                 {
-                    OperateResult.AppendText(">>工装篮" + sncode.Text + "不存在或者未绑定条码\n", Color.Red);
+                    OperateResult.AppendText(">>工装篮" + sncode.Text + "下一工序" + ms_nextstepcode + ",当前资源不允许采集\n", Color.Red);
                     return;
                 }
                 BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt);
                 agsum.Text = dt.Rows.Count.ToString();
-                sncode.Focus();
-
-
-
+                if (LogicHandler.LotStepPass(sncode.Text, ma_code.Text, User.UserSourceCode, User.UserCode, "OK", "", out ErrorMessage))
+                {
+                    OperateResult.AppendText(">>工装篮" + sncode.Text + "过站成功\n", Color.Green);
+                }
+                else
+                {
+                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                }
             }
         }
 

+ 3 - 3
UAS_MES_XMW/PublicMethod/LogicHandler.cs

@@ -694,11 +694,11 @@ namespace UAS_MES_NEW.PublicMethod
                 return false;
         }
 
-        public static bool LotStepPass(string iLotNo, string iMakeCode, string iSourceCode, string iUserCode, string iResult, string iBoxType, out string oErrorMessage)
+        public static bool LotStepPass(string iBoxCode, string iMakeCode, string iSourceCode, string iUserCode, string iResult, string iBoxType, out string oErrorMessage)
         {
             oErrorMessage = "";
-            string[] param = new string[] { iLotNo, iMakeCode, iSourceCode, iUserCode, iResult, iBoxType, oErrorMessage };
-            dh.CallProcedure("LOTSTEPRESULT", ref param);
+            string[] param = new string[] { iBoxCode, iMakeCode, iSourceCode, iUserCode, iResult, iBoxType, oErrorMessage };
+            dh.CallProcedure("CS_LOTSTEPRESULT", ref param);
             oErrorMessage = param[6];
             if (oErrorMessage == "" || oErrorMessage == null || oErrorMessage == "null")
                 return true;

+ 9 - 0
UAS_MES_XMW/UAS_MES_XMW.csproj

@@ -551,6 +551,12 @@
     <Compile Include="FunctionCode\Employee\Employee_PowerSarch.Designer.cs">
       <DependentUpon>Employee_PowerSarch.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_BoxStepPass.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_BoxStepPass.Designer.cs">
+      <DependentUpon>Make_BoxStepPass.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_BoxLotBind.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1567,6 +1573,9 @@
     <EmbeddedResource Include="FunctionCode\Employee\Employee_PowerSarch.resx">
       <DependentUpon>Employee_PowerSarch.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_BoxStepPass.resx">
+      <DependentUpon>Make_BoxStepPass.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_BoxLotBind.resx">
       <DependentUpon>Make_BoxLotBind.cs</DependentUpon>
     </EmbeddedResource>