Browse Source

彩盒标打印锁定工单,SMT维修录入,回撤删除打印标签

callm 1 year ago
parent
commit
e93614235e

+ 21 - 3
UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxLabelPrint.Designer.cs

@@ -53,6 +53,7 @@
             this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.locksalecode = new System.Windows.Forms.CheckBox();
             this.SuspendLayout();
             // 
             // label2
@@ -161,7 +162,7 @@
             this.CheckTSN.AutoSize = true;
             this.CheckTSN.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CheckTSN.Location = new System.Drawing.Point(64, 890);
-            this.CheckTSN.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.CheckTSN.Margin = new System.Windows.Forms.Padding(6);
             this.CheckTSN.Name = "CheckTSN";
             this.CheckTSN.Size = new System.Drawing.Size(240, 45);
             this.CheckTSN.TabIndex = 186;
@@ -176,7 +177,7 @@
             this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CollectRemark.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.CollectRemark.Location = new System.Drawing.Point(1458, 578);
-            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.Size = new System.Drawing.Size(155, 39);
             this.CollectRemark.TabIndex = 197;
@@ -350,11 +351,27 @@
             this.OperateResult.TabIndex = 168;
             this.OperateResult.Text = "";
             // 
+            // locksalecode
+            // 
+            this.locksalecode.AutoSize = true;
+            this.locksalecode.Checked = true;
+            this.locksalecode.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.locksalecode.ForeColor = System.Drawing.Color.Red;
+            this.locksalecode.Location = new System.Drawing.Point(180, 33);
+            this.locksalecode.Margin = new System.Windows.Forms.Padding(6);
+            this.locksalecode.Name = "locksalecode";
+            this.locksalecode.Size = new System.Drawing.Size(186, 28);
+            this.locksalecode.TabIndex = 205;
+            this.locksalecode.Text = "当前订单锁定";
+            this.locksalecode.UseVisualStyleBackColor = true;
+            // 
             // Make_ColorBoxLabelPrint
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1876, 960);
+            this.Controls.Add(this.locksalecode);
             this.Controls.Add(this.CollectRemark);
             this.Controls.Add(this.Remark);
             this.Controls.Add(this.StepCount);
@@ -380,7 +397,7 @@
             this.Controls.Add(this.pr_code_label);
             this.Controls.Add(this.ms_makecode_label);
             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_ColorBoxLabelPrint";
             this.Tag = "Make!ColorBoxLabelPrint";
             this.Text = "W";
@@ -419,5 +436,6 @@
         private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
         private System.Windows.Forms.CheckBox CollectRemark;
         private CustomControl.RichText.RichTextAutoBottom Remark;
+        private System.Windows.Forms.CheckBox locksalecode;
     }
 }

+ 5 - 0
UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -199,6 +199,11 @@ namespace UAS_MES_NEW.Make
                             OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, sncode);
                             return;
                         }
+                        if (locksalecode.Checked && ma_code.Text != "" && ma_code.Text != oMakeCode)
+                        {
+                            OperateResult.AppendText(">>序列号" + sncode.Text + "所属工单号" + oMakeCode + "与界面工单号" + ma_code.Text + "不同,无法采集\n", Color.Red, sncode);
+                            return;
+                        }
                         //获取工单的其他信息
                         sql.Clear();
                         sql.Append("select ma_code,nvl(ma_unlimitin,0)ma_unlimitin,pr_code,pr_detail,pr_spec from  ");

+ 4 - 4
UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -158,15 +158,15 @@ namespace UAS_MES_NEW.Make
                             string _maxweight = dt.Rows[0]["pr_colorboxmaxw"].ToString();
                             string _minweight = dt.Rows[0]["pr_colorboxminw"].ToString();
                             string pr_colorunit = dt.Rows[0]["pr_colorboxunit"].ToString();
