Commit a52daa9e by zhangxw

车损报价单打印功能

1 parent eb60e3a5
...@@ -204,7 +204,17 @@ export default { ...@@ -204,7 +204,17 @@ export default {
handlePrint(row) { handlePrint(row) {
quotationPrint({ id: row.id }).then((res) => { quotationPrint({ id: row.id }).then((res) => {
console.log(res) console.log(res)
window.open(res) let oWin = window.open(res)
oWin.document.fn = function() {
if (oWin) {
oWin.print()
oWin.close()
}
}
let html = '<div style="height: 100%;width: 100%;">' + `<img src="${res}" onload="fn()" style="max-height:100%;max-width: 100%;" />` + '</div>'
oWin.document.open()
oWin.document.write(html)
oWin.document.close()
}) })
}, },
getParams() { getParams() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!