Quellcode durchsuchen

1.报告管理
1.团队门店

guo vor 3 Jahren
Ursprung
Commit
7381e754b1
1 geänderte Dateien mit 51 neuen und 40 gelöschten Zeilen
  1. 51 40
      operatingCompany/pages/reportManage/reportManage.vue

+ 51 - 40
operatingCompany/pages/reportManage/reportManage.vue

@@ -25,14 +25,15 @@
 
 			<!-- 条件筛选 -->
 			<view class="siftBg">
+
 				<!-- 日期选择 -->
-				<!-- <picker @change="timeChose" mode="date">
-					<view class="uni-input">
-						<image class="downArrow" src="../../static/img/icon_downArrow.png"></image>
-					</view>
-				</picker>
- -->           
-                <view @click="timeClick">{{data.time == null ? '日期筛选' : data.time}}</view>
+				<view class="timeChose">
+					<view @click="timeClick">{{dateTime == null ? '日期筛选' : dateTime}}</view>
+					<image class="downArrow" src="../../static/img/icon_downArrow.png"></image>
+				</view>
+
+
+
 				<!-- 省市区 选择 -->
 				<picker @change="bindChange" mode="region" custom-item="全部">
 					<view class="uni-input">{{data.address == null ? '区域筛选' : data.address}}
@@ -90,15 +91,15 @@
 			<view class="noTxt">暂无数据</view>
 		</view>
 
-      <timeChose ref="timepop" @returnDate="returnDate" :isShow="timeShow"></timeChose>
+		<timeChose ref="timepop" @returnDate="returnDate" :isShow="timeShow"></timeChose>
 	</view>
 </template>
 
 <script>
-	import timeChose from '@/components/timeChose/timeChose.vue'	
+	import timeChose from '@/components/timeChose/timeChose.vue'
 	export default {
 		components: {
-			   timeChose
+			timeChose
 		},
 		data() {
 			return {
@@ -113,17 +114,20 @@
 					areaCode: '',
 					area: '',
 					address: null,
-					time:null,
 				},
 				thirdIndex: null,
 				thirdArr: [{
-					name:'请选择',ID:''
+					name: '请选择',
+					ID: ''
 				}],
 				managerId: '',
 				shopData: [],
 				page: 1,
 				noMoreShow: false,
-                timeShow:false,
+				timeShow: false,
+				starTime: '',
+				endTime: '',
+				dateTime: null,
 			}
 		},
 		onShow() {
@@ -132,20 +136,23 @@
 			this.getShopData()
 		},
 		methods: {
-			timeClick(){
+			timeClick() {
 				/* this.timeShow=true;
 				console.log(this.timeShow) */
 				this.$refs.timepop.father();
 			},
-			returnDate(e){
+			returnDate(e) {
 				console.log(e)
-				if(e.startTime){
-					this.data.time=e.startTime+'-'+e.endTime 
-				}else{
-					this.data.time=null
+				this.starTime = e.startTime
+				this.endTime = e.endTime
+				if (e.startTime) {
+					this.dateTime = e.startTime + '-' + e.endTime
+				} else {
+					this.dateTime = null
 				}
-				
-				console.log()
+
+				this.page = 1;
+				this.getShopData()
 			},
 			tabClick(num) {
 				this.tabIndex = num;
@@ -162,36 +169,34 @@
 				this.searchValue = e.target.value
 				this.page = 1
 				this.getShopData()
-			},
-			timeChose(e){
-				
 			},
+
 			bindChange: function(e) {
 				console.log(e)
 				this.data.address = '区域筛选';
-				this.data.provinceCode='';
-				this.data.cityCode='';
-				this.data.areaCode=''
-				if(e.detail.code[0]){
+				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]){
+					if (e.detail.code[1]) {
 						this.data.cityCode = e.detail.code[1];
 						this.data.city = e.detail.value[1]
-						if(e.detail.code[2]){
+						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{
-					
+				} else {
+
 				}
-				
-				
-				
-				
-				
+
+
+
+
+
 				this.page = 1
 				this.getShopData()
 			},
@@ -211,7 +216,7 @@
 						name: '',
 					}
 				this.$http(url, params, 'GET').then(res => {
-					this.thirdArr =this.thirdArr.concat(res.data) 
+					this.thirdArr = this.thirdArr.concat(res.data)
 				})
 			},
 			getShopData() {
@@ -227,8 +232,8 @@
 						areaCode: this.data.areaCode,
 						manager: this.managerId,
 						shopName: this.searchValue,
-						starTime: '',
-						endTime: '',
+						starTime: this.starTime,
+						endTime: this.endTime,
 						state: this.status,
 
 					}
@@ -329,6 +334,12 @@
 		align-items: center;
 	}
 
+	.timeChose {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+	}
+
 	.downArrow {
 		width: 16rpx;
 		height: 12rpx;