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

优化出货条码核对和oqc抽样采集

yhluo 1 өдөр өмнө
parent
commit
89c9b4c090

+ 102 - 23
UAS_MES_YTDZ/FunctionCode/Make/Make_ShipmentVerify.Designer.cs

@@ -37,10 +37,14 @@
             this.claerBtn = new System.Windows.Forms.Button();
             this.Delete = new System.Windows.Forms.Button();
             this.Confirm = new System.Windows.Forms.Button();
+            this.buttonRow = new System.Windows.Forms.FlowLayoutPanel();
             this.BoxQtyVal = new System.Windows.Forms.TextBox();
             this.BoxQtyLab = new System.Windows.Forms.Label();
             this.PanelQtyVal = new System.Windows.Forms.TextBox();
             this.PanelQtyLab = new System.Windows.Forms.Label();
+            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.makeLab = new System.Windows.Forms.Label();
             this.snLab = new System.Windows.Forms.Label();
             this.snVal = new System.Windows.Forms.TextBox();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
@@ -80,6 +84,7 @@
             this.tableLayoutPanel2.SuspendLayout();
             this.tableLayoutPanel3.SuspendLayout();
             this.panel1.SuspendLayout();
+            this.buttonRow.SuspendLayout();
             this.groupBox1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgv)).BeginInit();
             this.SNDetails.SuspendLayout();
@@ -121,8 +126,8 @@
             this.tableLayoutPanel3.Location = new System.Drawing.Point(771, 3);
             this.tableLayoutPanel3.Name = "tableLayoutPanel3";
             this.tableLayoutPanel3.RowCount = 2;
-            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F));
-            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 60F));
+            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 210F));
+            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
             this.tableLayoutPanel3.Size = new System.Drawing.Size(506, 591);
             this.tableLayoutPanel3.TabIndex = 2;
             // 
@@ -139,29 +144,46 @@
             // 
             // panel1
             // 
-            this.panel1.Controls.Add(this.boxResetBtn);
-            this.panel1.Controls.Add(this.claerBtn);
-            this.panel1.Controls.Add(this.Delete);
-            this.panel1.Controls.Add(this.Confirm);
+            this.panel1.Controls.Add(this.buttonRow);
+            this.panel1.Controls.Add(this.LockMakeCode);
+            this.panel1.Controls.Add(this.ma_code);
+            this.panel1.Controls.Add(this.makeLab);
             this.panel1.Controls.Add(this.BoxQtyVal);
             this.panel1.Controls.Add(this.BoxQtyLab);
             this.panel1.Controls.Add(this.PanelQtyVal);
             this.panel1.Controls.Add(this.PanelQtyLab);
             this.panel1.Controls.Add(this.snLab);
             this.panel1.Controls.Add(this.snVal);
+            this.panel1.AutoScroll = true;
             this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.panel1.Location = new System.Drawing.Point(3, 3);
             this.panel1.Name = "panel1";
             this.panel1.Size = new System.Drawing.Size(500, 230);
             this.panel1.TabIndex = 1;
             // 
+            // buttonRow
+            // 
+            this.buttonRow.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.buttonRow.Controls.Add(this.Confirm);
+            this.buttonRow.Controls.Add(this.Delete);
+            this.buttonRow.Controls.Add(this.claerBtn);
+            this.buttonRow.Controls.Add(this.boxResetBtn);
+            this.buttonRow.Location = new System.Drawing.Point(8, 122);
+            this.buttonRow.Margin = new System.Windows.Forms.Padding(0);
+            this.buttonRow.Name = "buttonRow";
+            this.buttonRow.Size = new System.Drawing.Size(484, 76);
+            this.buttonRow.TabIndex = 27;
+            this.buttonRow.WrapContents = true;
+            // 
             // boxResetBtn
             // 
             this.boxResetBtn.Cursor = System.Windows.Forms.Cursors.Hand;
             this.boxResetBtn.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.boxResetBtn.Location = new System.Drawing.Point(364, 182);
+            this.boxResetBtn.Location = new System.Drawing.Point(246, 3);
+            this.boxResetBtn.Margin = new System.Windows.Forms.Padding(3);
             this.boxResetBtn.Name = "boxResetBtn";
-            this.boxResetBtn.Size = new System.Drawing.Size(120, 35);
+            this.boxResetBtn.Size = new System.Drawing.Size(96, 32);
             this.boxResetBtn.TabIndex = 23;
             this.boxResetBtn.Text = "容量归零";
             this.boxResetBtn.UseVisualStyleBackColor = true;
