From e5a77d6a551d13e4cf74624b31b0fa3e328b304d Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期四, 23 一月 2025 17:23:39 +0800
Subject: [PATCH] -

---
 src/pages/mine/index.vue |  197 ++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 184 insertions(+), 13 deletions(-)

diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue
index 48cc7ab..b23423d 100644
--- a/src/pages/mine/index.vue
+++ b/src/pages/mine/index.vue
@@ -1,6 +1,6 @@
 <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>
@@ -12,7 +12,7 @@
 					<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">
@@ -49,15 +49,15 @@
 					<view class="tool_item" @click="toWorkerRecord" v-if="isAdmin">
 						<image src="@/static/image/record.png" mode="aspectFit" class="item_img"></image>
 						<view class="tool_label">
-							鎵撳崱璁板綍
+							宸ヨ祫瀹℃牳
 						</view>
 					</view>
-					<!-- <view class="tool_item" @click="toPage('/otherPages/member/sendCompany/sendCompany')">
-						<image src="@/static/image/server.png" mode="aspectFit" class="item_img"></image>
+					<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>
 			</view>
 		</view>
@@ -94,7 +94,62 @@
 					</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"
@@ -132,8 +187,68 @@
 							url: '/pages/company/staff'
 						});
 					}
-				}, ],
-				navList1: [{
+				}],
+				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() {
@@ -142,9 +257,10 @@
 							});
 						}
 					},
-					{
+				],
+				navList3: [{
 						icon: 'icon-dingdan',
-						name: '鎴戠殑宸ヤ綔',
+						name: '涓婄彮鎵撳崱',
 						cb: this.toMyWork
 					},
 					{
@@ -152,8 +268,17 @@
 						name: '宸ヤ綔璁板綍',
 						cb: this.toMyRecord
 					},
+					{
+						icon: 'icon-wanshanxinxi',
+						name: '淇敼璧勬枡',
+						cb: function() {
+							uni.navigateTo({
+								url: '/pages/mine/apply'
+							});
+						}
+					},
 				],
-				token: this.$db.get('userToken')||''
+				token: this.$db.get('userToken') || ''
 			};
 		},
 		onLoad: function() {
@@ -166,6 +291,37 @@
 			...mapGetters(['userInfo', 'identity']),
 			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
 			},
 			isLogin() {
 				return this.token ? true : false;
@@ -251,6 +407,20 @@
 				}
 				uni.navigateTo({
 					url: '/pages/company/index'
+				});
+			},
+			toSalary() {
+				if (!this.userInfo.userCompany) {
+					uni.navigateTo({
+						url: '/pages/enterprise/enterprise'
+					});
+					this.$util.showToast({
+						title: '璇峰厛瀹屽杽浼佷笟璧勬枡锛�'
+					})
+					return
+				}
+				uni.navigateTo({
+					url: '/pages/worker/salary'
 				});
 			},
 			toMyWork() {
@@ -482,6 +652,7 @@
 
 			.tool_content {
 				display: flex;
+				justify-content: space-between;
 				padding: 30rpx 0;
 
 				.tool_item {
@@ -490,7 +661,7 @@
 					flex-direction: column;
 					height: 120rpx;
 					justify-content: center;
-					margin: 0 50rpx 0 0;
+					// margin: 0 50rpx 0 0;
 					width: 120rpx;
 
 					&:nth-child(4n) {

--
Gitblit v1.9.1