| | |
| | | <template> |
| | | <view class="container"> |
| | | <view class="header"> |
| | | <view :class="identity=='enterprise'?'header-hide':'header'"> |
| | | <view class="header-img"> |
| | | <view class="header-image-left" @click='tologin'> |
| | | <up-avatar :src="userInfo.avatar" shape="circle" size='60'></up-avatar> |
| | |
| | | <text class='iconfont icon-qiehuan chuany-font28'></text> |
| | | </view> |
| | | </view> |
| | | <view class="num-box"> |
| | | <view class="num-box" v-if="identity!=='enterprise'"> |
| | | <view @tap="goWallet" class="num-item" data-ptpid="ef57-17f4-bbea-280f"> |
| | | <view class="num-bold">{{ balance }}元</view> |
| | | <view class="num-text"> |
| | |
| | | 工资审核 |
| | | </view> |
| | | </view> |
| | | <view class="tool_item" @click="toSalary"> |
| | | <view class="tool_item" @click="toSalary" v-if="isAdmin"> |
| | | <image src="@/static/image/salary.png" mode="aspectFit" class="item_img"></image> |
| | | <view class="tool_label"> |
| | | 工资查询 |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="" v-if="isWorker"> |
| | | <view @tap="item.cb" class="nav-item" :data-index="index" data-ptpid="58ac-1481-a7d3-b98e" |
| | | v-for="(item, index) in workerList" :key="item.name"> |
| | | <view class="nav-title"> |
| | | <view :class="'iconfont ' + item.icon"></view> |
| | | {{ item.name }} |
| | | </view> |
| | | |
| | | <view class="nav-icon"> |
| | | <view v-if="item.num || item.num === 0">{{ item.num }}</view> |
| | | <view class="iconfont iconarrow"></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="" v-if="Isbaoxiaojingli"> |
| | | <view @tap="item.cb" class="nav-item" :data-index="index" data-ptpid="58ac-1481-a7d3-b98e" |
| | | v-for="(item, index) in jingLiList" :key="item.name"> |
| | | <view class="nav-title"> |
| | | <view :class="'iconfont ' + item.icon"></view> |
| | | {{ item.name }} |
| | | </view> |
| | | |
| | | <view class="nav-icon"> |
| | | <view v-if="item.num || item.num === 0">{{ item.num }}</view> |
| | | <view class="iconfont iconarrow"></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="" v-if="IsBaoxiaozhuguan"> |
| | | <view @tap="item.cb" class="nav-item" :data-index="index" data-ptpid="58ac-1481-a7d3-b98e" |
| | | v-for="(item, index) in zhuGuanList" :key="item.name"> |
| | | <view class="nav-title"> |
| | | <view :class="'iconfont ' + item.icon"></view> |
| | | {{ item.name }} |
| | | </view> |
| | | |
| | | <view class="nav-icon"> |
| | | <view v-if="item.num || item.num === 0">{{ item.num }}</view> |
| | | <view class="iconfont iconarrow"></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="" v-if="IsCaiWu"> |
| | | <view @tap="item.cb" class="nav-item" :data-index="index" data-ptpid="58ac-1481-a7d3-b98e" |
| | | v-for="(item, index) in CaiWuList" :key="item.name"> |
| | | <view class="nav-title"> |
| | | <view :class="'iconfont ' + item.icon"></view> |
| | | {{ item.name }} |
| | | </view> |
| | | |
| | | <view class="nav-icon"> |
| | | <view v-if="item.num || item.num === 0">{{ item.num }}</view> |
| | | <view class="iconfont iconarrow"></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="nav-box" v-else> |
| | | <view @tap="item.cb" class="nav-item" :data-index="index" data-ptpid="58ac-1481-a7d3-b98e" |
| | |
| | | url: '/pages/company/staff' |
| | | }); |
| | | } |
| | | }, ], |
| | | }], |
| | | workerList: [{ |
| | | icon: 'icon-baoxiaoshenqing', |
| | | name: '费用报销申请', |
| | | cb: function() { |
| | | uni.navigateTo({ |
| | | url: '/pages/reimbursement/index' |
| | | }); |
| | | } |
| | | },{ |
| | | icon: 'icon-baoxiao', |
| | | name: '我的费用报销', |
| | | cb: function() { |
| | | uni.navigateTo({ |
| | | url: '/pages/reimbursement/myreim' |
| | | }); |
| | | } |
| | | }], |
| | | CaiWuList:[ |
| | | { |
| | | icon: 'icon-baoxiaodan', |
| | | name: '费用报销', |
| | | cb: function() { |
| | | uni.navigateTo({ |
| | | url: '/pages/reimbursement/reimbursement' |
| | | }); |
| | | } |
| | | } |
| | | ], |
| | | zhuGuanList:[ |
| | | { |
| | | icon: 'icon-shenpicaigoudan', |
| | | name: '主管列表', |
| | | cb: function() { |
| | | uni.navigateTo({ |
| | | url: '/pages/reimbursement/examine?role=zhuGuan' |
| | | }); |
| | | } |
| | | } |
| | | ], |
| | | jingLiList:[ |
| | | { |
| | | icon: 'icon-shenpi', |
| | | name: '经理列表', |
| | | cb: function() { |
| | | uni.navigateTo({ |
| | | url: '/pages/reimbursement/examine?role=jingLi' |
| | | }); |
| | | } |
| | | } |
| | | ], |
| | | navList2: [{ |
| | | icon: 'icon-dingdan', |
| | | name: '上班打卡', |
| | | cb: this.toMyWork |
| | | }, |
| | | { |
| | | icon: 'icon-fuwutuandui', |
| | | name: '工作记录', |
| | | cb: this.toMyRecord |
| | | }, |
| | | { |
| | | icon: 'icon-wanshanxinxi', |
| | | name: '完善资料', |
| | | cb: function() { |
| | |
| | | }); |
| | | } |
| | | }, |
| | | { |
| | | ], |
| | | navList3: [{ |
| | | icon: 'icon-dingdan', |
| | | name: '我的工作', |
| | | name: '上班打卡', |
| | | cb: this.toMyWork |
| | | }, |
| | | { |
| | | icon: 'icon-fuwutuandui', |
| | | name: '打卡记录', |
| | | name: '工作记录', |
| | | cb: this.toMyRecord |
| | | }, |
| | | ], |
| | | navList3: [{ |
| | | { |
| | | icon: 'icon-wanshanxinxi', |
| | | name: '修改资料', |
| | | cb: function() { |
| | |
| | | url: '/pages/mine/apply' |
| | | }); |
| | | } |
| | | }, |
| | | { |
| | | icon: 'icon-dingdan', |
| | | name: '我的工作', |
| | | cb: this.toMyWork |
| | | }, |
| | | { |
| | | icon: 'icon-fuwutuandui', |
| | | name: '打卡记录', |
| | | cb: this.toMyRecord |
| | | }, |
| | | ], |
| | | token: this.$db.get('userToken') || '' |
| | |
| | | isAdmin() { |
| | | return this.userInfo.userCompany ? this.userInfo.userCompany.isAdmin : false |
| | | }, |
| | | // 是否是员工 |
| | | isWorker() { |
| | | if (this.userInfo.oaPermissions) { |
| | | return this.userInfo.oaPermissions.memberId ? true : false |
| | | } |
| | | return false |
| | | }, |
| | | // 是否为报销主管 |
| | | IsBaoxiaozhuguan() { |
| | | if (this.userInfo.oaPermissions) { |
| | | return this.userInfo.oaPermissions.bF_IsBaoxiaozhuguan ? true : false |
| | | } |
| | | return false |
| | | }, |
| | | // 是否为报销经理 |
| | | Isbaoxiaojingli() { |
| | | if (this.userInfo.oaPermissions) { |
| | | return this.userInfo.oaPermissions.bF_Isbaoxiaojingli ? true : false |
| | | } |
| | | return false |
| | | }, |
| | | // 财务 |
| | | IsCaiWu() { |
| | | if (this.userInfo.oaPermissions) { |
| | | return this.userInfo.oaPermissions.bF_IsCaiWu ? true : false |
| | | } |
| | | return false |
| | | }, |
| | | navList1() { |
| | | return this.userInfo.userWorker ? this.navList3 : this.navList2 |
| | | }, |