@@ -171,9 +193,10 @@
             // 
             this.claerBtn.Cursor = System.Windows.Forms.Cursors.Hand;
             this.claerBtn.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.claerBtn.Location = new System.Drawing.Point(246, 182);
+            this.claerBtn.Location = new System.Drawing.Point(147, 3);
+            this.claerBtn.Margin = new System.Windows.Forms.Padding(3);
             this.claerBtn.Name = "claerBtn";
-            this.claerBtn.Size = new System.Drawing.Size(110, 35);
+            this.claerBtn.Size = new System.Drawing.Size(96, 32);
             this.claerBtn.TabIndex = 21;
             this.claerBtn.Text = "清除提示";
             this.claerBtn.UseVisualStyleBackColor = true;
@@ -182,9 +205,10 @@
             // Delete
             // 
             this.Delete.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.Delete.Location = new System.Drawing.Point(174, 182);
+            this.Delete.Location = new System.Drawing.Point(77, 3);
+            this.Delete.Margin = new System.Windows.Forms.Padding(3);
             this.Delete.Name = "Delete";
-            this.Delete.Size = new System.Drawing.Size(64, 32);
+            this.Delete.Size = new System.Drawing.Size(68, 32);
             this.Delete.TabIndex = 20;
             this.Delete.Text = "删除";
             this.Delete.UseVisualStyleBackColor = true;
@@ -193,9 +217,10 @@
             // Confirm
             // 
             this.Confirm.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.Confirm.Location = new System.Drawing.Point(90, 182);
+            this.Confirm.Location = new System.Drawing.Point(3, 3);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(3);
             this.Confirm.Name = "Confirm";
-            this.Confirm.Size = new System.Drawing.Size(76, 32);
+            this.Confirm.Size = new System.Drawing.Size(68, 32);
             this.Confirm.TabIndex = 19;
             this.Confirm.Text = "确认";
             this.Confirm.UseVisualStyleBackColor = true;
@@ -204,16 +229,16 @@
             // PanelQtyVal
             // 
             this.PanelQtyVal.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PanelQtyVal.Location = new System.Drawing.Point(90, 30);
+            this.PanelQtyVal.Location = new System.Drawing.Point(78, 46);
             this.PanelQtyVal.Name = "PanelQtyVal";
-            this.PanelQtyVal.Size = new System.Drawing.Size(64, 31);
+            this.PanelQtyVal.Size = new System.Drawing.Size(56, 31);
             this.PanelQtyVal.TabIndex = 18;
             // 
             // BoxQtyLab
             // 
             this.BoxQtyLab.AutoSize = true;
             this.BoxQtyLab.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BoxQtyLab.Location = new System.Drawing.Point(168, 30);
+            this.BoxQtyLab.Location = new System.Drawing.Point(146, 48);
             this.BoxQtyLab.Name = "BoxQtyLab";
             this.BoxQtyLab.Size = new System.Drawing.Size(128, 27);
             this.BoxQtyLab.TabIndex = 22;
@@ -222,9 +247,9 @@
             // BoxQtyVal
             // 
             this.BoxQtyVal.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BoxQtyVal.Location = new System.Drawing.Point(300, 30);
+            this.BoxQtyVal.Location = new System.Drawing.Point(268, 46);
             this.BoxQtyVal.Name = "BoxQtyVal";
-            this.BoxQtyVal.Size = new System.Drawing.Size(64, 31);
+            this.BoxQtyVal.Size = new System.Drawing.Size(56, 31);
             this.BoxQtyVal.TabIndex = 23;
             this.BoxQtyVal.Text = "0";
             // 
@@ -232,17 +257,64 @@
             // 
             this.PanelQtyLab.AutoSize = true;
             this.PanelQtyLab.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PanelQtyLab.Location = new System.Drawing.Point(14, 30);
+            this.PanelQtyLab.Location = new System.Drawing.Point(8, 48);
             this.PanelQtyLab.Name = "PanelQtyLab";
             this.PanelQtyLab.Size = new System.Drawing.Size(92, 27);
             this.PanelQtyLab.TabIndex = 17;
             this.PanelQtyLab.Text = "拼板数:";
             // 
