Explorar o código

1.团队门店 加权限

guo %!s(int64=3) %!d(string=hai) anos
pai
achega
2f837ff541

+ 12 - 1
operatingCompany/common/common.js

@@ -6,6 +6,17 @@ const isUserId = function() {
 			url: '../logIn/logIn'
 		})
 	}
+}
+//是否 部门主管
+const isDirector = function(){
+	var director = uni.getStorageSync("userInfo").director;
+	console.log("director---" + director)
+	if (director == 1) {
+		return true
+	}
+	else {
+		return false
+	}
 }
 /* const uid =function() {
 	var userId=uni.getStorageSync("logodata").uid;
@@ -17,5 +28,5 @@ export default {
 		companyType: 1,
 	},
 	isUserId,
-
+	isDirector,
 }

+ 4 - 2
operatingCompany/pages/entryReport/entryReport.vue

@@ -59,12 +59,14 @@
 					<!-- 详细地址 -->
 					<view class="addressView">
 						<view class="address">{{item.Address}}</view>
-						<view class="distance">{{item.distance}}km</view>
+						<view class="distance" v-if="item.distance != 0.00">{{item.distance}}km</view>
 					</view>
 
 					<!-- 提交信息 -->
 					<view class="tijao">
-						<view class="time">距上次提交:<text style='color: #FF4F00;'>{{item.maxTime}}</text>天</view>
+						<view class="time" v-if="item.maxTime">距上次提交:<text style='color: #FF4F00;'>{{item.maxTime}}</text>天</view>
+						<view class="time" v-else>暂无提交记录</view>
+						
 						<view class="xiangmu"><text style='color: #FF4F00;'>{{item.checkCount}}</text>项需要检测</view>
 					</view>
 

+ 19 - 15
operatingCompany/pages/teamStore/teamStore.vue

@@ -18,7 +18,7 @@
 				</picker>
 
 				<picker :value="thirdIndex" mode="selector" range-key='name' :range="thirdArr"
-					@change="bindPickerChange3">
+					@change="bindPickerChange3" v-if="isDirector">
 					<view class="uni-input">{{thirdIndex == null ? '运营经理' : thirdArr[thirdIndex].name}}
 						<image class="downArrow" src="../../static/img/icon_downArrow.png"></image>
 					</view>
@@ -57,7 +57,8 @@
 					</view>
 
 					<!-- 运营经理 -->
-					<view class="manager">运营经理:{{item.name}} {{item.AccountName}}</view>
+					<view class="manager" v-if="isDirector">运营经理:{{item.name}} {{item.AccountName}}
+					</view>
 
 					<!-- 历史记录 -->
 					<view class="bottomView">
@@ -75,9 +76,9 @@
 		<view class="nodataBox" v-if="shopData.length == 0">
 			<image src="../../static/img/pic_empty_def.png" mode="widthFix" class="nodataImg"></image>
 			<view class="noTxt">暂无数据</view>
-		</view>
-		
-		
+		</view>
+
+
 	</view>
 </template>
 
@@ -102,10 +103,12 @@
 				page: 1,
 				noMoreShow: false,
 				lng: '',
-				lat: '',
+				lat: '',
+				isDirector:'',
 			}
 		},
-		onLoad() {
+		onLoad() {
+			this.isDirector = this.$common.isDirector()
 			var that = this
 			uni.getLocation({
 					success(res) {
@@ -201,17 +204,17 @@
 						}
 					})
 
-					if (this.page == 1 && list.length == 0) {
-						this.noMoreShow = false
-					} else if (list.length < 20) {
-						this.noMoreShow = true
+					if (this.page == 1 && list.length == 0) {
+						this.noMoreShow = false
+					} else if (list.length < 20) {
+						this.noMoreShow = true
 					}
 					if (this.page == 1) {
 						this.shopData = list
 					} else {
 						this.shopData = this.shopData.concat(list)
-					}
-					
+					}
+
 				})
 			}
 		},
@@ -347,10 +350,11 @@
 		padding-left: 20rpx;
 		padding-right: 20rpx;
 		padding-bottom: 30rpx;
-		border-bottom: 1rpx solid #EEEEEE;
+		
 	}
 
-	.bottomView {
+	.bottomView {
+		border-top: 1rpx solid #EEEEEE;
 		display: flex;
 		justify-content: flex-end;
 	}