Browse Source

添加机身标副标签

callm 6 months ago
parent
commit
da3cb0fdfc

+ 1 - 1
UAS_MES_LGDZ/CustomControl/HeadBar/HeadBar.cs

@@ -122,7 +122,7 @@ namespace UAS_MES_NEW.CustomControl
                 if (logout_confirm == "Yes")
                 {
                     //注销的时候切换回默认数据库
-                    SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.11.28.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+                    SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
                     DataHelper.DBConnectionString = SystemInf.ConnectionString;
                     //清除上个用户的权限信息
                     SystemInf.Caller.Clear();

+ 3 - 3
UAS_MES_LGDZ/DataOperate/DataHelper.cs

@@ -10,11 +10,11 @@ namespace UAS_MES_NEW.DataOperate
     class DataHelper
     {
         //系统默认的的连接字符串 
-        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.11.28.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
 
-        //public static readonly string ERPAddesss = "http://10.11.28.21:8099/mes/";
+        //public static readonly string ERPAddesss = "http://10.98.0.21:8099/mes/";
 
-        public static readonly string ERPAddesss = "http://10.11.28.21:8099/mes/";
+        public static readonly string ERPAddesss = "http://10.98.0.21:8099/mes/";
 
         //用户选择的数据库的连接字符串
         public static string DBConnectionString;

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Make/Make_CustomLabelPrint.cs

@@ -167,7 +167,7 @@ namespace UAS_MES_NEW.Make
                                             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://10.11.28.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                            wc.DownloadFile("http://10.98.0.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
                                         }
                                     }
                                 }

+ 107 - 3
UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrint.Designer.cs

@@ -52,6 +52,13 @@
             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.PrintNum1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.PrintSecond = new System.Windows.Forms.CheckBox();
+            this.PrintLabel1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.label7 = new System.Windows.Forms.Label();
+            this.PrintList1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.label8 = new System.Windows.Forms.Label();
             this.SuspendLayout();
             // 
             // label2
@@ -161,7 +168,7 @@
             this.CollectRemark.Checked = true;
             this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CollectRemark.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.CollectRemark.Location = new System.Drawing.Point(1437, 315);
+            this.CollectRemark.Location = new System.Drawing.Point(1421, 564);
             this.CollectRemark.Margin = new System.Windows.Forms.Padding(6);
             this.CollectRemark.Name = "CollectRemark";
             this.CollectRemark.Size = new System.Drawing.Size(155, 39);
@@ -204,7 +211,7 @@
             // Remark
             // 
             this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Remark.Location = new System.Drawing.Point(1430, 370);
+            this.Remark.Location = new System.Drawing.Point(1414, 619);
             this.Remark.Margin = new System.Windows.Forms.Padding(6, 3, 6, 3);
             this.Remark.Name = "Remark";
             this.Remark.Size = new System.Drawing.Size(378, 156);
@@ -337,11 +344,101 @@
             this.OperateResult.TabIndex = 168;
             this.OperateResult.Text = "";
             // 
+            // PrintNum1
+            // 
+            this.PrintNum1.AllPower = null;
+            this.PrintNum1.BackColor = System.Drawing.Color.White;
+            this.PrintNum1.ID = null;
+            this.PrintNum1.Location = new System.Drawing.Point(1664, 309);
+            this.PrintNum1.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum1.Name = "PrintNum1";
+            this.PrintNum1.Negative = false;
+            this.PrintNum1.Power = null;
+            this.PrintNum1.Size = new System.Drawing.Size(85, 35);
+            this.PrintNum1.Str = null;
+            this.PrintNum1.Str1 = null;
+            this.PrintNum1.Str2 = null;
+            this.PrintNum1.TabIndex = 220;
+            this.PrintNum1.Text = "1";
+            // 
+            // label3
+            // 
+            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(1570, 305);
+            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.TabIndex = 219;
+            this.label3.Text = "份数";
+            // 
+            // PrintSecond
+            // 
+            this.PrintSecond.AutoSize = true;
+            this.PrintSecond.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintSecond.ForeColor = System.Drawing.Color.Red;
+            this.PrintSecond.Location = new System.Drawing.Point(1396, 316);
+            this.PrintSecond.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintSecond.Name = "PrintSecond";
+            this.PrintSecond.Size = new System.Drawing.Size(162, 28);
+            this.PrintSecond.TabIndex = 218;
+            this.PrintSecond.Text = "打印副标签";
+            this.PrintSecond.UseVisualStyleBackColor = true;
+            // 
+            // PrintLabel1
+            // 
+            this.PrintLabel1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel1.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintLabel1.FormattingEnabled = true;
+            this.PrintLabel1.Location = new System.Drawing.Point(1516, 447);
+            this.PrintLabel1.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintLabel1.Name = "PrintLabel1";
+            this.PrintLabel1.Size = new System.Drawing.Size(264, 39);
+            this.PrintLabel1.TabIndex = 216;
+            // 
+            // 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(1388, 442);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(101, 41);
+            this.label7.TabIndex = 217;
+            this.label7.Text = "标签1";
+            // 
+            // PrintList1
+            // 
+            this.PrintList1.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintList1.Location = new System.Drawing.Point(1516, 377);
+            this.PrintList1.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.PrintList1.Name = "PrintList1";
+            this.PrintList1.Size = new System.Drawing.Size(264, 56);
+            this.PrintList1.TabIndex = 215;
+            // 
+            // 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(1381, 377);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(133, 41);
+            this.label8.TabIndex = 214;
+            this.label8.Text = "打印机1";
+            // 
             // Make_FuselageLabelPrint
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1828, 896);
+            this.Controls.Add(this.PrintNum1);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.PrintSecond);
+            this.Controls.Add(this.PrintLabel1);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.PrintList1);
+            this.Controls.Add(this.label8);
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.CollectRemark);
@@ -374,7 +471,7 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_FuselageLabelPrint_FormClosing);
             this.Load += new System.EventHandler(this.Make_FuselageLabelPrint_Load);
             this.SizeChanged += new System.EventHandler(this.Make_FuselageLabelPrint_SizeChanged);
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -404,5 +501,12 @@
         private CustomControl.RichText.RichTextAutoBottom Remark;
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum1;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.CheckBox PrintSecond;
+        private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel1;
+        private System.Windows.Forms.Label label7;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrintList1;
+        private System.Windows.Forms.Label label8;
     }
 }

