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