瀏覽代碼

转号界面可以填写工单号

callm 2 月之前
父節點
當前提交
88f796a534

+ 63 - 38
UAS_MES_PNE/FunctionCode/Make/Make_SeqTransform.Designer.cs

@@ -36,8 +36,6 @@
             this.afterTransSNLength_checkBox = new System.Windows.Forms.CheckBox();
             this.afterTransSNLength_checkBox = new System.Windows.Forms.CheckBox();
             this.beforeTransSNPre_checkBox = new System.Windows.Forms.CheckBox();
             this.beforeTransSNPre_checkBox = new System.Windows.Forms.CheckBox();
             this.afterTransSNPre_checkBox = new System.Windows.Forms.CheckBox();
             this.afterTransSNPre_checkBox = new System.Windows.Forms.CheckBox();
-            this.label1 = new System.Windows.Forms.Label();
-            this.ma_code = new System.Windows.Forms.Label();
             this.changenum = new System.Windows.Forms.Label();
             this.changenum = new System.Windows.Forms.Label();
             this.remain_qty = new System.Windows.Forms.Label();
             this.remain_qty = new System.Windows.Forms.Label();
             this.PrintNum_label = new System.Windows.Forms.Label();
             this.PrintNum_label = new System.Windows.Forms.Label();
@@ -65,6 +63,9 @@
             this.ma_salecode = new System.Windows.Forms.Label();
             this.ma_salecode = new System.Windows.Forms.Label();
             this.mcd_inqty = new System.Windows.Forms.Label();
             this.mcd_inqty = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            this.label1 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
@@ -159,28 +160,6 @@
             this.afterTransSNPre_checkBox.Text = "SN前缀";
             this.afterTransSNPre_checkBox.Text = "SN前缀";
             this.afterTransSNPre_checkBox.UseVisualStyleBackColor = true;
             this.afterTransSNPre_checkBox.UseVisualStyleBackColor = true;
             // 
             // 
-            // label1
-            // 
-            this.label1.AutoSize = true;
-            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label1.Location = new System.Drawing.Point(30, 30);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(146, 41);
-            this.label1.TabIndex = 93;
-            this.label1.Text = "工单编号";
-            // 
-            // ma_code
-            // 
-            this.ma_code.AutoSize = true;
-            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ma_code.Location = new System.Drawing.Point(182, 30);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_code.Name = "ma_code";
-            this.ma_code.Size = new System.Drawing.Size(0, 41);
-            this.ma_code.TabIndex = 95;
-            this.ma_code.TextChanged += new System.EventHandler(this.ms_makecode_UserControlTextChanged);
-            // 
             // changenum
             // changenum
             // 
             // 
             this.changenum.AutoSize = true;
             this.changenum.AutoSize = true;
@@ -231,7 +210,7 @@
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
             this.ClearSn_code.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
             this.ClearSn_code.Location = new System.Drawing.Point(560, 798);
             this.ClearSn_code.Location = new System.Drawing.Point(560, 798);
-            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(6);
             this.ClearSn_code.Name = "ClearSn_code";
             this.ClearSn_code.Name = "ClearSn_code";
             this.ClearSn_code.Size = new System.Drawing.Size(32, 32);
             this.ClearSn_code.Size = new System.Drawing.Size(32, 32);
             this.ClearSn_code.TabIndex = 141;
             this.ClearSn_code.TabIndex = 141;
@@ -283,7 +262,7 @@
             this.show_sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.show_sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.show_sncode.ID = null;
             this.show_sncode.ID = null;
             this.show_sncode.Location = new System.Drawing.Point(194, 792);
             this.show_sncode.Location = new System.Drawing.Point(194, 792);
-            this.show_sncode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.show_sncode.Margin = new System.Windows.Forms.Padding(6);
             this.show_sncode.Name = "show_sncode";
             this.show_sncode.Name = "show_sncode";
             this.show_sncode.Power = null;
             this.show_sncode.Power = null;
             this.show_sncode.Size = new System.Drawing.Size(316, 43);
             this.show_sncode.Size = new System.Drawing.Size(316, 43);
