Parcourir la source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy il y a 8 ans
Parent
commit
90263519ac

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

@@ -78,7 +78,7 @@ namespace UAS_MES.Make
                 sql.Clear();
                 sql.Append("select ms_makecode,mcd_inqty,ma_qty,ma_qty-mcd_inqty as mcd_waitqty,ma_salecode,pr_detail,pr_colorboxunit,pr_code,pr_colorboxgw,");
                 sql.Append("pr_colorboxunit,pr_colorboxmaxw,pr_colorboxminw from makeserial left join make on ms_makecode=ma_code left join product on ");
-                sql.Append("ms_prodcode=pr_code left join makecraftdetail on ms_makecode=mcd_macode where ms_sncode='" + sncode.Text + "'");
+                sql.Append("ms_prodcode=pr_code left join makecraftdetail on ms_makecode=mcd_macode where ms_sncode='" + sncode.Text + "' order by ms_id desc");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
                 {

+ 20 - 18
UAS-MES/FunctionCode/SystemSetting/SystemSetting_LabelMaintain.cs

@@ -9,6 +9,7 @@ using System.Windows.Forms;
 using UAS_MES.CustomControl.TextBoxWithIcon;
 using UAS_MES.DataOperate;
 using UAS_MES.Properties;
+using UAS_MES.PublicForm;
 using UAS_MES.PublicMethod;
 
 namespace UAS_MES.SystemSetting
@@ -55,7 +56,7 @@ namespace UAS_MES.SystemSetting
         //添加在grid末列的操作列
         DataTable dbfind;
 
-
+        Thread InitPrint;
         DataGridViewImageColumn PerviewColumn = new DataGridViewImageColumn
         {
             Image = Resources.preview_16px_25980_easyicon_net,
@@ -85,28 +86,18 @@ namespace UAS_MES.SystemSetting
             InitializeComponent();
 
         }
-
-        //创建打印进程
-        private void NewPrint()
-        {
-            try
-            {
-                lbl = new ApplicationClass();
-            }
-            catch
-            {
-                MessageBox.Show("未正确安装CodeSoft软件");
-            }
-        }
-
+        
         private void 条码维护_Load(object sender, EventArgs e)
         {
-            thread = new Thread(NewPrint);
-            thread.Start();
             asc.controllInitializeSize(this);
             dh = new DataHelper();
             condition.Append(" ");
             LoadData();
+            //加loading框
+            InitPrint = new Thread(InPrint);
+            SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
+            BaseUtil.SetFormCenter(stw);
+            stw.ShowDialog();
 
             pr_code.FormName = Name;
             pr_code.SetValueField = new string[] { "pr_code" };
@@ -128,7 +119,18 @@ namespace UAS_MES.SystemSetting
             pr_detail.KeyDown += ScreenEvent;
             pr_spec.KeyDown += ScreenEvent;
         }
-
+        private void InPrint()
+        {
+            try
+            {
+                lbl = new ApplicationClass();
+                BaseUtil.WriteLbl(lbl);
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show("未正确安装codesoft");
+            }
+        }
         private void La_code_DbChange(object sender, EventArgs e)
         {
             dbfind = la_code.ReturnData;