bug PrintDom 打印成功也会提示失败
This commit is contained in:
parent
d1bc97f42a
commit
99619fdc0a
@ -183,9 +183,8 @@ export default {
|
|||||||
this.palletId = data;
|
this.palletId = data;
|
||||||
await this.printByApi(data);
|
await this.printByApi(data);
|
||||||
} else {
|
} else {
|
||||||
this.printByLocalData(data);
|
await this.printByLocalData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -202,6 +201,7 @@ export default {
|
|||||||
// 绘制HU号
|
// 绘制HU号
|
||||||
await this.paintQrCode(data.hu || "- 无HU数据 -");
|
await this.paintQrCode(data.hu || "- 无HU数据 -");
|
||||||
await this.handlePrint();
|
await this.handlePrint();
|
||||||
|
await this.getPrintStatus();
|
||||||
},
|
},
|
||||||
|
|
||||||
initPrintPlugin() {
|
initPrintPlugin() {
|
||||||
@ -253,9 +253,11 @@ export default {
|
|||||||
// 获取jobId
|
// 获取jobId
|
||||||
this.lodop.On_Return = (TaskID, Value) => {
|
this.lodop.On_Return = (TaskID, Value) => {
|
||||||
this.jobId = Value;
|
this.jobId = Value;
|
||||||
this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
this.getPrintStatus(resolve, reject);
|
// this.getPrintStatus(resolve, reject);
|
||||||
});
|
// });
|
||||||
|
console.log('this.lodop.On_Return', this.lodop.On_Return, this.jobId)
|
||||||
|
resolve();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// 纵向打印,宽度60mm,高度150mm,定义纸张名称
|
// 纵向打印,宽度60mm,高度150mm,定义纸张名称
|
||||||
@ -265,11 +267,13 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getPrintStatus(resolve, reject) {
|
getPrintStatus() {
|
||||||
if (!this.jobId) return;
|
return new Promise((resolve, reject) => {
|
||||||
if (LODOP.CVERSION) {
|
if (!this.jobId || !this.lodop) reject(-1);
|
||||||
LODOP.On_Return = (TaskID, Value) => {
|
this.lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS", true);
|
||||||
// console.log("on return value: <", Value, ">");
|
if (this.lodop.CVERSION) {
|
||||||
|
this.lodop.On_Return = (TaskID, Value) => {
|
||||||
|
console.log('this.lodop.On_Return', this.lodop.On_Return, this.jobId, Value)
|
||||||
if (Value.toString() == "1") {
|
if (Value.toString() == "1") {
|
||||||
// 打印成功
|
// 打印成功
|
||||||
this.sendSuccess()
|
this.sendSuccess()
|
||||||
@ -286,8 +290,9 @@ export default {
|
|||||||
this.$message.error("打印失败");
|
this.$message.error("打印失败");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
this.lodop.GET_VALUE("PRINT_STATUS_OK", this.jobId);
|
||||||
}
|
}
|
||||||
LODOP.GET_VALUE("PRINT_STATUS_OK", this.jobId);
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
sendSuccess() {
|
sendSuccess() {
|
||||||
|
@ -14,7 +14,7 @@ export default function () {
|
|||||||
{ prop: "orderCode", label: "订单号" },
|
{ prop: "orderCode", label: "订单号" },
|
||||||
{ prop: "realQty", label: "数量" },
|
{ prop: "realQty", label: "数量" },
|
||||||
{ prop: "typeDictValue", label: "类型", filter: dictFilter('pallet_type') },
|
{ prop: "typeDictValue", label: "类型", filter: dictFilter('pallet_type') },
|
||||||
{ prop: "stifling", label: "熏蒸", },
|
{ prop: "stifling", label: "熏蒸", filter: val => val != null ? ['非熏蒸', '熏蒸'][val] : '-' },
|
||||||
{ prop: "printTime", label: "打印时间", filter: timeFilter },
|
{ prop: "printTime", label: "打印时间", filter: timeFilter },
|
||||||
{ prop: "createTime", label: "添加时间", filter: timeFilter },
|
{ prop: "createTime", label: "添加时间", filter: timeFilter },
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user