浏览代码

送检获取信息修改

章政 7 年之前
父节点
当前提交
adcf90582a

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

@@ -112,6 +112,7 @@ namespace UAS_MES.Make
                             OperateResult.AppendText(">>序列号" + sncode.Text + "所属订单号" + ma_salecode_text + "与界面订单号" + ma_salecode.Text + "不同,无法采集\n", Color.Red, sncode);
                             return;
                         }
+                        ma_salecode.Text= dt.Rows[0]["ma_salecode"].ToString();
                         BaseUtil.SetFormValue(this.Controls, dt);
                         if (Weight - MinWeight == MaxWeight - Weight)
                             pr_colorboxgw.Text = Weight + "±" + (MaxWeight - Weight) + dt.Rows[0]["pr_colorboxunit"].ToString();

+ 15 - 2
UAS-MES/FunctionCode/OQC/OQC_Inspection.Designer.cs

@@ -62,6 +62,7 @@
             this.obd_outboxcode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.obd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.obd_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ob_source = new System.Windows.Forms.Label();
             this.panel2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.CheckBatchDGV)).BeginInit();
             this.SuspendLayout();
@@ -512,11 +513,22 @@
             this.obd_makecode.ReadOnly = true;
             this.obd_makecode.Width = 215;
             // 
+            // ob_source
+            // 
+            this.ob_source.AutoSize = true;
+            this.ob_source.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_source.Location = new System.Drawing.Point(694, 68);
+            this.ob_source.Name = "ob_source";
+            this.ob_source.Size = new System.Drawing.Size(0, 21);
+            this.ob_source.TabIndex = 177;
+            this.ob_source.Visible = false;
+            // 
             // OQC_Inspection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(915, 600);
+            this.Controls.Add(this.ob_source);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.ChooseAll);
             this.Controls.Add(this.OperateResult);
@@ -551,10 +563,10 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OQC_Inspection_FormClosing);
             this.Load += new System.EventHandler(this.生成送检批_Load);
             this.SizeChanged += new System.EventHandler(this.生成送检批_SizeChanged);
-            this.panel2.ResumeLayout(false);
+            this.panel2.ResumeLayout(true);
             this.panel2.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.CheckBatchDGV)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }
@@ -594,5 +606,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn obd_outboxcode_dgv;
         private System.Windows.Forms.DataGridViewTextBoxColumn obd_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn obd_makecode;
+        private System.Windows.Forms.Label ob_source;
     }
 }

+ 27 - 0
UAS-MES/FunctionCode/OQC/OQC_Inspection.cs

@@ -176,6 +176,11 @@ namespace UAS_MES.OQC
         /// <param name="e"></param>
         private void ChooseAll_Click(object sender, EventArgs e)
         {
+            if (!CheckNoSourceCheck())
+            {
+                OperateResult.AppendText(">>自动生成的批次只允许点击送检\n", Color.Red);
+                return;
+            }
             for (int i = 0; i < CheckBatchDGV.Rows.Count; i++)
             {
                 if (CheckBatchDGV.Rows[i].Cells[0] is DataGridViewCheckBoxCell)
@@ -194,6 +199,11 @@ namespace UAS_MES.OQC
 
         private void RemoveAll_Click(object sender, EventArgs e)
         {
+            if (!CheckNoSourceCheck())
+            {
+                OperateResult.AppendText(">>自动生成的批次只允许点击送检\n", Color.Red);
+                return;
+            }
             if (CheckBatchDGV.Rows.Count > 0)
             {
                 if (MessageBox.Show(this.ParentForm, "确认移除全部箱号?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString() == "Yes")
@@ -231,6 +241,11 @@ namespace UAS_MES.OQC
         /// <param name="e"></param>
         private void Delete_Click(object sender, EventArgs e)
         {
+            if (!CheckNoSourceCheck())
+            {
+                OperateResult.AppendText(">>自动生成的批次只允许点击送检\n", Color.Red);
+                return;
+            }
             if (dh.CheckExist("OQCBatch", "ob_checkno='" + ob_checkno.Text + "'") && ob_status.Text == "在录入")
             {
                 dh.ExecuteSql("delete from OQCBatch where ob_checkno='" + ob_checkno.Text + "'", "delete");
@@ -290,5 +305,17 @@ namespace UAS_MES.OQC
         {
             dh.Dispose();
         }
+
+        private bool CheckNoSourceCheck()
+        {
+            if (ob_source.Text != "")
+            {
+                if (ob_source.Text == "工序")
+                {
+                    return false;
+                }
+            }
+            return true;
+        }
     }
 }

+ 15 - 0
UAS-MES/FunctionCode/OQC/OQC_Inspection.resx

@@ -1050,4 +1050,19 @@
   <metadata name="obd_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="勾选.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="obd_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="obd_outboxcode_dgv.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="obd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="obd_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>