Browse Source

注浆打印

chenxy 1 year ago
parent
commit
6217c29cf3

+ 6 - 6
DK.Basics/InvoiceLayout/Items/TextItem.cs

@@ -1265,9 +1265,9 @@ namespace Dongke.WinForm.Controls.InvoiceLayout
                         ops.ImageHeight = LayoutCommon.MillimeterToPixelDpi(rectangleM.Height, graphics.DpiX);
                         ops.DpiX = graphics.DpiX;
                         ops.DpiY = graphics.DpiY;
-                        //QRCodeEncodingOptions qre = new QRCodeEncodingOptions();
-                        //qre.ECLevel = QRECLevel.L;
-                        using (Image pic1 = QRCodeHelper.GetQRCodeImage(value.ToString(), ops))
+                        QRCodeEncodingOptions qre = new QRCodeEncodingOptions();
+                        qre.ECLevel = QRECLevel.Q;
+                        using (Image pic1 = QRCodeHelper.GetQRCodeImage(value.ToString(), ops, qre))
                         {
                             graphics.DrawImage(pic1, rectangleM, ops.ImageRect, GraphicsUnit.Pixel);
                         }
@@ -1292,9 +1292,9 @@ namespace Dongke.WinForm.Controls.InvoiceLayout
                         ops.ImageHeight = LayoutCommon.MillimeterToPixelDpi(rectangleM.Height, graphics.DpiX);
                         ops.DpiX = graphics.DpiX;
                         ops.DpiY = graphics.DpiY;
-                        //QRCodeEncodingOptions qre = new QRCodeEncodingOptions();
-                        //qre.ECLevel = QRECLevel.H;
-                        pic = QRCodeHelper.GetQRCodeImage(value.ToString(), ops);
+                        QRCodeEncodingOptions qre = new QRCodeEncodingOptions();
+                        qre.ECLevel = QRECLevel.Q;
+                        pic = QRCodeHelper.GetQRCodeImage(value.ToString(), ops, qre);
                         //pic.Save("C://1.png");
                         if (!isPrint)
                         {

+ 13 - 0
DK.Basics/InvoiceLayout/LayoutBox.cs

@@ -1209,6 +1209,19 @@ namespace Dongke.WinForm.Controls.InvoiceLayout
                         {
                             this.OneGridItem = item as GridItem;
                         }
+
+                        // TODO 
+                        if (item is TextItem)
+                        {
+                            TextItem ttt = (item as TextItem);
+                            if (ttt.ItemCode == "OUTONLYCODE2")
+                            {
+                                ttt.ItemCode = "OUTONLYCODE2_HTTP";
+                                ttt.DataMember = "WaiterCodeHttp";
+                                ttt.ItemSample = "https://hap.hegii.com/jump?state=productInfo-F01020300100015020181105003N";
+                                ttt.DisplayValue = ttt.ItemSample;
+                            }
+                        }
                     }
                 }
                 err_level = 7;

+ 2 - 2
DK.Client/Client.Controls/Layout/F_MST_012003.resx

@@ -118,7 +118,7 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <metadata name="tsrOperate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>147, 17</value>
+    <value>17, 55</value>
   </metadata>
   <data name="lbxInvoice.PaperSize" mimetype="application/x-microsoft.net.object.binary.base64">
     <value>
@@ -159,7 +159,7 @@
 </value>
   </data>
   <metadata name="mnsInvoice.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>262, 17</value>
+    <value>17, 93</value>
   </metadata>
   <metadata name="ItemCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>