-                            string ma_salecode_text = dt.Rows[0]["ma_salecode"].ToString();
+                            string ma_salecode_text = dt.Rows[0]["ma_code"].ToString();
                             string PR_CHECKCOLORBOXW = dt.Rows[0]["PR_CHECKCOLORBOXW"].ToString();
                             //赋值重量单位
                             Weight = double.Parse(_weight == "" ? "0" : _weight);
                             MaxWeight = double.Parse(_maxweight == "" ? "0" : _maxweight);
                             MinWeight = double.Parse(_minweight == "" ? "0" : _minweight);
-                            if (locksalecode.Checked && ma_salecode.Text != "" && ma_salecode.Text != ma_salecode_text)
+                            if (locksalecode.Checked && ma_code.Text != "" && ma_code.Text != ma_salecode_text)
                             {
-                                OperateResult.AppendText(">>序列号" + sncode.Text + "所属订单号" + ma_salecode_text + "与界面订单号" + ma_salecode.Text + "不同,无法采集\n", Color.Red, sncode);
+                                OperateResult.AppendText(">>序列号" + sncode.Text + "所属订单号" + ma_salecode_text + "与界面订单号" + ma_code.Text + "不同,无法采集\n", Color.Red, sncode);
                                 return;
                             }
                             ma_salecode.Text = dt.Rows[0]["ma_salecode"].ToString();
@@ -263,7 +263,7 @@ namespace UAS_MES_NEW.Make
 
                                 weight.Text = re.Match(serialPort1.ReadLine().Trim()).Groups[0].Value;
                                 Remark.AppendText(weight.Text + "\n");
-                              
+                                Remark.Clear();
                             }
                             catch (Exception)
                             {

+ 3 - 5
UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -261,11 +261,8 @@ namespace UAS_MES_NEW.Packing
                         string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
                         if (nextstepcode != "" && nextstepcode != User.CurrentStepCode)
                         {
-                            OperateResult.AppendText("当前序列号下一道工序" + nextstepcode + ",当前资源不允许采集\n", Color.Red);
-                            if (md.IsOpen)
-                            {
-                                md.SendOrder("M502_ON");
-                            }
+                            string stname = dh.getFieldDataByCondition("step", "st_name", "st_code='" + nextstepcode + "'").ToString();
+                            OperateResult.AppendText("<<序列号:" + sn_code.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, sn_code);
                             return;
                         }
                         PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code and cr_prodcode = ms_prodcode", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sn_code.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
@@ -879,6 +876,7 @@ namespace UAS_MES_NEW.Packing
                                     dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                                 pa_status.Text = "0";
                                 //删除箱的明细
+                                dh.ExecuteSql("delete from labelprintlog where lpl_value='"+pa_outboxcode.Text+"'","delete");
                                 dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱拆解", "成功", pa_outboxcode.Text, ob_checkno.Text);
                                 OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "成功拆解!\n", Color.Green);

+ 2 - 1
UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs

@@ -337,7 +337,7 @@ namespace UAS_MES_NEW.Packing
                         if (nextstepcode != "" && nextstepcode != User.CurrentStepCode)
                         {
                             string stname = dh.getFieldDataByCondition("step", "st_name", "st_code='" + nextstepcode + "'").ToString();
-                            OperateResult.AppendText("<<当前序列号下一道工序为" + stname + ",当前资源不允许采集\n", Color.Red);
+                            OperateResult.AppendText("<<序列号:" + sn_code.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, sn_code);
                             return;
                         }
                         //PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sn_code.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
@@ -881,6 +881,7 @@ namespace UAS_MES_NEW.Packing
                                     dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                                 pa_status.Text = "0";
                                 //删除箱的明细
+                                dh.ExecuteSql("delete from labelprintlog where lpl_value='" + pa_outboxcode.Text + "'", "delete");
                                 dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱拆解", "成功", pa_outboxcode.Text, ob_checkno.Text);
                                 OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "成功拆解!\n", Color.Green);

+ 2 - 1
UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh_ReadLine.cs