+            // LockMakeCode
+            // 
+            this.LockMakeCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.LockMakeCode.AutoSize = true;
+            this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LockMakeCode.LeaveEvent = false;
+            this.LockMakeCode.Location = new System.Drawing.Point(420, 8);
+            this.LockMakeCode.Name = "LockMakeCode";
+            this.LockMakeCode.Size = new System.Drawing.Size(72, 28);
+            this.LockMakeCode.TabIndex = 26;
+            this.LockMakeCode.Text = "锁定";
+            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 
+            // ma_code
+            // 
+            this.ma_code.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.ma_code.AllPower = null;
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = null;
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(78, 4);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = null;
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(330, 36);
+            this.ma_code.TabIndex = 25;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "ma_code";
+            this.ma_code.TextBoxEnable = true;
+            this.ma_code.DbChange += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox.DBSourceChange(this.ma_code_DbChange);
+            // 
+            // makeLab
+            // 
+            this.makeLab.AutoSize = true;
+            this.makeLab.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.makeLab.Location = new System.Drawing.Point(8, 10);
+            this.makeLab.Name = "makeLab";
+            this.makeLab.Size = new System.Drawing.Size(59, 28);
+            this.makeLab.TabIndex = 24;
+            this.makeLab.Text = "工单:";
+            // 
             // snLab
             // 
             this.snLab.AutoSize = true;
             this.snLab.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.snLab.Location = new System.Drawing.Point(14, 97);
+            this.snLab.Location = new System.Drawing.Point(8, 86);
             this.snLab.Name = "snLab";
             this.snLab.Size = new System.Drawing.Size(80, 28);
             this.snLab.TabIndex = 0;
@@ -250,10 +322,12 @@
             // 
             // snVal
             // 
+            this.snVal.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
             this.snVal.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.snVal.Location = new System.Drawing.Point(90, 97);
+            this.snVal.Location = new System.Drawing.Point(78, 84);
             this.snVal.Name = "snVal";
-            this.snVal.Size = new System.Drawing.Size(360, 31);
+            this.snVal.Size = new System.Drawing.Size(410, 31);
             this.snVal.TabIndex = 1;
             this.snVal.KeyDown += new System.Windows.Forms.KeyEventHandler(this.snVal_KeyDown);
             // 
@@ -635,6 +709,7 @@
             this.containerBox.ResumeLayout(false);
             this.tableLayoutPanel2.ResumeLayout(false);
             this.tableLayoutPanel3.ResumeLayout(false);
+            this.buttonRow.ResumeLayout(false);
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
             this.groupBox1.ResumeLayout(false);
@@ -682,10 +757,14 @@
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
         private System.Windows.Forms.GroupBox groupBox1;
         private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.FlowLayoutPanel buttonRow;
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
         private CustomControl.RichText.RichTextAutoBottom Msg1;
         private System.Windows.Forms.Label PanelQtyLab;
         private System.Windows.Forms.TextBox PanelQtyVal;
+        private System.Windows.Forms.Label makeLab;
+        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
         private System.Windows.Forms.Label BoxQtyLab;
         private System.Windows.Forms.TextBox BoxQtyVal;
         private System.Windows.Forms.Button Confirm;

+ 33 - 1
UAS_MES_YTDZ/FunctionCode/Make/Make_ShipmentVerify.cs

@@ -46,7 +46,24 @@ namespace UAS_MES_NEW.Make
             snVal.Enabled = false;
             if (string.IsNullOrEmpty(BoxQtyVal.Text))
                 BoxQtyVal.Text = "0";
-            PanelQtyVal.Focus();
+            LockMakeCode.GetMakeCodeCtl(ma_code);
+            ma_code.SetLockCheckBox(LockMakeCode);
+            ma_code.TableName = "make left join product on ma_prodcode=pr_code";
+            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_spec # 产品规格,ma_softversion # 软件版本,ma_salecode # 销售单号,pr_sendchecktype # 产品送检方式,pr_pcbacount # 拼版数";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_spec", "ma_softversion", "ma_salecode", "nvl(pr_sendchecktype,'LineCode')pr_sendchecktype", "pr_pcbacount" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.Focus();
+        }
+
+        private void ma_code_DbChange(object sender, EventArgs e)
+        {
+            BaseUtil.SetFormValue(this.Controls, ma_code.ReturnData);
+            string makeCode = ma_code.Text.Trim();
+            if (string.IsNullOrEmpty(makeCode))
+                return;
+            workOrder.Text = makeCode;
+            LoadMakeSummary(makeCode);
         }
 
         private void Confirm_Click(object sender, EventArgs e)
