exportpdfshowstyle
This commit is contained in:
@@ -969,11 +969,12 @@ export default {
|
|||||||
this.useqrcode(row.离线合同流水号) // 显示二维码
|
this.useqrcode(row.离线合同流水号) // 显示二维码
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
const htmlNode = $('#offlineContract').html()
|
const htmlNode = $('#offlineContract').html()
|
||||||
const body = $('body')
|
const body = $('body').attr('style', 'padding: 20px;margin: 0 auto;display: block;width: 800px;background: #fff;')
|
||||||
body.children().hide()
|
body.children().hide()
|
||||||
const printNode = $(htmlNode)
|
const printNode = $(htmlNode)
|
||||||
body.append(printNode)
|
body.append(printNode)
|
||||||
window.print()
|
window.print()
|
||||||
|
body.removeAttr('style')
|
||||||
body.children().not('script').show()
|
body.children().not('script').show()
|
||||||
body.children().not('#app').hide()
|
body.children().not('#app').hide()
|
||||||
printNode.remove()
|
printNode.remove()
|
||||||
|
|||||||
@@ -249,11 +249,12 @@ export default {
|
|||||||
if (this.contractValue) {
|
if (this.contractValue) {
|
||||||
// exportExcelMethod('print', '采购合同', '采购合同sheet1')
|
// exportExcelMethod('print', '采购合同', '采购合同sheet1')
|
||||||
const htmlNode = $('#print').html()
|
const htmlNode = $('#print').html()
|
||||||
const body = $('body')
|
const body = $('body').attr('style', 'padding: 20px;margin: 0 auto;display: block;width: 800px;background: #fff;')
|
||||||
body.children().hide()
|
body.children().hide()
|
||||||
const printNode = $(htmlNode)
|
const printNode = $(htmlNode)
|
||||||
body.append(printNode)
|
body.append(printNode)
|
||||||
window.print()
|
window.print()
|
||||||
|
body.removeAttr('style')
|
||||||
body.children().not('script').show()
|
body.children().not('script').show()
|
||||||
body.children().not('#app').hide()
|
body.children().not('#app').hide()
|
||||||
printNode.remove()
|
printNode.remove()
|
||||||
|
|||||||
Reference in New Issue
Block a user