|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<view class="content flex flex_column">
|
|
|
+ <u-alert-tips :show="isParinting" @close="isParinting = false" type="warning" description="正在打印中,请勿息屏或退出应用!"></u-alert-tips>
|
|
|
<view class="head-info">
|
|
|
<view class="p-title flex align_center">
|
|
|
<text></text>
|
|
@@ -20,7 +21,7 @@
|
|
|
</view>
|
|
|
<view class="btns flex align_item justify_end">
|
|
|
<view>
|
|
|
- <kk-printer ref="kkprinter" :autoConnect="false" printBtnStyle="default-mid" defaultText="打印贴签" @startPrint="startPrint"></kk-printer>
|
|
|
+ <kk-printer ref="kkprinter" :isPrinting="isParinting" :autoConnect="false" printBtnStyle="default-mid" defaultText="打印贴签" @startPrint="startPrint"></kk-printer>
|
|
|
</view>
|
|
|
<view style="padding: 0 10rpx;"></view>
|
|
|
<view>
|
|
@@ -195,9 +196,19 @@
|
|
|
if(_this.printIndex < result.length){
|
|
|
_this.printOnce(opt,tsc,blesdk,result[_this.printIndex])
|
|
|
}else{
|
|
|
+ // 打印结束
|
|
|
_this.printIndex = 0
|
|
|
_this.$refs.kkprinter.onPrintSuccess()
|
|
|
_this.isParinting = false
|
|
|
+ clzConfirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '打印已经结束,是否返回上页!',
|
|
|
+ success (ret) {
|
|
|
+ if (ret.confirm || ret.index == 0) {
|
|
|
+ uni.navigateBack()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -217,7 +228,10 @@
|
|
|
if (ret.confirm || ret.index == 0) {
|
|
|
_this.isParinting = true
|
|
|
_this.printOnce(opt,tsc,blesdk,result[_this.printIndex])
|
|
|
- }
|
|
|
+ }else{
|
|
|
+ _this.$refs.kkprinter.onPrintFail()
|
|
|
+ _this.isParinting = false
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}else{
|