@@ -337,7 +337,7 @@ namespace UAS_MES_NEW.Packing
                         if (nextstepcode != "" && nextstepcode != User.CurrentStepCode)
                         {
                             string stname = dh.getFieldDataByCondition("step", "st_name", "st_code='" + nextstepcode + "'").ToString();
-                            OperateResult.AppendText("<<当前序列号下一道工序为" + stname + ",当前资源不允许采集\n", Color.Red);
+                            OperateResult.AppendText("<<序列号:" + sn_code.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, sn_code);
                             return;
                         }
                         //PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sn_code.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
@@ -882,6 +882,7 @@ namespace UAS_MES_NEW.Packing
                                     dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                                 pa_status.Text = "0";
                                 //删除箱的明细
+                                dh.ExecuteSql("delete from labelprintlog where lpl_value='" + pa_outboxcode.Text + "'", "delete");
                                 dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱拆解", "成功", pa_outboxcode.Text, ob_checkno.Text);
                                 OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "成功拆解!\n", Color.Green);

+ 1 - 0
UAS_MES_LGDZ/FunctionCode/Special/Special_CancelCollection.cs

@@ -49,6 +49,7 @@ namespace UAS_MES_NEW.Special
                 if (ms_outboxcode != "")
                 {
                     OperateResult.AppendText(">>序列号" + sn_code.Text + "已装箱" + ms_outboxcode + ",不允许取消采集\n", Color.Red, sn_code);
+                    return;
                 }
                 //存在不良删除不良记录
                 if (ms_status == "3")

+ 3 - 1
UAS_MES_LGDZ/FunctionCode/Special/Special_CancelOQC.cs

@@ -98,10 +98,12 @@ namespace UAS_MES_NEW.Special
                 if (OK.Checked)
                 {
                     dh.ExecuteSql("update makeserial set ms_iftest=-1 where ms_id=" + ms_id, "update");
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserName, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "QC抽检", "QC抽检成功,结果为良品", SN.Text, "");
                 }
                 else
                 {
-
+                    dh.ExecuteSql("update makeserial set ms_iftest=-1 where ms_id=" + ms_id, "update");
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserName, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "QC抽检", "QC抽检成功,结果为不良", SN.Text, "");
                 }
                 OperateResult.AppendText("序列号" + SN.Text + "抽检记录成功", System.Drawing.Color.Green);
             }

+ 38 - 0
UAS_MES_LGDZ/FunctionCode/Special/Special_MakeBad.Designer.cs

@@ -51,6 +51,8 @@
             this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.label4 = new System.Windows.Forms.Label();
             this.mbr_inman = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.label5 = new System.Windows.Forms.Label();
             this.SuspendLayout();
             // 
             // Pallet_label
@@ -352,11 +354,45 @@
             this.mbr_inman.Str2 = null;
             this.mbr_inman.TabIndex = 247;
             // 
+            // pr_code
+            // 
+            this.pr_code.AllPower = "IFALL";
+            this.pr_code.Caller = null;
+            this.pr_code.Condition = null;
+            this.pr_code.DBTitle = "";
+            this.pr_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.pr_code.FormName = null;
+            this.pr_code.Location = new System.Drawing.Point(1093, 216);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(6);
+            this.pr_code.Name = "pr_code";
+            this.pr_code.Power = "";
+            this.pr_code.ReturnData = null;
+            this.pr_code.SelectField = null;
+            this.pr_code.SetValueField = null;
+            this.pr_code.Size = new System.Drawing.Size(244, 46);
+            this.pr_code.TabIndex = 249;
+            this.pr_code.TableName = null;
+            this.pr_code.Tag = "makecode";
+            this.pr_code.TextBoxEnable = true;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(917, 216);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(146, 41);
+            this.label5.TabIndex = 248;
+            this.label5.Text = "产品编号";
+            // 
             // Special_MakeBad
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1797, 1054);
+            this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.label5);
             this.Controls.Add(this.mbr_inman);
             this.Controls.Add(this.label4);
             this.Controls.Add(this.bc_code);
