|
|
|
@ -446,6 +446,7 @@ import { getLodop } from '@/utils/LodopFuncs.js';
|
|
|
|
|
import { exportBlob } from '@/api/common'; |
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
|
import { downloadXls, setNodeHeight } from '@/utils/util'; |
|
|
|
|
import print from '@/utils/print'; |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
@ -994,10 +995,10 @@ export default {
|
|
|
|
|
// checkcode.push(item.orderPackageCode) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
let qr = checkcode.join(','); |
|
|
|
|
console.log(qr); |
|
|
|
|
let ids = checkcode.join(','); |
|
|
|
|
console.log(ids); |
|
|
|
|
this.html = ''; |
|
|
|
|
getPrintTemplate(qr).then(res => { |
|
|
|
|
getPrintTemplate({ ids }).then(res => { |
|
|
|
|
// this.orderPackageCode = res.data |
|
|
|
|
console.log(res.data); |
|
|
|
|
this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml); |
|
|
|
@ -1179,7 +1180,6 @@ export default {
|
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.areaoption = data; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
handleEdit(row) { |
|
|
|
|
this.title = '编辑'; |
|
|
|
@ -1355,9 +1355,6 @@ export default {
|
|
|
|
|
// }) |
|
|
|
|
// }, |
|
|
|
|
printTemplate() { |
|
|
|
|
let LODOP = getLodop(); |
|
|
|
|
console.log('this.ids>>>>>', this.ids); |
|
|
|
|
console.log('this.ids>>>>>', this.allselectionList); |
|
|
|
|
if (this.allselectionList.length === 0) { |
|
|
|
|
this.$message.warning('请选择至少一条数据'); |
|
|
|
|
return; |
|
|
|
@ -1365,26 +1362,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
const nodeList = document.querySelectorAll('.printNode > div'); |
|
|
|
|
|
|
|
|
|
// getPrintTemplate(this.ids).then(res => { |
|
|
|
|
// let templateData = res.data.data; |
|
|
|
|
// let templateData = "res.data.data"; |
|
|
|
|
// console.log(templateData); |
|
|
|
|
LODOP.PRINT_INITA('测试预览功能'); |
|
|
|
|
// LODOP.PRINT_INITA("测试预览功能"); |
|
|
|
|
// LODOP.SET_PRINT_PAGESIZE(1, 0, 0, 'A4'); |
|
|
|
|
LODOP.SET_PRINT_MODE('WINDOW_DEFPRINTER', 'Deli DL-888T'); |
|
|
|
|
LODOP.SET_PRINT_PAGESIZE(2, '210mm', '50mm', ''); |
|
|
|
|
LODOP.SET_SHOW_MODE('LANDSCAPE_DEFROTATED', 1); |
|
|
|
|
|
|
|
|
|
// // 设置打印后自动关闭 |
|
|
|
|
LODOP.SET_PRINT_MODE('WINDOW_DEFPAGESIZE', 1); |
|
|
|
|
// // data就是一段html文本 |
|
|
|
|
nodeList.forEach(val => { |
|
|
|
|
LODOP.ADD_PRINT_HTM('0%', '0%', '100%', '100%', val.innerHTML); |
|
|
|
|
LODOP.NewPage(); |
|
|
|
|
}); |
|
|
|
|
LODOP.PREVIEW(); //预览(预览打印无脚标) |
|
|
|
|
// }); |
|
|
|
|
print(nodeList); |
|
|
|
|
}, |
|
|
|
|
rowDel(row) { |
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|