lilei 3 年之前
父節點
當前提交
2d96e49c64

+ 4 - 4
src/libs/JGPrint.js

@@ -85,7 +85,7 @@ export const blobToBaseByPdf = function(data,callback){
 }
 
 // 打印html
-export const jGPrint = function (data, type, printLogParams, callback) {
+export const jGPrint = function (data, type, callback, printLogParams) {
     if (!data) {
       return
     }
@@ -115,7 +115,7 @@ export const jGPrint = function (data, type, printLogParams, callback) {
     LODOP.On_Return=function(TaskID,Value){
        console.log(TaskID,Value)
        // 已打印
-       if(Value){
+       if(Value&&printLogParams){
          console.log('已打印,统计打印次数')
          printLog(printLogParams,callback)
        }
@@ -130,7 +130,7 @@ export const jGPrint = function (data, type, printLogParams, callback) {
 }
 
 // 打印
-export const printFun = function(url,params,type,taskName,printLogParams,callback){
+export const printFun = function(url,params,type,taskName,callback,printLogParams){
   url(params).then(res => {
     if (res.type == 'application/json') {
       var reader = new FileReader()
@@ -197,7 +197,7 @@ export const jGPrintPdf = function (data, type, taskName, printLogParams,callbac
       LODOP.On_Return=function(TaskID,Value){
          console.log(TaskID,Value)
          // 已打印
-         if(Value){
+         if(Value&&printLogParams){
            console.log('已打印,统计打印次数')
            printLog(printLogParams,callback)
          }

+ 4 - 4
src/views/allocationManagement/transferOut/detail.vue

@@ -211,15 +211,15 @@ export default {
         params,
         objs.isPreview ? 'preview' : 'print',
         taskName,
+        (res) => {
+          _this.$message.info(res.message)
+          _this.spinning = false
+        },
         {
           billType: 'ALLOCATE',
           billSn: objs.allocateSn,
           billNo: objs.allocateNo,
           printType: taskName + '打印'
-        },
-        (res) => {
-          _this.$message.info(res.message)
-          _this.spinning = false
         })
     },
     pageInit () {

+ 4 - 4
src/views/allocationManagement/transferOut/edit.vue

@@ -579,15 +579,15 @@ export default {
         params,
         objs.isPreview ? 'preview' : 'print',
         taskName,
+        (res) => {
+          _this.$message.info(res.message)
+          _this.spinning = false
+        },
         {
           billType: 'ALLOCATE',
           billSn: objs.allocateSn,
           billNo: objs.allocateNo,
           printType: taskName + '打印'
-        },
-        (res) => {
-          _this.$message.info(res.message)
-          _this.spinning = false
         })
     },
     // 刷新当前页面

+ 5 - 6
src/views/allocationManagement/transfersPrint/list.vue

@@ -256,18 +256,17 @@ export default {
         params,
         objs.isPreview ? 'preview' : 'print',
         '调拨分类',
-        {
-          billType: 'ALLOCATE',
-          billSn: objs.allocateSn,
-          billNo: objs.allocateNo,
-          printType: '调拨分类打印'
-        },
         (res) => {
           _this.spinning = false
           if (res.status == 200) {
             _this.$refs.table.refresh()
           }
           _this.$message.info(res.message)
+        }, {
+          billType: 'ALLOCATE',
+          billSn: objs.allocateSn,
+          billNo: objs.allocateNo,
+          printType: '调拨分类打印'
         })
     },
     //  详情