|
|
@ -127,7 +127,6 @@ |
|
|
|
this.tabbar.forEach(res => { |
|
|
|
res.children.forEach(res => { |
|
|
|
i++ |
|
|
|
console.log(res.name, i) |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.getDictory() |
|
|
@ -156,30 +155,28 @@ |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
if (uni.getStorageSync("hasLogin") == null || uni.getStorageSync("hasLogin") == false) { |
|
|
|
// uni.showModal({ |
|
|
|
// title: '未登录', |
|
|
|
// content: '您未登录 , 需要登录后才能继续', //如果需要强制登录,不显示取消按钮 |
|
|
|
// showCancel: !this.forcedLogin, |
|
|
|
// success: (res) => { |
|
|
|
// if (res.confirm) { |
|
|
|
// //如果需要强制登录,使用reLanch方式 |
|
|
|
// if (this.forcedLogin) { |
|
|
|
// uni.reLaunch({ |
|
|
|
// url: '../login/index' |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// uni.navigateTo({ |
|
|
|
// url: '../login/index' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }) |
|
|
|
uni.reLaunch({ |
|
|
|
url: '../login/index' |
|
|
|
uni.showModal({ |
|
|
|
title: '未登录', |
|
|
|
content: '您未登录 , 需要登录后才能继续', //如果需要强制登录,不显示取消按钮 |
|
|
|
showCancel: !this.forcedLogin, |
|
|
|
success: (res) => { |
|
|
|
if (res.confirm) { |
|
|
|
//如果需要强制登录,使用reLanch方式 |
|
|
|
if (this.forcedLogin) { |
|
|
|
uni.reLaunch({ |
|
|
|
url: '../login/index' |
|
|
|
}) |
|
|
|
} else { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../login/index' |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.timerRefresh(); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
onUnload() { |
|
|
@ -208,7 +205,28 @@ |
|
|
|
this.menusCount = res.data; |
|
|
|
this.tabbar.forEach(item => { |
|
|
|
item.children.forEach(rightItem => { |
|
|
|
var count = this.menusCount[rightItem.component] |
|
|
|
|
|
|
|
var count = 0 |
|
|
|
if(Array.isArray(this.menusCount[rightItem.component.split('-')[0]])&&this.menusCount[rightItem.component.split('-')[0]].length>0){ |
|
|
|
if(rightItem.component=='productionreturn'){ |
|
|
|
this.menusCount[rightItem.component].forEach((item)=>{ |
|
|
|
count += item.count |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
if(rightItem.component=='inventorymove-HoldToScrap'){ |
|
|
|
console.log(rightItem.component) |
|
|
|
} |
|
|
|
this.menusCount[rightItem.component.split('-')[0]].forEach((item)=>{ |
|
|
|
if(item.businessType ==rightItem.component.split('-')[1] ){ |
|
|
|
count = item.count |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
count =this.menusCount[rightItem.component] |
|
|
|
} |
|
|
|
if (count != undefined) { |
|
|
|
rightItem.count = count; |
|
|
|
} |
|
|
@ -413,7 +431,6 @@ |
|
|
|
that.filterList = []; |
|
|
|
}, |
|
|
|
input(v) { |
|
|
|
console.log("222", v) |
|
|
|
this.serchval = v |
|
|
|
this.nomore = false |
|
|
|
if (this.serchval == "") { |
|
|
|