@@ -413,5 +449,7 @@
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Label label4;
         private CustomControl.TextBoxWithIcon.EnterTextBox mbr_inman;
+        private CustomControl.TextBoxWithIcon.SearchTextBox pr_code;
+        private System.Windows.Forms.Label label5;
     }
 }

+ 13 - 1
UAS_MES_LGDZ/FunctionCode/Special/Special_MakeBad.cs

@@ -35,6 +35,13 @@ namespace UAS_MES_NEW.Special
             li_code.SetValueField = new string[] { "li_code" };
             li_code.FormName = Name;
 
+
+            pr_code.TableName = "product";
+            pr_code.DBTitle = "产品查询";
+            pr_code.SelectField = "pr_code # 产品编号,pr_detail # 产品名称 ,pr_spec # 产品规格";
+            pr_code.SetValueField = new string[] { "pr_code" };
+            pr_code.FormName = Name;
+
             bc_code.TableName = "(select bc_code,bc_name from badcode left join DATAINPUTRECORD ON bc_name = DIR_COMMENT AND DIR_GROUP = '不良代码组' and DIR_SOURCECODE = '" + User.UserSourceCode + "' where bc_groupcode='SMT' ORDER BY NVL(DIR_NUMBER,0) DESC)";
             bc_code.Field = "bc_name";
             bc_code.ValueField = "bc_code";
@@ -81,12 +88,17 @@ namespace UAS_MES_NEW.Special
                 OperateResult.AppendText("序列号" + sn_code.Text + "已录入\n", System.Drawing.Color.Red, sn_code);
                 return;
             }
+            if (!dh.CheckExist("product", "pr_code='" + pr_code.Text + "'"))
+            {
+                OperateResult.AppendText("产品编号" + pr_code.Text + "不存在\n", System.Drawing.Color.Red, sn_code);
+                return;
+            }
             if (nrg_name.Text == "" || nr_name.Text == "" || mbr_dutyname.Text == "" || so_name.Text == "")
             {
                 OperateResult.AppendText("请完善维修信息\n", System.Drawing.Color.Red, sn_code);
                 return;
             }
-            dh.ExecuteSql("insert into makebadreason(MBR_ID,mbr_badlocation,MBR_BADCODE, MBR_SNCODE, MBR_MAKECODE, MBR_SOLUTIONNAME, MBR_DUTYNAME,mbr_linecode,MBR_INMAN)values(makebadreason_seq.nextval,'" + mb_badlocation.Text + "','" + bc_code.Text + "','" + sn_code.Text + "','" + ma_code.Text + "','" + so_name.Text + "','" + mbr_dutyname.Text + "','" + li_code.Text + "','" + (mbr_inman.Text == "" ? User.UserName : mbr_inman.Text) + "')", "insert");
+            dh.ExecuteSql("insert into makebadreason(MBR_ID,mbr_badlocation,MBR_BADCODE, MBR_SNCODE, MBR_MAKECODE, MBR_SOLUTIONNAME, MBR_DUTYNAME,mbr_linecode,MBR_INMAN,mbr_prodcode)values(makebadreason_seq.nextval,'" + mb_badlocation.Text + "','" + bc_code.Text + "','" + sn_code.Text + "','" + ma_code.Text + "','" + so_name.Text + "','" + mbr_dutyname.Text + "','" + li_code.Text + "','" + (mbr_inman.Text == "" ? User.UserName : mbr_inman.Text) + "','" + pr_code.Text + "')", "insert");
             OperateResult.AppendText("序列号" + sn_code.Text + "记录维修信息成功\n", System.Drawing.Color.Green, sn_code);
             //nrg_name.Text = "";
             //nr_name.Text = "";

+ 1 - 0
UAS_MES_LGDZ/FunctionCode/Special/Special_Reset.cs