@@ -372,7 +351,7 @@
             // 
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 15F);
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 15F);
             this.OperateResult.Location = new System.Drawing.Point(38, 294);
             this.OperateResult.Location = new System.Drawing.Point(38, 294);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(1620, 458);
             this.OperateResult.Size = new System.Drawing.Size(1620, 458);
             this.OperateResult.TabIndex = 78;
             this.OperateResult.TabIndex = 78;
@@ -385,7 +364,7 @@
             this.sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.sncode.ID = null;
             this.sncode.ID = null;
             this.sncode.Location = new System.Drawing.Point(194, 858);
             this.sncode.Location = new System.Drawing.Point(194, 858);
-            this.sncode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.sncode.Margin = new System.Windows.Forms.Padding(6);
             this.sncode.Name = "sncode";
             this.sncode.Name = "sncode";
             this.sncode.Power = "ifread";
             this.sncode.Power = "ifread";
             this.sncode.Size = new System.Drawing.Size(316, 43);
             this.sncode.Size = new System.Drawing.Size(316, 43);
@@ -402,7 +381,7 @@
             this.Remark.BackColor = System.Drawing.Color.White;
             this.Remark.BackColor = System.Drawing.Color.White;
             this.Remark.ID = null;
             this.Remark.ID = null;
             this.Remark.Location = new System.Drawing.Point(928, 768);
             this.Remark.Location = new System.Drawing.Point(928, 768);
-            this.Remark.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Remark.Margin = new System.Windows.Forms.Padding(6);
             this.Remark.Multiline = true;
             this.Remark.Multiline = true;
             this.Remark.Name = "Remark";
             this.Remark.Name = "Remark";
             this.Remark.Power = null;
             this.Remark.Power = null;
@@ -421,7 +400,7 @@
             this.Seq_Remark_PreFix.BackColor = System.Drawing.Color.White;
             this.Seq_Remark_PreFix.BackColor = System.Drawing.Color.White;
             this.Seq_Remark_PreFix.ID = null;
             this.Seq_Remark_PreFix.ID = null;
             this.Seq_Remark_PreFix.Location = new System.Drawing.Point(828, 816);
             this.Seq_Remark_PreFix.Location = new System.Drawing.Point(828, 816);
-            this.Seq_Remark_PreFix.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Seq_Remark_PreFix.Margin = new System.Windows.Forms.Padding(6);
             this.Seq_Remark_PreFix.Name = "Seq_Remark_PreFix";
             this.Seq_Remark_PreFix.Name = "Seq_Remark_PreFix";
             this.Seq_Remark_PreFix.Power = null;
             this.Seq_Remark_PreFix.Power = null;
             this.Seq_Remark_PreFix.Size = new System.Drawing.Size(84, 35);
             this.Seq_Remark_PreFix.Size = new System.Drawing.Size(84, 35);
@@ -435,7 +414,7 @@
             // 
             // 
             this.SameReamrk.AutoSize = true;
             this.SameReamrk.AutoSize = true;
             this.SameReamrk.Location = new System.Drawing.Point(928, 880);
             this.SameReamrk.Location = new System.Drawing.Point(928, 880);
-            this.SameReamrk.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.SameReamrk.Margin = new System.Windows.Forms.Padding(6);
             this.SameReamrk.Name = "SameReamrk";
             this.SameReamrk.Name = "SameReamrk";
             this.SameReamrk.Size = new System.Drawing.Size(186, 28);
             this.SameReamrk.Size = new System.Drawing.Size(186, 28);
             this.SameReamrk.TabIndex = 224;
             this.SameReamrk.TabIndex = 224;
@@ -458,7 +437,7 @@
             // 
             // 
             this.IFONLY.AutoSize = true;
             this.IFONLY.AutoSize = true;
             this.IFONLY.Location = new System.Drawing.Point(748, 880);
             this.IFONLY.Location = new System.Drawing.Point(748, 880);
