|
@@ -275,13 +275,20 @@
|
|
|
if (res.data.printLayout.length > 0) {
|
|
if (res.data.printLayout.length > 0) {
|
|
|
let printList = this.printList.filter(it => it.checkFlag)
|
|
let printList = this.printList.filter(it => it.checkFlag)
|
|
|
if (printList.length > 0) {
|
|
if (printList.length > 0) {
|
|
|
- for (let i of printList) {
|
|
|
|
|
- for (let item of res.data.printLayout) {
|
|
|
|
|
- if (i.printerId == item.printerId) {
|
|
|
|
|
- this.$printUtil.print(item.layoutData, res.data.printData, i.printerCode, item.printCopies)
|
|
|
|
|
|
|
+ //1.获取[系统参数]-[标签打印服务地址]
|
|
|
|
|
+ this.$printUtil.getHost().then(host => {
|
|
|
|
|
+ //2.调用连接打印服务
|
|
|
|
|
+ return this.$printUtil.connectPrintServer(host)
|
|
|
|
|
+ }).then(r => {
|
|
|
|
|
+ //3.调用打印机打印
|
|
|
|
|
+ for (let i of printList) {
|
|
|
|
|
+ for (let item of res.data.printLayout) {
|
|
|
|
|
+ if (i.printerId == item.printerId) {
|
|
|
|
|
+ this.$printUtil.print(item.layoutData, res.data.printData, i.printerCode, item.printCopies)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|