lilei 2 years ago
parent
commit
8490dee903

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
 {
-    "version": "2.2.3",
+    "version": "2.2.4",
     "message": "发现有新版本发布,确定更新系统?"
     "message": "发现有新版本发布,确定更新系统?"
 }
 }

+ 5 - 4
src/views/expenseManagement/expenseReimbursement/previewModal.vue

@@ -143,12 +143,13 @@ export default {
     prints(){
     prints(){
       const _this = this
       const _this = this
       const html = document.getElementsByClassName('expense-detail-print')
       const html = document.getElementsByClassName('expense-detail-print')
+      const pageHeight = 535
       const printCons = []
       const printCons = []
       for (let i = 0; i < html.length; i++) {
       for (let i = 0; i < html.length; i++) {
         const h = html[i].clientHeight
         const h = html[i].clientHeight
         printCons.push({
         printCons.push({
-          h: h,
-          t: html[i].innerHTML
+          h: h<=pageHeight?pageHeight:h,
+          t: '<div style="height:'+(h<=pageHeight?(pageHeight+'px'):'auto')+';">'+html[i].innerHTML+'</div>'
         })
         })
       }
       }
       // 排序从小到大
       // 排序从小到大
@@ -156,12 +157,12 @@ export default {
         return a['h'] - b['h']
         return a['h'] - b['h']
       })
       })
       // 自动排版
       // 自动排版
-      const htmlStr = groupLessThan(printCons, 560*2)
+      const htmlStr = groupLessThan(printCons, pageHeight*2)
       // console.log(htmlStr.join('').split('&-NEWPAGE-&'))
       // console.log(htmlStr.join('').split('&-NEWPAGE-&'))
       this.$store.state.app.curActionPermission = 'B_eRPrint'
       this.$store.state.app.curActionPermission = 'B_eRPrint'
       // html, type, callback, printLogParams
       // html, type, callback, printLogParams
       // console.log(htmlStr)
       // console.log(htmlStr)
-      jGPlPrint(htmlStr.join('').split('&-NEWPAGE-&'), 'print', function (res) {
+      jGPlPrint(htmlStr.join('').split('&-NEWPAGE-&'), 'preview', function (res) {
         _this.$store.state.app.curActionPermission = ''
         _this.$store.state.app.curActionPermission = ''
         _this.$emit('printOk', res)
         _this.$emit('printOk', res)
       },null,'费用报销单')
       },null,'费用报销单')

+ 6 - 5
src/views/salesManagement/receiptPrint/printModel.vue

@@ -15,7 +15,7 @@
           <tr>
           <tr>
             <td>
             <td>
               <div class="print-box" style="width: 564pt;margin-left:1.5pt;">
               <div class="print-box" style="width: 564pt;margin-left:1.5pt;">
-                <div style="text-align:center;margin:15pt 0 5pt;font-size:22px;font-weight: bold;">收款通知单</div>
+                <div style="text-align:center;margin:5pt 0;font-size:22px;font-weight: bold;">收款通知单</div>
                 <div>
                 <div>
                   <div>
                   <div>
                     <table border="1" style="width: 564pt;border-collapse: collapse;text-align: center;">
                     <table border="1" style="width: 564pt;border-collapse: collapse;text-align: center;">
@@ -106,12 +106,13 @@ export default {
     handleCommonOk () {
     handleCommonOk () {
       const _this = this
       const _this = this
       const html = document.getElementsByClassName('sendGood-print-box')
       const html = document.getElementsByClassName('sendGood-print-box')
+      const pageHeight = 535
       const printCons = []
       const printCons = []
       for (let i = 0; i < html.length; i++) {
       for (let i = 0; i < html.length; i++) {
         const h = html[i].clientHeight
         const h = html[i].clientHeight
         printCons.push({
         printCons.push({
-          h: h,
-          t: html[i].innerHTML
+          h: h<=pageHeight?pageHeight:h,
+          t: '<div style="height:'+(h<=pageHeight?(pageHeight+'px'):'auto')+';">'+html[i].innerHTML+'</div>'
         })
         })
       }
       }
 
 
@@ -121,12 +122,12 @@ export default {
       })
       })
 
 
       // 自动排版
       // 自动排版
-      const htmlStr = groupLessThan(printCons, 1120)
+      const htmlStr = groupLessThan(printCons, pageHeight*2)
       // console.log(htmlStr.join('').split('&-NEWPAGE-&'))
       // console.log(htmlStr.join('').split('&-NEWPAGE-&'))
       this.$store.state.app.curActionPermission = 'B_SkPrint'
       this.$store.state.app.curActionPermission = 'B_SkPrint'
       // html, type, callback, printLogParams
       // html, type, callback, printLogParams
       this.spinning = true
       this.spinning = true
-      jGPlPrint(htmlStr.join('').split('&-NEWPAGE-&'), 'print', function (res) {
+      jGPlPrint(htmlStr.join('').split('&-NEWPAGE-&'), 'preview', function (res) {
         if(res){
         if(res){
           _this.handleCommonCancel()
           _this.handleCommonCancel()
         }
         }