@@ -101,6 +101,7 @@ namespace UAS_MES_NEW.Special
                         {
                             ReSN(dt2.Rows[k]["ms_sncode"].ToString(), cd_stepcode.Text);
                         }
+                        dh.ExecuteSql("delete from labelprintlog where lpl_value='" + sb[i].ToString() + "'", "delete");
                         dh.ExecuteSql("insert into PACKAGEBACKUP select * from package where pa_outboxcode='" + sb[i].ToString() + "'", "insert");
                         dh.ExecuteSql("insert into PACKAGEBACKUPDETAIL select * from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "insert");
                         dh.ExecuteSql("delete from package where pa_outboxcode = '" + sb[i].ToString() + "'", "delete");

+ 133 - 133
UAS_MES_LGDZ/FunctionCode/SystemSetting/SystemSetting_PrinterTest.Designer.cs

@@ -36,22 +36,22 @@
             this.Date = new System.Windows.Forms.DateTimePicker();
             this.label6 = new System.Windows.Forms.Label();
             this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
-            this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.Rn = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.Num = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.Setting = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
-            this.PrintTest = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ma_printcount = new System.Windows.Forms.Label();
             this.ma_qty = new System.Windows.Forms.Label();
             this.lade = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
-            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.label5 = new System.Windows.Forms.Label();
             this.pr_detail = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
-            this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.label8 = new System.Windows.Forms.Label();
+            this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Rn = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Num = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Setting = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.PrintTest = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
             this.SuspendLayout();
             // 
@@ -73,18 +73,18 @@
             // 
             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(211, 703);
+            this.label3.Location = new System.Drawing.Point(171, 706);
             this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(82, 41);
+            this.label3.Size = new System.Drawing.Size(146, 41);
             this.label3.TabIndex = 31;
-            this.label3.Text = "流水";
+            this.label3.Text = "起始流水";
             // 
             // label2
             // 
             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(211, 468);
+            this.label2.Location = new System.Drawing.Point(223, 468);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(82, 41);
@@ -95,7 +95,7 @@
             // 
             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(211, 547);
+            this.label1.Location = new System.Drawing.Point(223, 547);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(82, 41);
@@ -132,6 +132,126 @@
             0,
             0});
             // 
+            // ma_printcount
+            // 
+            this.ma_printcount.AutoSize = true;
+            this.ma_printcount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_printcount.Location = new System.Drawing.Point(650, 247);
+            this.ma_printcount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_printcount.Name = "ma_printcount";
+            this.ma_printcount.Size = new System.Drawing.Size(0, 41);
+            this.ma_printcount.TabIndex = 237;
+            // 
+            // ma_qty
+            // 
+            this.ma_qty.AutoSize = true;
+            this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty.Location = new System.Drawing.Point(349, 247);
+            this.ma_qty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_qty.Name = "ma_qty";
+            this.ma_qty.Size = new System.Drawing.Size(0, 41);
+            this.ma_qty.TabIndex = 236;
+            // 
+            // lade
+            // 
+            this.lade.AutoSize = true;
+            this.lade.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lade.Location = new System.Drawing.Point(492, 247);
+            this.lade.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lade.Name = "lade";
+            this.lade.Size = new System.Drawing.Size(146, 41);
+            this.lade.TabIndex = 235;
+            this.lade.Text = "已打印数";
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.Location = new System.Drawing.Point(171, 247);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(146, 41);
+            this.label7.TabIndex = 234;
+            this.label7.Text = "工单数量";
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(171, 181);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(146, 41);
+            this.label5.TabIndex = 232;
+            this.label5.Text = "工单编号";
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail.Location = new System.Drawing.Point(349, 397);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.TabIndex = 241;
+            // 
+            // label4
+            // 
+            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(171, 397);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(146, 41);
+            this.label4.TabIndex = 240;
+            this.label4.Text = "产品名称";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(171, 320);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(146, 41);
+            this.label8.TabIndex = 238;
+            this.label8.Text = "产品代码";
+            // 
+            // pr_code
+            // 
+            this.pr_code.AllPower = null;
+            this.pr_code.BackColor = System.Drawing.Color.White;
+            this.pr_code.ID = null;
+            this.pr_code.Location = new System.Drawing.Point(356, 329);
+            this.pr_code.Name = "pr_code";
+            this.pr_code.Power = null;
+            this.pr_code.Size = new System.Drawing.Size(388, 35);
+            this.pr_code.Str = null;
+            this.pr_code.Str1 = null;
+            this.pr_code.Str2 = null;
+            this.pr_code.TabIndex = 239;
+            // 
+            // ma_code
+            // 
+            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(356, 181);
+            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(409, 46);
+            this.ma_code.TabIndex = 233;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "makecode";
+            this.ma_code.TextBoxEnable = true;
+            // 
             // Export
             // 
             this.Export.AllPower = null;