-            this.IFONLY.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.IFONLY.Margin = new System.Windows.Forms.Padding(6);
             this.IFONLY.Name = "IFONLY";
             this.IFONLY.Name = "IFONLY";
             this.IFONLY.Size = new System.Drawing.Size(162, 28);
             this.IFONLY.Size = new System.Drawing.Size(162, 28);
             this.IFONLY.TabIndex = 222;
             this.IFONLY.TabIndex = 222;
@@ -471,7 +450,7 @@
             this.CollectRemark.AutoSize = true;
             this.CollectRemark.AutoSize = true;
             this.CollectRemark.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CollectRemark.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CollectRemark.Location = new System.Drawing.Point(1132, 880);
             this.CollectRemark.Location = new System.Drawing.Point(1132, 880);
-            this.CollectRemark.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.CollectRemark.Margin = new System.Windows.Forms.Padding(6);
             this.CollectRemark.Name = "CollectRemark";
             this.CollectRemark.Name = "CollectRemark";
             this.CollectRemark.Size = new System.Drawing.Size(138, 28);
             this.CollectRemark.Size = new System.Drawing.Size(138, 28);
             this.CollectRemark.TabIndex = 221;
             this.CollectRemark.TabIndex = 221;
@@ -521,11 +500,58 @@
             this.label5.TabIndex = 229;
             this.label5.TabIndex = 229;
             this.label5.Text = "采集数";
             this.label5.Text = "采集数";
             // 
             // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = null;
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = null;
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(222, 29);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            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(230, 42);
+            this.ma_code.TabIndex = 233;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "ma_code";
+            this.ma_code.TextBoxEnable = true;
+            // 
+            // LockMakeCode
+            // 
+            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(484, 33);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
+            this.LockMakeCode.Name = "LockMakeCode";
+            this.LockMakeCode.Size = new System.Drawing.Size(94, 35);
+            this.LockMakeCode.TabIndex = 232;
+            this.LockMakeCode.Text = "锁定";
+            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 
+            // label1
+            // 
+            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(42, 29);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(146, 41);
+            this.label1.TabIndex = 231;
+            this.label1.Text = "归属工单";
+            // 
             // Make_SeqTransform
             // Make_SeqTransform
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1698, 934);
             this.ClientSize = new System.Drawing.Size(1698, 934);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.LockMakeCode);
+            this.Controls.Add(this.label1);
             this.Controls.Add(this.mcd_inqty);
             this.Controls.Add(this.mcd_inqty);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.ma_salecode);
             this.Controls.Add(this.ma_salecode);
@@ -546,9 +572,7 @@
             this.Controls.Add(this.PrintNum_label);
             this.Controls.Add(this.PrintNum_label);
             this.Controls.Add(this.remain_qty_label);
             this.Controls.Add(this.remain_qty_label);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.pr_detail);
-            this.Controls.Add(this.ma_code);
             this.Controls.Add(this.ma_prodcode);
             this.Controls.Add(this.ma_prodcode);
-            this.Controls.Add(this.label1);
             this.Controls.Add(this.afterTransSNLength);
             this.Controls.Add(this.afterTransSNLength);
             this.Controls.Add(this.beforeTransSNLength);
             this.Controls.Add(this.beforeTransSNLength);
             this.Controls.Add(this.afterTransSNPre);
             this.Controls.Add(this.afterTransSNPre);
@@ -564,7 +588,7 @@
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.ma_prodcode_label);
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Margin = new System.Windows.Forms.Padding(6);
             this.Name = "Make_SeqTransform";
             this.Name = "Make_SeqTransform";
             this.Tag = "Make!SeqTransform";
             this.Tag = "Make!SeqTransform";
             this.Text = " ";
             this.Text = " ";
