twt 3 years ago
parent
commit
abf20131d4

+ 10 - 1
operatingCompany/components/timeChose/timeChose.vue

@@ -4,7 +4,7 @@
 			<view class="pop_phone pop-container">
 				<view class="popup-title">
 					<view class="u-popup-cancel-btn" @click="closepop">取消</view>
-					<view class="u-title">选择时间</view>
+					<view class="u-title" @click="reset">重置</view>
 					<view class="u-popup-sure-btn" @click="handleSelectSure">确定</view>
 				</view>
 				<view class="m-select-time">
@@ -339,6 +339,15 @@
 				this.$emit('returnDate', obj);
 				this.$refs.popcash.close();
 				//this.isShow=false;
+			},
+			reset(){
+				var obj = {
+					startTime: 0,
+					endTime: 0,
+					isclose: false
+				};
+				this.$emit('returnDate', obj);
+				this.$refs.popcash.close();
 			},
 			 father(){
 				 this.$refs.popcash.open();

+ 37 - 12
operatingCompany/pages/reportManage/reportManage.vue

@@ -34,7 +34,7 @@
  -->           
                 <view @click="timeClick">{{data.time == null ? '日期筛选' : data.time}}</view>
 				<!-- 省市区 选择 -->
-				<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>
@@ -117,7 +117,9 @@
 					time:null,
 				},
 				thirdIndex: null,
-				thirdArr: [],
+				thirdArr: [{
+					name:'请选择',ID:''
+				}],
 				managerId: '',
 				shopData: [],
 				page: 1,
@@ -138,8 +140,13 @@
 			},
 			returnDate(e){
 				console.log(e)
-				this.data.time=e.startTime+'-'+e.endTime 
-				console.log(this.data.time)
+				if(e.startTime){
+					this.data.time=e.startTime+'-'+e.endTime 
+				}else{
+					this.data.time=null
+				}
+				
+				console.log()
 			},
 			tabClick(num) {
 				this.tabIndex = num;
@@ -161,13 +168,31 @@
 				
 			},
 			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
+				console.log(e)
+				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
+				}else{
+					
+				}
+				
+				
+				
+				
+				
 				this.page = 1
 				this.getShopData()
 			},
@@ -187,7 +212,7 @@
 						name: '',
 					}
 				this.$http(url, params, 'GET').then(res => {
-					this.thirdArr = res.data
+					this.thirdArr =this.thirdArr.concat(res.data) 
 				})
 			},
 			getShopData() {