lilei 3 years ago
parent
commit
21b85bd44d
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/libs/JGPrint.js
  2. 1 1
      src/views/salesManagement/sendOutOrder/printModel.vue

+ 2 - 2
src/libs/JGPrint.js

@@ -85,7 +85,7 @@ export const blobToBaseByPdf = function(data,callback){
 }
 }
 
 
 // 打印html
 // 打印html
-export const jGPrint = function (data, type, callback, printLogParams) {
+export const jGPrint = function (data, type, callback, printLogParams,printPageSize) {
     if (!data) {
     if (!data) {
       return
       return
     }
     }
@@ -123,7 +123,7 @@ export const jGPrint = function (data, type, callback, printLogParams) {
        }
        }
     };
     };
     LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', data)
     LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', data)
-    LODOP.SET_PRINT_PAGESIZE(3,2100,100,"");
+    LODOP.SET_PRINT_PAGESIZE(printPageSize||1,2100,printPageSize?100:40,"");
     if (type == 'preview') { //  预览
     if (type == 'preview') { //  预览
       LODOP.PREVIEW()
       LODOP.PREVIEW()
     } else if (type == 'print') { //  打印
     } else if (type == 'print') { //  打印

+ 1 - 1
src/views/salesManagement/sendOutOrder/printModel.vue

@@ -108,7 +108,7 @@ export default {
     dealBigMoney: dealBigMoney,
     dealBigMoney: dealBigMoney,
     printDom () {
     printDom () {
       const html = document.getElementById('sendGood-print').innerHTML
       const html = document.getElementById('sendGood-print').innerHTML
-      jGPrint(html, 'preview')
+      jGPrint(html, 'preview', function () {}, null, 3)
     }
     }
   }
   }
 }
 }