From b7ae3f69ae6706a692284d2f12835d213debfb1a Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期二, 07 四月 2026 17:21:41 +0800
Subject: [PATCH] -
---
src/pages/mine/index.vue | 84 ++++++++++++++++++++++++++++--------------
1 files changed, 56 insertions(+), 28 deletions(-)
diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue
index 6552a30..56a8903 100644
--- a/src/pages/mine/index.vue
+++ b/src/pages/mine/index.vue
@@ -49,13 +49,13 @@
<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="toSalary" v-if="isAdmin">
<image src="@/static/image/salary.png" mode="aspectFit" class="item_img"></image>
<view class="tool_label">
- 宸ヨ祫鏌ヨ
+ 鎶ラ叕鏌ヨ
</view>
</view>
</view>
@@ -112,19 +112,25 @@
棰勭害閫佽揣
</view>
</view>
- <view class="tool_item" @click="toDelivergoods('reservation')" v-if="isDriver">
+ <view class="tool_item" @click="toDelivergoods('PFeedback')" v-if="isWorker">
+ <image src="@/static/image/PFeedback.png" mode="aspectFit" class="item_img"></image>
+ <view class="tool_label">
+ 闂鍙嶉
+ </view>
+ </view>
+ <view class="tool_item" @click="toDelivergoods('reservation')" v-if="isDeliverManage">
<image src="@/static/image/drivershouli.png" mode="aspectFit" class="item_img"></image>
<view class="tool_label">
閫佽揣鍙楃悊
</view>
</view>
- <view class="tool_item" @click="toDelivergoods('arrange')">
+ <view class="tool_item" @click="toDelivergoods('arrange')" v-if="isDeliverManage">
<image src="@/static/image/arrange.png" mode="aspectFit" class="item_img"></image>
<view class="tool_label">
閫佽揣瀹夋帓
</view>
</view>
- <view class="tool_item" @click="toDelivergoods('query')">
+ <view class="tool_item" @click="toDelivergoods('query')" v-if="isDeliverManage||isWorker">
<image src="@/static/image/query.png" mode="aspectFit" class="item_img"></image>
<view class="tool_label">
閫佽揣鏌ヨ
@@ -134,6 +140,18 @@
<image src="@/static/image/feedback.png" mode="aspectFit" class="item_img"></image>
<view class="tool_label">
閫佽揣鍙嶉
+ </view>
+ </view>
+ <view class="tool_item" @click="toDelivergoods('clockIn')" v-if="isDriver">
+ <image src="@/static/image/daka.png" mode="aspectFit" class="item_img"></image>
+ <view class="tool_label">
+ 鍙告満鎵撳崱
+ </view>
+ </view>
+ <view class="tool_item" @click="toDelivergoods('clockInRecord')" v-if="isDeliverManage">
+ <image src="@/static/image/dakarecord.png" mode="aspectFit" class="item_img"></image>
+ <view class="tool_label">
+ 鎵撳崱璁板綍
</view>
</view>
</view>
@@ -312,12 +330,12 @@
}],
navList2: [{
icon: 'icon-dingdan',
- name: '涓婄彮鎵撳崱',
+ name: '鍔冲姟璁℃椂',
cb: this.toMyWork
},
{
icon: 'icon-fuwutuandui',
- name: '宸ヤ綔璁板綍',
+ name: '鍔″伐鎶ラ叕',
cb: this.toMyRecord
},
{
@@ -332,12 +350,12 @@
],
navList3: [{
icon: 'icon-dingdan',
- name: '涓婄彮鎵撳崱',
+ name: '鍔冲姟璁℃椂',
cb: this.toMyWork
},
{
icon: 'icon-fuwutuandui',
- name: '宸ヤ綔璁板綍',
+ name: '鍔″伐鎶ラ叕',
cb: this.toMyRecord
},
{
@@ -350,7 +368,8 @@
}
},
],
- token: this.$db.get('userToken') || ''
+ token: this.$db.get('userToken') || '',
+ identity:this.$db.get('identity') || 'worker'
};
},
onLoad: function() {
@@ -358,9 +377,10 @@
},
onShow: function() {
this.getUserInfo()
+ console.log(this.$store.state.identity,this.identity,'????????');
},
computed: {
- ...mapGetters(['userInfo', 'identity']),
+ ...mapGetters(['userInfo']),
isAdmin() {
return this.userInfo.userCompany ? this.userInfo.userCompany.isAdmin : false
},
@@ -368,6 +388,13 @@
isWorker() {
if (this.userInfo.oaPermissions) {
return this.userInfo.oaPermissions.memberId ? true : false
+ }
+ return false
+ },
+ //鏄惁鏄�佽揣绠$悊绠$悊鍛�
+ isDeliverManage(){
+ if (this.userInfo.oaPermissions) {
+ return this.userInfo.oaPermissions.bF_IsDeliverManage ? true : false
}
return false
},
@@ -407,13 +434,13 @@
},
balance() {
if (this.identity == 'worker') {
- if (this.userInfo.userWorker) {
- return this.$common.moneySub(this.userInfo.userWorker.tiXianZonge, this.userInfo
- .userWorker
- .yiTiXianJine)
- } else {
- return '0.00'
- }
+ // if (this.userInfo.userWorker) {
+ // return this.$common.moneySub(this.userInfo.userWorker.tiXianZonge, this.userInfo
+ // .userWorker
+ // .yiTiXianJine)
+ // } else {
+ return this.userInfo.userWorker.balance
+ // }
} else {
if (this.userInfo.userCompany) {
return this.userInfo.userCompany.chongZhiYue ? this.userInfo.userCompany
@@ -532,8 +559,8 @@
},
changRole() {
this.$store.commit('setIdentity', this.identity === 'enterprise' ? 'worker' : 'enterprise')
- // this.$db.set('identity', this.identity === 'enterprise' ? 'worker' : 'enterprise')
- // this.identity = this.identity === 'enterprise' ? 'worker' : 'enterprise'
+ this.$db.set('identity', this.identity === 'enterprise' ? 'worker' : 'enterprise')
+ this.identity = this.identity === 'enterprise' ? 'worker' : 'enterprise'
console.log(this.identity, this.$db.get('identity'), 'this.identity');
// uni.setStorage({
// key: 'identity',
@@ -586,7 +613,7 @@
},
toDelivergoods(val) {
uni.navigateTo({
- url: `/pages/delivergoods/${val}`
+ url: `/pages/delivergoods/${val}?isAdmin=${this.isDeliverManage}`
});
}
@@ -599,8 +626,8 @@
.money_bag {
background: #fff;
border-radius: 16rpx;
- margin: 20rpx 30rpx;
- padding: 20rpx 30rpx;
+ margin: 18rpx 26rpx;
+ padding: 16rpx 26rpx;
position: relative;
// top: 25rpx;
z-index: 2;
@@ -756,23 +783,24 @@
color: #333;
font-size: 32rpx;
font-weight: 700;
- padding: 30rpx 0;
+ padding: 20rpx 0;
border-bottom: 2rpx solid #eee;
}
.tool_content {
display: flex;
- justify-content: space-between;
- padding: 30rpx 0;
+ // justify-content: space-between;
+ padding: 20rpx 0;
+ flex-wrap: wrap;
.tool_item {
align-items: center;
display: flex;
flex-direction: column;
- height: 120rpx;
+ height: 128rpx;
justify-content: center;
// margin: 0 50rpx 0 0;
- width: 120rpx;
+ width: 128rpx;
&:nth-child(4n) {
margin-right: 0;
--
Gitblit v1.9.1