| | |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | this.initTitle(); |
| | | this.loadEmloyeeList(); |
| | | this.loadList() |
| | | }, |
| | | onNavigationBarButtonTap(e){ |
| | | if(e.index==0){ |
| | |
| | | } |
| | | }, |
| | | methods:{ |
| | | initTitle(){ |
| | | let roleInfo = this.$httpUtils.getRoleInfo(); |
| | | if(roleInfo){ |
| | | this.staffId = roleInfo.id; |
| | | uni.setNavigationBarTitle({ |
| | | title: roleInfo.name+'的业绩报表' |
| | | }) |
| | | } |
| | | }, |
| | | tabChange(index){ |
| | | let val = index + 1; |
| | | if(val == this.tabIndex){ |
| | |
| | | this.$httpUtils.request('/api/user/findAllUsers', {}, 'POST').then((res) => { |
| | | if(res.status == 200){ |
| | | let result = res.rows; |
| | | if(result.length){ |
| | | this.staffId = result[0].id; |
| | | uni.setNavigationBarTitle({ |
| | | title: result[0].name+'的业绩报表' |
| | | }) |
| | | this.loadList() |
| | | }else{ |
| | | this.loadList() |
| | | if(!result.length){ |
| | | // #ifdef APP-PLUS |
| | | let webView = this.$mp.page.$getAppWebview(); |
| | | webView.setTitleNViewButtonStyle(1, { |