@@ -231,126 +351,6 @@
             this.PrintTest.UseVisualStyleBackColor = true;
             this.PrintTest.Click += new System.EventHandler(this.PrintTest_Click);
             // 
-            // ma_printcount
-            // 
-            this.ma_printcount.AutoSize = true;
-            this.ma_printcount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_printcount.Location = new System.Drawing.Point(650, 247);
-            this.ma_printcount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.ma_printcount.Name = "ma_printcount";
-            this.ma_printcount.Size = new System.Drawing.Size(0, 41);
-            this.ma_printcount.TabIndex = 237;
-            // 
-            // ma_qty
-            // 
-            this.ma_qty.AutoSize = true;
-            this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty.Location = new System.Drawing.Point(349, 247);
-            this.ma_qty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.ma_qty.Name = "ma_qty";
-            this.ma_qty.Size = new System.Drawing.Size(0, 41);
-            this.ma_qty.TabIndex = 236;
-            // 
-            // lade
-            // 
-            this.lade.AutoSize = true;
-            this.lade.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.lade.Location = new System.Drawing.Point(492, 247);
-            this.lade.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.lade.Name = "lade";
-            this.lade.Size = new System.Drawing.Size(146, 41);
-            this.lade.TabIndex = 235;
-            this.lade.Text = "已打印数";
-            // 
-            // label7
-            // 
-            this.label7.AutoSize = true;
-            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(171, 247);
-            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(146, 41);
-            this.label7.TabIndex = 234;
-            this.label7.Text = "工单数量";
-            // 
-            // ma_code
-            // 
-            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(356, 181);
-            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(409, 46);
-            this.ma_code.TabIndex = 233;
-            this.ma_code.TableName = null;
-            this.ma_code.Tag = "makecode";
-            this.ma_code.TextBoxEnable = true;
-            // 
-            // label5
-            // 
-            this.label5.AutoSize = true;
-            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(171, 181);
-            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(146, 41);
-            this.label5.TabIndex = 232;
-            this.label5.Text = "工单编号";
-            // 
-            // pr_detail
-            // 
-            this.pr_detail.AutoSize = true;
-            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(349, 397);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 41);
-            this.pr_detail.TabIndex = 241;
-            // 
-            // label4
-            // 
-            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(171, 397);
-            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(146, 41);
-            this.label4.TabIndex = 240;
-            this.label4.Text = "产品名称";
-            // 
-            // pr_code
-            // 
-            this.pr_code.AllPower = null;
-            this.pr_code.BackColor = System.Drawing.Color.White;
-            this.pr_code.ID = null;
-            this.pr_code.Location = new System.Drawing.Point(356, 329);
-            this.pr_code.Name = "pr_code";
-            this.pr_code.Power = null;
-            this.pr_code.Size = new System.Drawing.Size(388, 35);
-            this.pr_code.Str = null;
-            this.pr_code.Str1 = null;
-            this.pr_code.Str2 = null;
-            this.pr_code.TabIndex = 239;
-            // 
-            // label8
-            // 
-            this.label8.AutoSize = true;
-            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label8.Location = new System.Drawing.Point(171, 320);
-            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(146, 41);
-            this.label8.TabIndex = 238;
-            this.label8.Text = "产品代码";
-            // 
             // SystemSetting_PrinterTest
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);

