|
|
@@ -107,44 +107,30 @@ export default {
|
|
|
uni.showActionSheet({
|
|
|
itemList: doList,
|
|
|
success: function (respond) {
|
|
|
- let index = respond.tapIndex
|
|
|
+ let index = respond.tapIndex
|
|
|
+ // #ifdef APP-PLUS
|
|
|
plug.state({},ret=>{
|
|
|
- if(ret.code == 1){
|
|
|
- that.$util.confirmModal({content:'您还没有连接蓝牙,请先链接'},() => {
|
|
|
- that.pageTo({url:'/admin/tools/blue'})
|
|
|
+ if(ret.state == 1){
|
|
|
+ that.$util.confirmModal({content:'您还没有连接标签机,请先连接'},() => {
|
|
|
+ plug.connectUSB({setBackgroundColor:"#2088d2"},ret=>{ })
|
|
|
})
|
|
|
}else{
|
|
|
- // #ifdef APP-PLUS
|
|
|
- plug.state({},ret=>{
|
|
|
- if(ret.state == 1){
|
|
|
- that.$util.confirmModal({content:'您还没有连接标签机,请先连接'},() => {
|
|
|
- // #ifdef APP-PLUS
|
|
|
- plug.connectUSB({setBackgroundColor:"#2088d2"},ret=>{
|
|
|
- //console.log(ret)
|
|
|
- })
|
|
|
- // #endif
|
|
|
- })
|
|
|
- }else{
|
|
|
- let currentNum = Number(doNum[index])
|
|
|
- if(Number(currentNum)<0){
|
|
|
- this.$msg('请选择打印数量')
|
|
|
- return false
|
|
|
- }
|
|
|
- let data = []
|
|
|
- let label = that.createLable(item.name,item.itemId,currentNum)
|
|
|
- data.push(label)
|
|
|
- //console.log(data)
|
|
|
- //说明地址 https://ext.dcloud.net.cn/plugin?id=462
|
|
|
- plug.printer({"TSC":data,isArray:true},result=>{ })
|
|
|
- }
|
|
|
- })
|
|
|
- // #endif
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
- that.$msg('请在App上打印')
|
|
|
- // #endif
|
|
|
+ let currentNum = Number(doNum[index])
|
|
|
+ if(Number(currentNum)<0){
|
|
|
+ this.$msg('请选择打印数量')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let data = []
|
|
|
+ let label = that.createLable(item.name,item.itemId,currentNum)
|
|
|
+ data.push(label)
|
|
|
+ //说明地址 https://ext.dcloud.net.cn/plugin?id=462
|
|
|
+ plug.printer({"TSC":data,isArray:true},result=>{ })
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+ // #endif
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ that.$msg('请在App上操作')
|
|
|
+ // #endif
|
|
|
}
|
|
|
})
|
|
|
|