Explorar o código

优化打印功能

callm hai 1 día
pai
achega
f1a98607d7

+ 4 - 0
UAS_MES_ZDXW/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -304,6 +304,10 @@ namespace UAS_MES_NEW.Make
         private void pr_code_TextChanged(object sender, EventArgs e)
         {
             _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault from label where la_prodcode='" + pr_code.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 from label where la_prodcode is null and la_templatetype='彩盒标' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            }
             PrintLabel.DataSource = _dt;
             PrintLabel.DisplayMember = "la_url";
             PrintLabel.ValueMember = "la_id";

+ 0 - 10
UAS_MES_ZDXW/Properties/Resources.Designer.cs

@@ -157,16 +157,6 @@ namespace UAS_MES_NEW.Properties {
             }
         }
         
-        /// <summary>
-        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
-        /// </summary>
-        internal static System.Drawing.Bitmap _5600c803afc2d {
-            get {
-                object obj = ResourceManager.GetObject("_5600c803afc2d", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 0 - 3
UAS_MES_ZDXW/Properties/Resources.resx

@@ -382,9 +382,6 @@
   <data name="_46" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\46.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="_5600c803afc2d" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\5600c803afc2d.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
-  </data>
   <data name="_83" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\83.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>

+ 17 - 17
UAS_MES_ZDXW/PublicMethod/Print.cs

@@ -340,23 +340,23 @@ namespace UAS_MES_NEW.PublicMethod
         {
             ErrorMessage = "";
             DataTable dt = new DataTable();
-            //if (IfRePrint != "-1")
-            //{
-            //    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 + "'", "select");
-            //    }
-            //    else
-            //    {
-            //        dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_makecode='" + MakeCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
-            //    }
-            //    ////如果已经打印过了,则不允许再打印
-            //    if (dt.Rows.Count > 0)
-            //    {
-            //        ErrorMessage = SnCode + LabelType + "已打印";
-            //        return false;
-            //    }
-            //}
+            if (IfRePrint != "-1")
+            {
+                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 + "'", "select");
+                }
+                else
+                {
+                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_makecode='" + MakeCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
+                }
+                ////如果已经打印过了,则不允许再打印
+                if (dt.Rows.Count > 0)
+                {
+                    ErrorMessage = SnCode + LabelType + "已打印";
+                    return false;
+                }
+            }
             string filelastwritetime = dh.getFieldDataByCondition("label", "la_lastwritetime", "la_id = '" + LaID + "'").ToString();
             FileInfo PrintFile = new FileInfo(LabelName);
             //打开模板路径

+ 0 - 3
UAS_MES_ZDXW/UAS_MES_ZDXW.csproj

@@ -1673,14 +1673,12 @@
     <Content Include="adbtool\AdbWinUsbApi.dll" />
     <Content Include="adbtool\dmtracedump.exe" />
     <Content Include="adbtool\etc1tool.exe" />
-    <Content Include="adbtool\fastboot.exe" />
     <Content Include="adbtool\hprof-conv.exe" />
     <Content Include="adbtool\libwinpthread-1.dll" />
     <Content Include="adbtool\make_f2fs.exe" />
     <Content Include="adbtool\make_f2fs_casefold.exe" />
     <Content Include="adbtool\mke2fs.exe" />
     <Content Include="adbtool\NOTICE.txt" />
-    <Content Include="adbtool\sqlite3.exe" />
     <Content Include="Resources\07.gif" />
     <Content Include="Resources\0802192135.png" />
     <Content Include="Resources\2-0btn_04.png" />
@@ -1689,7 +1687,6 @@
     <Content Include="Resources\20130711113247276.png" />
     <Content Include="Resources\20170322091001575_easyicon_net_64.ico" />
     <Content Include="Resources\46.gif" />
-    <Content Include="Resources\5600c803afc2d.png" />
     <Content Include="Resources\83.gif" />
     <Content Include="Resources\Barcode_48px_1072745_easyicon.net.png" />
     <Content Include="Resources\bindingNavigatorAddNewItem.Image.png" />