@@ -591,9 +615,7 @@
         private CustomControl.TextBoxWithIcon.EnterTextBox afterTransSNPre;
         private CustomControl.TextBoxWithIcon.EnterTextBox afterTransSNPre;
         private CustomControl.TextBoxWithIcon.TextBoxNumOnly beforeTransSNLength;
         private CustomControl.TextBoxWithIcon.TextBoxNumOnly beforeTransSNLength;
         private CustomControl.TextBoxWithIcon.TextBoxNumOnly afterTransSNLength;
         private CustomControl.TextBoxWithIcon.TextBoxNumOnly afterTransSNLength;
-        private System.Windows.Forms.Label label1;
         private CustomControl.ValueLabel.ValueLabel ma_prodcode;
         private CustomControl.ValueLabel.ValueLabel ma_prodcode;
-        private System.Windows.Forms.Label ma_code;
         private CustomControl.ValueLabel.ValueLabel pr_detail;
         private CustomControl.ValueLabel.ValueLabel pr_detail;
         private System.Windows.Forms.Label changenum;
         private System.Windows.Forms.Label changenum;
         private System.Windows.Forms.Label remain_qty;
         private System.Windows.Forms.Label remain_qty;
@@ -614,5 +636,8 @@
         private System.Windows.Forms.Label ma_salecode;
         private System.Windows.Forms.Label ma_salecode;
         private System.Windows.Forms.Label mcd_inqty;
         private System.Windows.Forms.Label mcd_inqty;
         private System.Windows.Forms.Label label5;
         private System.Windows.Forms.Label label5;
+        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
+        private System.Windows.Forms.Label label1;
     }
     }
 }
 }

+ 20 - 1
UAS_MES_PNE/FunctionCode/Make/Make_SeqTransform.cs

@@ -25,6 +25,8 @@ namespace UAS_MES_NEW.Make
 
 
         string errorMessage = "";
         string errorMessage = "";
 
 
+        DataTable Dbfind;
+
         DataTable ListA;
         DataTable ListA;
         //存放工单中数量
         //存放工单中数量
         int ma_qty;
         int ma_qty;
@@ -61,7 +63,7 @@ namespace UAS_MES_NEW.Make
                             if (!ChangeResult.Checked)
                             if (!ChangeResult.Checked)
                             {
                             {
                                 //用户填写了工单号,那么序列号必须要是该工单的,否则提示错误
                                 //用户填写了工单号,那么序列号必须要是该工单的,否则提示错误
-                                if (!LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out errorMessage))
+                                if (!LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out errorMessage))
                                 {
                                 {
                                     OperateResult.AppendText("<<" + errorMessage + "\n", Color.Red, sncode);
                                     OperateResult.AppendText("<<" + errorMessage + "\n", Color.Red, sncode);
                                     return;
                                     return;
@@ -540,11 +542,28 @@ namespace UAS_MES_NEW.Make
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;
             StepCount.LineCode = User.UserLineCode;
+
+            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_pocode # 内部订单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_spec # 产品规格,ma_softversion # 软件版本,ma_salecode # 销售单号,pr_sendchecktype # 产品送检方式";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code", "ma_pocode", "ma_prodcode", "ma_qty", "substr(pr_spec,0,50)pr_spec", "ma_softversion", "ma_salecode", "nvl(pr_sendchecktype,'LineCode')pr_sendchecktype" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += Ma_code_DbChange;
+
             StepCount.Dh = dh;
             StepCount.Dh = dh;
             StepCount.Start();
             StepCount.Start();
             Seq_Remark_PreFix.Text = BaseUtil.GetCacheData("Seq_Remark_PreFix").ToString();
             Seq_Remark_PreFix.Text = BaseUtil.GetCacheData("Seq_Remark_PreFix").ToString();
         }
         }
 
 
+        private void Ma_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = ma_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+        }
+
         private void Make_SeqTransform_SizeChanged(object sender, EventArgs e)
         private void Make_SeqTransform_SizeChanged(object sender, EventArgs e)
         {
         {
             asc.controlAutoSize(this);
             asc.controlAutoSize(this);