+ 19 - 2
UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -228,6 +228,17 @@ namespace UAS_MES_NEW.Make
                             {
                                 OperateResult.AppendText(oErrorMessage + "\n", Color.Red);
                             }
+                            if (PrintSecond.Checked)
+                            {
+                                if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, sncode.Text, int.Parse(PrintNum1.Text), oMakeCode, ma_prodcode.Text, "彩盒标", "0", out oErrorMessage))
+                                {
+                                    OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
+                                }
+                                else
+                                {
+                                    OperateResult.AppendText(oErrorMessage + "\n", Color.Red);
+                                }
+                            }
                             //if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, ma_prodcode.Text, "机身标", "0", out oErrorMessage))
                             //{
                             //    //提示用户打印成功
@@ -292,9 +303,10 @@ namespace UAS_MES_NEW.Make
                 }
             }
         }
+        DataTable _dt;
         private void pr_code_TextChanged(object sender, EventArgs e)
         {
-            DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode='" + ma_prodcode.Text + "' and la_templatetype='机身标' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode='" + ma_prodcode.Text + "' and la_templatetype='机身标' and la_statuscode='AUDITED' order by la_isdefault", "select");
             if (_dt.Rows.Count == 0)
             {
                 _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode is null and la_templatetype='机身标' and la_statuscode='AUDITED' order by la_isdefault", "select");
@@ -302,10 +314,15 @@ namespace UAS_MES_NEW.Make
             if (_dt.Rows.Count > 0)
             {
                 string la_id = _dt.Rows[0]["la_id"].ToString();
-                _dt = (DataTable)dh.ExecuteSql("select fp_name la_url,'" + la_id + "' la_id from FILEPATH where fp_id in (select *  from table(select parsestring(LA_SOFTTYPE,';') from label where la_id='"+la_id+"' ) where COLUMN_VALUE is not null)", "select");
+                _dt = (DataTable)dh.ExecuteSql("select fp_name la_url,'" + la_id + "' la_id from FILEPATH where fp_id in (select *  from table(select parsestring(LA_SOFTTYPE,';') from label where la_templatetype='机身标' and la_id='" + la_id + "') where COLUMN_VALUE is not null)", "select");
                 PrintLabel.DataSource = _dt;
                 PrintLabel.DisplayMember = "la_url";
                 PrintLabel.ValueMember = "la_id";
+
+                PrintLabel1.DataSource = _dt.Copy();
+                PrintLabel1.DisplayMember = "la_url";
+                PrintLabel1.ValueMember = "la_id";
+
                 pr_change = true;
             }
         }

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Query/Query_SpecialReport.resx

@@ -121,7 +121,7 @@
     <value>17, 17</value>
   </metadata>
   <metadata name="ExportFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>282, 17</value>
+    <value>422, 17</value>
   </metadata>
   <metadata name="ImportExcel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>1018, 17</value>

+ 2 - 2
UAS_MES_LGDZ/Login.cs

@@ -47,7 +47,7 @@ namespace UAS_MES_NEW
         {
             BaseUtil.FormStepInOrOut(this, true);
             //设置默认数据库
-            SystemInf.DefaultDB = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.11.28.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            SystemInf.DefaultDB = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.ProcessesID = System.Diagnostics.Process.GetCurrentProcess().Id;
             CheckForIllegalCrossThreadCalls = false;
             LoadMasterInf = new Thread(LoadMaster);
@@ -94,7 +94,7 @@ namespace UAS_MES_NEW
             //设置选中数据库的链接
             string DBUser = DB.SelectedValue.ToString().Split('#')[0];
             string Address = DB.SelectedValue.ToString().Split('#')[1];
-            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.11.28.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.CurrentDB = DBUser;
             //设置屏幕的宽高信息
             SystemInf.ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;

+ 1 - 1
UAS_MES_LGDZ/Main.cs

@@ -357,7 +357,7 @@ namespace UAS_MES_NEW
             if (logout_confirm == "Yes")
             {
                 //注销的时候切换回默认数据库
-                SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.11.28.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+                SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
                 DataHelper.DBConnectionString = SystemInf.ConnectionString;
                 //清除上个用户的权限信息
                 SystemInf.Caller.Clear();

+ 2 - 2
UAS_MES_LGDZ/PublicMethod/Print.cs

@@ -285,7 +285,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://10.11.28.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                wc.DownloadFile("http://10.98.0.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
                             }
                         }
                     }
@@ -314,7 +314,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://10.11.28.21: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);
                                 }