|
|
@@ -6,8 +6,8 @@
|
|
|
<app-search-module v-model="py" placeholder="找小菊请输xj" @input="searchFn"/>
|
|
|
</view>
|
|
|
<view style="padding:0 0upx 0 20upx;" >
|
|
|
+ <button class="admin-button-com middle blue" style="margin-right:8upx;" @click="itemMore()">更多</button>
|
|
|
<button class="admin-button-com middle blue" style="margin-right:8upx;" @click="downPriceTable()">价格表</button>
|
|
|
- <button class="admin-button-com middle blue" style="margin-right:8upx;" @click="downBarcodeTable()">条形码</button>
|
|
|
<button class="admin-button-com middle blue" @click="pageTo({ url: '/admin/ptItem/itemList' })">添花材</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -95,8 +95,8 @@ export default {
|
|
|
// #ifdef APP-PLUS
|
|
|
moreToDo(item){
|
|
|
//查询是否已经连接蓝牙
|
|
|
- let _this=this;
|
|
|
- let doList = ['打印标签', '打印标签2个', '打印标签5个','打印标签10个','打印标签20个']
|
|
|
+ let that=this;
|
|
|
+ let doList = ['打印条形', '打印条形2个', '打印条形5个','打印条形10个','打印条形20个']
|
|
|
let doNum = [1,2,5,10,20]
|
|
|
uni.showActionSheet({
|
|
|
itemList: doList,
|
|
|
@@ -110,7 +110,7 @@ export default {
|
|
|
content: '您还没有连接蓝牙,请先链接',
|
|
|
success: function (res) {
|
|
|
if (res.confirm) {
|
|
|
- _this.pageTo({url:'/admin/tools/blue'})
|
|
|
+ that.pageTo({url:'/admin/tools/blue'})
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -118,8 +118,8 @@ export default {
|
|
|
let currentNum = Number(doNum[index])
|
|
|
console.log(currentNum)
|
|
|
for (let i = 0; i < currentNum; i++) {
|
|
|
- plug.printer({"TSC":_this.OrderLable(item.name,item.id)},ret=>{
|
|
|
- uni.showToast({ title: JSON.stringify(ret), duration: 5000 })
|
|
|
+ plug.printer({"TSC":that.OrderLable(item.name,item.id)},ret=>{
|
|
|
+ //uni.showToast({ title: JSON.stringify(ret), duration: 5000 })
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -167,6 +167,53 @@ export default {
|
|
|
|
|
|
return data;
|
|
|
},
|
|
|
+ itemMore(){
|
|
|
+ let that=this;
|
|
|
+ let doList = ['下载全部条码', '打印全部条码']
|
|
|
+ uni.showActionSheet({
|
|
|
+ itemList: doList,
|
|
|
+ success: function (respond) {
|
|
|
+ let index = respond.tapIndex
|
|
|
+
|
|
|
+ if(index == 0){
|
|
|
+ that.downBarcodeTable()
|
|
|
+ }
|
|
|
+ if(index == 1){
|
|
|
+ that.printAllBarCode()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ printAllBarCode(){
|
|
|
+ let that = this
|
|
|
+ plug.state({},ret=>{
|
|
|
+ if(ret.code == 1){
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '您还没有连接蓝牙,请先链接',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ that.pageTo({url:'/admin/tools/blue'})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ if(!that.$util.isEmpty(this.globalClassItemList)){
|
|
|
+ this.globalClassItemList.forEach((globalItem) => {
|
|
|
+ if(!that.$util.isEmpty(globalItem.child)){
|
|
|
+ globalItem.child.forEach((currentItem)=>{
|
|
|
+ console.log(currentItem)
|
|
|
+ plug.printer({"TSC":that.OrderLable(currentItem.name,currentItem.id)},ret=>{
|
|
|
+ uni.showToast({ title: JSON.stringify(ret), duration: 5000 })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
downPriceTable(){
|
|
|
// #ifdef MP-WEIXIN
|
|
|
let isWindows = false
|