| | |
| | | CampanyName: CampanyName |
| | | }, |
| | | success: (res) => { |
| | | |
| | | if (res.data.count == 1) { |
| | | resolve(printInfoClone) |
| | | } else { |
| | | reject() |
| | | reject(res.data.Message) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | |
| | | }, |
| | | async execMultiPrint() { |
| | | this.printButtonDisabled = true |
| | | if (this.$printer.isConnected() === false) { |
| | | this.$refs.labelPrinter.openPopup() |
| | | return |
| | | } |
| | | // if (this.$printer.isConnected() === false) { |
| | | // this.$refs.labelPrinter.openPopup() |
| | | // return |
| | | // } |
| | | if (this.printableWaitCache.length == 0) { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | |
| | | |
| | | printInfoBuffer = [] |
| | | |
| | | await this.$nextTick(() => { |
| | | this.$refs.labelPrinter.execPrint() |
| | | this.printableWaitCache = [] |
| | | }) |
| | | // await this.$nextTick(() => { |
| | | // this.$refs.labelPrinter.execPrint() |
| | | // this.printableWaitCache = [] |
| | | // }) |
| | | |
| | | this.printButtonDisabled = false |
| | | |
| | |
| | | this.printInfo = "" // 清空打印缓存 |
| | | uni.showModal({ |
| | | title: '温馨提示', |
| | | content: `物料名: ${printerOne['物料名称']} 款号: ${printerOne['款号']} 出现错误,已退出打印流程`, |
| | | content: `物料名: ${printerOne['物料名称']} 款号: ${printerOne['款号']} ${e},已退出打印流程`, |
| | | showCancel: false |
| | | }) |
| | | } |