Bläddra i källkod

Merge branch 'develop' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop

chenrui 3 år sedan
förälder
incheckning
5536a30b0f
3 ändrade filer med 12 tillägg och 9 borttagningar
  1. 3 3
      src/api/sales.js
  2. 7 4
      src/libs/JGPrint.js
  3. 2 2
      vue.config.js

+ 3 - 3
src/api/sales.js

@@ -138,9 +138,9 @@ export const salesDetailPrint = params => {
     method: 'get'
   }
   // 喷墨打印
-  if (params.type == 'INK') {
-    data.responseType = 'blob'
-  }
+  // if (params.type == 'INK') {
+  //   data.responseType = 'blob'
+  // }
   return axios.request(data)
 }
 // 销售 详情  导出

+ 7 - 4
src/libs/JGPrint.js

@@ -38,14 +38,17 @@ export const JGPrint = function (data, type, printerType) {
     }
   } else {
     // 喷墨打印
-    const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-    document.getElementById('print').innerHTML = '<iframe id="printfsqd" name="printfsqd" src="' + url + '" hidden></iframe>'
+    // const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
+    // document.getElementById('print').innerHTML = '<iframe id="printfsqd" name="printfsqd" src="' + url + '" hidden></iframe>'
     if (type == 'preview') { //  预览
       // window.open(url)
+      console.log(data.data)
       const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
-            LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data)
+            LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
             LODOP.SET_PRINT_STYLEA(0, 'PDFScalMode', 1)
-            LODOP.SET_PRINT_PAGESIZE(3, 0, 0, '')
+            LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data.data)
+            LODOP.SET_PRINT_PAGESIZE(3, 2090, 0, '')
+            LODOP.PREVIEW()
     } else if (type == 'print') { //  打印
       window.frames['printfsqd'].focus()
       window.frames['printfsqd'].print()

+ 2 - 2
vue.config.js

@@ -108,8 +108,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.103:8503/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md', //  Ô¤·¢²¼
+        target: 'http://192.168.16.151:8503/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md', //  Ô¤·¢²¼
         // target: 'http://qpls-md.360arrow.com/qpls-md', //  Éú²ú
         // ws: false,
         ws: true,