Procházet zdrojové kódy

1.筛选条件 调整

guo před 3 roky
rodič
revize
f65ac22870

+ 11 - 7
operatingCompany/pages/reportManage/reportManage.vue

@@ -42,7 +42,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>
@@ -127,11 +127,17 @@
 				timeShow: false,
 				starTime: '',
 				endTime: '',
-				dateTime: null,
+				dateTime: null,
+				isDirector:'',
 			}
 		},
-		onShow() {
-			this.getManager()
+		onShow() {
+			this.isDirector = this.$common.isDirector()
+			
+			if(this.isDirector) {
+				this.getManager()
+			}
+
 			this.page = 1
 			this.getShopData()
 		},
@@ -189,9 +195,7 @@
 						}
 					}
 					this.data.address = this.data.province + this.data.city + this.data.area
-				} else {
-
-				}
+				} 
 
 
 

+ 36 - 17
operatingCompany/pages/teamStore/teamStore.vue

@@ -11,7 +11,7 @@
 
 			<!-- 条件筛选 -->
 			<view class="siftBg">
-				<picker @change="bindChange" mode="region">
+				<picker @change="bindChange" mode="region" custom-item="全部">
 					<view class="uni-input">{{data.address == null ? '区域筛选' : data.address}}
 						<image class="downArrow" src="../../static/img/icon_downArrow.png"></image>
 					</view>
@@ -97,17 +97,20 @@
 					address: null,
 				},
 				thirdIndex: null,
-				thirdArr: [],
+				thirdArr: [{
+					name: '请选择',
+					ID: ''
+				}],
 				managerId: '',
 				shopData: [],
 				page: 1,
 				noMoreShow: false,
 				lng: '',
-				lat: '',
-				isDirector:'',
+				lat: '',
+				isDirector: '',
 			}
 		},
-		onLoad() {
+		onLoad() {
 			this.isDirector = this.$common.isDirector()
 			var that = this
 			uni.getLocation({
@@ -118,11 +121,16 @@
 						that.page = 1
 						that.getShopData()
 					}
-				}),
-				this.getManager()
+				})
+
+
+				if (this.isDirector) {
+					this.getManager()
+				}
 
 		},
 
+
 		methods: {
 			searchDone(e) {
 				this.searchValue = e.target.value
@@ -130,13 +138,24 @@
 				this.getShopData()
 			},
 			bindChange: function(e) {
-				this.data.provinceCode = e.detail.code[0]
-				this.data.cityCode = e.detail.code[1]
-				this.data.areaCode = e.detail.code[2]
-				this.data.province = e.detail.value[0]
-				this.data.city = e.detail.value[1]
-				this.data.area = e.detail.value[2]
-				this.data.address = this.data.province + this.data.city + this.data.area
+				this.data.address = '区域筛选';
+				this.data.provinceCode = '';
+				this.data.cityCode = '';
+				this.data.areaCode = ''
+				if (e.detail.code[0]) {
+					this.data.provinceCode = e.detail.code[0];
+					this.data.province = e.detail.value[0];
+					if (e.detail.code[1]) {
+						this.data.cityCode = e.detail.code[1];
+						this.data.city = e.detail.value[1]
+						if (e.detail.code[2]) {
+							this.data.areaCode = e.detail.code[2];
+							this.data.area = e.detail.value[2]
+						}
+					}
+					this.data.address = this.data.province + this.data.city + this.data.area
+				}
+
 				this.page = 1
 				this.getShopData()
 			},
@@ -175,7 +194,7 @@
 						name: '',
 					}
 				this.$http(url, params, 'GET').then(res => {
-					this.thirdArr = res.data
+					this.thirdArr = this.thirdArr.concat(res.data)
 				})
 			},
 			getShopData() {
@@ -350,10 +369,10 @@
 		padding-left: 20rpx;
 		padding-right: 20rpx;
 		padding-bottom: 30rpx;
-		
+
 	}
 
-	.bottomView {
+	.bottomView {
 		border-top: 1rpx solid #EEEEEE;
 		display: flex;
 		justify-content: flex-end;