From 94384dcf5066aa1a7b2e37874fe331e148bc9249 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期日, 29 九月 2024 17:27:03 +0800 Subject: [PATCH] 工人工资查询 --- src/pages/mine/index.vue | 54 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue index bb1a7de..4dda53b 100644 --- a/src/pages/mine/index.vue +++ b/src/pages/mine/index.vue @@ -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"> + <image src="@/static/image/salary.png" mode="aspectFit" class="item_img"></image> <view class="tool_label"> - 鏈嶅姟涓績 + 宸ヨ祫鏌ヨ </view> - </view> --> + </view> </view> </view> </view> @@ -133,7 +133,7 @@ }); } }, ], - navList1: [{ + navList2: [{ icon: 'icon-wanshanxinxi', name: '瀹屽杽璧勬枡', cb: function() { @@ -153,7 +153,27 @@ cb: this.toMyRecord }, ], - token: this.$db.get('userToken')||'' + navList3: [{ + icon: 'icon-wanshanxinxi', + name: '淇敼璧勬枡', + cb: function() { + uni.navigateTo({ + url: '/pages/mine/apply' + }); + } + }, + { + icon: 'icon-dingdan', + name: '鎴戠殑宸ヤ綔', + cb: this.toMyWork + }, + { + icon: 'icon-fuwutuandui', + name: '鎵撳崱璁板綍', + cb: this.toMyRecord + }, + ], + token: this.$db.get('userToken') || '' }; }, onLoad: function() { @@ -166,6 +186,9 @@ ...mapGetters(['userInfo', 'identity']), isAdmin() { return this.userInfo.userCompany ? this.userInfo.userCompany.isAdmin : false + }, + navList1() { + return this.userInfo.userWorker ? this.navList3 : this.navList2 }, isLogin() { return this.token ? true : false; @@ -251,6 +274,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 +519,7 @@ .tool_content { display: flex; + justify-content: space-between; padding: 30rpx 0; .tool_item { @@ -490,7 +528,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