فهرست منبع

app 蓝牙打印

shish 4 سال پیش
والد
کامیت
0ce9e2e46b
1فایلهای تغییر یافته به همراه15 افزوده شده و 12 حذف شده
  1. 15 12
      ghsApp/src/admin/itemClass/list.vue

+ 15 - 12
ghsApp/src/admin/itemClass/list.vue

@@ -137,20 +137,23 @@ export default {
                 		that.pageTo({url:'/admin/tools/blue'})
               		})
 				}else{
-					allProduct({classId:classId}).then(res=>{
-						if(res.code == 1){
-							let itemData = res.data.list
-							if(!that.$util.isEmpty(itemData)){
-								itemData.forEach((item)=>{
-									console.log(item.name+item.id)
-									plug.printer({"TSC":that.OrderLable(item.name,item.id)},ret=>{
-										//uni.showToast({ title: JSON.stringify(ret), duration: 5000 })
+					that.$util.confirmModal({content:'确认打印?'},() => {
+						allProduct({classId:classId}).then(res=>{
+							if(res.code == 1){
+								that.$msg(res.msg)
+								let itemData = res.data.list
+								if(!that.$util.isEmpty(itemData)){
+									itemData.forEach((item)=>{
+										console.log(item.name+item.id)
+										plug.printer({"TSC":that.OrderLable(item.name,item.id)},ret=>{
+											//uni.showToast({ title: JSON.stringify(ret), duration: 5000 })
+										})
 									})
-								})
-							}else{
-								that.$msg('此分类下没有花材')
+								}else{
+									that.$msg('此分类下没有花材')
+								}
 							}
-						}
+						})
 					})
 				}
 			})