浏览代码

bug修复,打印缓存问题

chenrui 3 年之前
父节点
当前提交
09da664d5e

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

@@ -192,12 +192,12 @@ export default {
         return
       }
       const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
+      document.getElementById('print').innerHTML = '<iframe id="printftod" name="printftod" src="' + url + '" hidden></iframe>'
       if (type == '1') { //  预览
         window.open(url)
       } else if (type == '0') { //  打印
-        window.frames['printf'].focus()
-        window.frames['printf'].print()
+        window.frames['printftod'].focus()
+        window.frames['printftod'].print()
       }
     }
   },

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

@@ -540,12 +540,12 @@ export default {
         return
       }
       const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
+      document.getElementById('print').innerHTML = '<iframe id="printftoe" name="printftoe" src="' + url + '" hidden></iframe>'
       if (type == '1') { //  预览
         window.open(url)
       } else if (type == '0') { //  打印
-        window.frames['printf'].focus()
-        window.frames['printf'].print()
+        window.frames['printftoe'].focus()
+        window.frames['printftoe'].print()
       }
     },
     pageInit () {

+ 3 - 3
src/views/salesManagement/backorder/detailModal.vue

@@ -135,12 +135,12 @@ export default {
         return
       }
       const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
+      document.getElementById('print').innerHTML = '<iframe id="printfbod" name="printfbod" src="' + url + '" hidden></iframe>'
       if (type == 'preview') { //  预览
         window.open(url)
       } else if (type == 'print') { //  打印
-        window.frames['printf'].focus()
-        window.frames['printf'].print()
+        window.frames['printfbod'].focus()
+        window.frames['printfbod'].print()
       }
     }
   },

+ 3 - 3
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -206,9 +206,9 @@ export default {
         return
       }
       const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
-      window.frames['printf'].focus()
-      window.frames['printf'].print()
+      document.getElementById('print').innerHTML = '<iframe id="printfpmd" name="printfpmd" src="' + url + '" hidden></iframe>'
+      window.frames['printfpmd'].focus()
+      window.frames['printfpmd'].print()
     }
   },
   mounted () {

+ 3 - 3
src/views/salesManagement/salesQuery/detail.vue

@@ -286,12 +286,12 @@ export default {
         return
       }
       const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
+      document.getElementById('print').innerHTML = '<iframe id="printfsqd" name="printfsqd" src="' + url + '" hidden></iframe>'
       if (type == 'preview') { //  预览
         window.open(url)
       } else if (type == 'print') { //  打印
-        window.frames['printf'].focus()
-        window.frames['printf'].print()
+        window.frames['printfsqd'].focus()
+        window.frames['printfsqd'].print()
       }
     },
     download (data) {

+ 3 - 3
src/views/salesManagement/salesReturn/detail.vue

@@ -289,12 +289,12 @@ export default {
         return
       }
       const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
+      document.getElementById('print').innerHTML = '<iframe id="printfsrd" name="printfsrd" src="' + url + '" hidden></iframe>'
       if (type == 'preview') { //  预览
         window.open(url)
       } else if (type == 'print') { //  打印
-        window.frames['printf'].focus()
-        window.frames['printf'].print()
+        window.frames['printfsrd'].focus()
+        window.frames['printfsrd'].print()
       }
     },
     download (data) {