@@ -108,6 +125,13 @@ namespace UAS_MES_NEW.Make
             e.Handled = true;
             e.SuppressKeyPress = true;
 
+            if (string.IsNullOrEmpty(ma_code.Text.Trim()))
+            {
+                ShowMsg(Msg1, 0, "请先选择工单");
+                ma_code.Focus();
+                return;
+            }
+
             if (PanelQtyVal.Enabled || panelQty <= 0)
             {
                 ShowMsg(Msg1, 0, "请先确认拼板数量");
@@ -137,6 +161,14 @@ namespace UAS_MES_NEW.Make
             {
                 string snCode = dt.Rows[0]["ms_sncode"].ToString();
                 string makeCode = dt.Rows[0]["ms_makecode"].ToString();
+                string filterMake = ma_code.Text.Trim();
+                if (!string.IsNullOrEmpty(filterMake) && !string.Equals(filterMake, makeCode, StringComparison.OrdinalIgnoreCase))
+                {
+                    ShowMsg(Msg1, 0, "序列号不属于当前工单");
+                    snVal.Focus();
+                    snVal.SelectAll();
+                    return;
+                }
 
                 foreach (DataRow row in data.Rows)
                 {

+ 5 - 2
UAS_MES_YTDZ/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -639,14 +639,15 @@
             this.oi_sampleqty,
             this.oi_checkqty,
             this.oi_ng,
-            this.oi_leveldefect,
             this.ois_remark,
+            this.oi_leveldefect,
             this.ois_status});
             this.CheckTypeDGV.Location = new System.Drawing.Point(21, 214);
             this.CheckTypeDGV.Margin = new System.Windows.Forms.Padding(4);
             this.CheckTypeDGV.Name = "CheckTypeDGV";
             this.CheckTypeDGV.RowHeadersWidth = 20;
             this.CheckTypeDGV.RowTemplate.Height = 23;
+            this.CheckTypeDGV.ScrollBars = System.Windows.Forms.ScrollBars.Both;
             this.CheckTypeDGV.Size = new System.Drawing.Size(589, 415);
             this.CheckTypeDGV.TabIndex = 198;
             this.CheckTypeDGV.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.CheckTypeDGV_CellValueChanged);
@@ -675,6 +676,7 @@
             dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
             this.ci_name.DefaultCellStyle = dataGridViewCellStyle1;
             this.ci_name.HeaderText = "项目名称";
+            this.ci_name.MinimumWidth = 132;
             this.ci_name.Name = "ci_name";
             this.ci_name.ReadOnly = true;
             // 
@@ -718,8 +720,9 @@
             // 
             this.ois_remark.DataPropertyName = "ois_remark";
             this.ois_remark.HeaderText = "备注";
+            this.ois_remark.MinimumWidth = 120;
             this.ois_remark.Name = "ois_remark";
-            this.ois_remark.Visible = false;
+            this.ois_remark.Width = 120;
             // 
             // ois_status
             // 

+ 14 - 0
UAS_MES_YTDZ/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -49,6 +49,20 @@ namespace UAS_MES_NEW.OQC
         {
             if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
             {
+                if (!string.IsNullOrEmpty(obd_outboxcode.Text))
+                {
+                    string currentSn = string.IsNullOrEmpty(ms_sncode.Text) ? sncode.Text : ms_sncode.Text;
+                    string boxCode = dh.getFieldDataByCondition("makeserial", "ms_outboxcode", "ms_sncode = '" + currentSn + "'").ToString();
+                    if (boxCode != obd_outboxcode.Text)
+                    {
+                        DialogResult confirm = MessageBox.Show("当前序列号所属箱号" + boxCode + "与上一序列号箱号" + obd_outboxcode.Text + "不一致,是否生成新的检验批?请注意之前批次产品抽检!", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+                        if (confirm != DialogResult.Yes)
+                            return;
+                        ob_checkno.Text = "";
+                        obd_outboxcode.Text = boxCode;
+                    }
+                }
+
                 DataTable temp = dh.getFieldsDatasByCondition("makeserial", new string[] { "nvl(ms_ifrework,0)ms_ifrework", "ms_reworkcheckno", "ms_reworkstatus" }, "(ms_sncode)='" + sncode.Text + "' order by ms_id desc");
                 if (temp.Rows.Count > 0)
                 {