exportpdfshowstyle
This commit is contained in:
@@ -969,11 +969,12 @@ export default {
|
||||
this.useqrcode(row.离线合同流水号) // 显示二维码
|
||||
}).then(() => {
|
||||
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()
|
||||
const printNode = $(htmlNode)
|
||||
body.append(printNode)
|
||||
window.print()
|
||||
body.removeAttr('style')
|
||||
body.children().not('script').show()
|
||||
body.children().not('#app').hide()
|
||||
printNode.remove()
|
||||
|
||||
@@ -249,11 +249,12 @@ export default {
|
||||
if (this.contractValue) {
|
||||
// exportExcelMethod('print', '采购合同', '采购合同sheet1')
|
||||
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()
|
||||
const printNode = $(htmlNode)
|
||||
body.append(printNode)
|
||||
window.print()
|
||||
body.removeAttr('style')
|
||||
body.children().not('script').show()
|
||||
body.children().not('#app').hide()
|
||||
printNode.remove()
|
||||
|
||||
Reference in New Issue
Block a user