+ 1 - 6
UAS_MES_LGDZ/FunctionCode/SystemSetting/SystemSetting_PrinterTest.cs

@@ -73,7 +73,7 @@ namespace UAS_MES_NEW.SystemSetting
                     return;
                 }
             }*/
-            for (int i = int.Parse(Rn.Text); i < (int.Parse(Num.Text) + int.Parse(Rn.Text)); i = i + 4)
+            for (int i = int.Parse(Rn.Text); i < (int.Parse(Num.Text) + int.Parse(Rn.Text)); i = i + 3)
             {
                 int temp = i;
                 for (int j = 0; j < format.SubStrings.Count; j++)
@@ -95,11 +95,6 @@ namespace UAS_MES_NEW.SystemSetting
                             if (!dh.CheckExist("makesnlist", "msl_sncode='" + format.SubStrings[j].Value + "' and msl_makecode='" + ma_code.Text + "'"))
                                 dh.ExecuteSql("insert into makesnlist(msl_id,msl_indate,msl_makecode,msl_sncode,msl_type,msl_printstatus)values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "','" + format.SubStrings[j].Value + "','before',-1)", "insert");
                             break;
-                        case "SN4":
-                            format.SubStrings[j].Value = (ma_code.Text + Date.Value.ToString("yyyyMMdd") + lpad(int.Parse(numericUpDown1.Value.ToString()), (temp + 3).ToString()));
-                            if (!dh.CheckExist("makesnlist", "msl_sncode='" + format.SubStrings[j].Value + "' and msl_makecode='" + ma_code.Text + "'"))
-                                dh.ExecuteSql("insert into makesnlist(msl_id,msl_indate,msl_makecode,msl_sncode,msl_type,msl_printstatus)values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "','" + format.SubStrings[j].Value + "','before',-1)", "insert");
-                            break;
                         default:
                             break;
                     }

+ 2 - 2
UAS_MES_LGDZ/FunctionCode/SystemSetting/SystemSetting_PrinterTest.resx

@@ -215,7 +215,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -346,7 +346,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B

+ 3 - 3
UAS_MES_LGDZ/PublicMethod/Print.cs

@@ -241,7 +241,7 @@ namespace UAS_MES_NEW.PublicMethod
             {
                 if (LabelType == "卡通箱标" || LabelType == "大箱标" || LabelType == "彩盒标")
                 {
-                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "' and lpl_file='" + LabelName + "'", "select");
+                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "'  and lpl_file='" + LabelName + "'", "select");
                     if (dt.Rows.Count == 0)
                     {
                         ErrorMessage = SnCode + LabelType + "未打印,不允许补打";
@@ -270,7 +270,7 @@ namespace UAS_MES_NEW.PublicMethod
                                 string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                 fp_name = label.Rows[0]["fp_name"].ToString();
                                 WebClient wc = new WebClient();
-                                wc.DownloadFile("http://218.64.89.153:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                wc.DownloadFile("http://10.98.0.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
                             }
                         }
                     }
@@ -299,7 +299,7 @@ namespace UAS_MES_NEW.PublicMethod
                                     string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                     fp_name = label.Rows[0]["fp_name"].ToString();
                                     WebClient wc = new WebClient();
-                                    wc.DownloadFile("http://218.64.89.153:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                    wc.DownloadFile("http://10.98.0.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
                                     FileInfo file = new FileInfo(@"C:\打印标签\" + fp_name);
                                     file.CreationTime = Convert.ToDateTime(filelastwritetime);
                                 }