Browse Source

Merge branch 'master' of http://47.98.226.240:3000/twt/operatingCompany

twt 3 years ago
parent
commit
6bc2b092c2

+ 1 - 1
operatingCompany/components/searchBox/searchBox.vue

@@ -36,7 +36,7 @@
 			},
 			clear(){
 				this.inputValue = ''
-				this.$emit('');
+				this.$emit('search','');
 			},
 		}
 	}

+ 13 - 5
operatingCompany/pages/entryReport/entryReport.vue

@@ -17,11 +17,13 @@
 			<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
 			<view style="height: 44px;"></view>
 			<!-- 搜索 -->
-			<view class="searchBox">
+			<!-- <view class="searchBox">
 				<image src="../../static/img/icon_search.png" class="searchImg"></image>
 				<input type="text" class="searchInput" placeholder="请输入门店名称、联系人、手机号" v-model="searchValue"
 					@confirm="searchDone" />
-			</view>
+			</view> -->
+
+			<searchBox placeholder="请输入门店名称、联系人、手机号" @search='search($event)'></searchBox>
 
 			<!-- 筛选条件 -->
 			<view class="siftBg">
@@ -154,7 +156,11 @@
 </template>
 
 <script>
+	import searchBox from '@/components/searchBox/searchBox.vue'
 	export default {
+		components: {
+			searchBox
+		},
 		data() {
 			return {
 				searchValue: '',
@@ -216,11 +222,13 @@
 				this.$store.commit('mutationsCategoryList', '');
 				this.$store.commit('mutationssuggestList', '')
 				uni.navigateTo({
-					url: 'entered?shopId=' + item.shopId + '&ShopName=' + item.ShopName+'&Contactor='+item.Contactor
+					url: 'entered?shopId=' + item.shopId + '&ShopName=' + item.ShopName + '&Contactor=' + item
+						.Contactor
 				})
 			},
-			searchDone(e) {
-				this.searchValue = e.target.value;
+			search(val) {
+				// console.log(val);
+				this.searchValue = val
 				this.page = 1
 				this.getShopData()
 			},

+ 15 - 10
operatingCompany/pages/entryReport/historyReport.vue

@@ -17,11 +17,12 @@
 
 
 			<!-- 搜索 -->
-			<view class="searchBox">
+			<!-- <view class="searchBox">
 				<image src="../../static/img/icon_search.png" class="searchImg"></image>
 				<input type="text" class="searchInput" placeholder="请输入门店名称、联系人、手机号" v-model="searchValue"
 					@confirm="searchDone" />
-			</view>
+			</view> -->
+			<searchBox placeholder="请输入门店名称、联系人、手机号" @search='search($event)'></searchBox>
 
 			<!-- 条件筛选 -->
 			<view class="siftBg">
@@ -89,11 +90,14 @@
 
 <script>
 	import timeChose from '@/components/timeChose/timeChose.vue'
-	import nodata from '../../components/nodata/nodata.vue'
+	import nodata from '../../components/nodata/nodata.vue'
+	import searchBox from '@/components/searchBox/searchBox.vue'
+	
 	export default {
 		components: {
 			timeChose,
-			nodata
+			nodata,
+			searchBox
 		},
 		data() {
 			return {
@@ -155,12 +159,13 @@
 				this.page = 1;
 				this.getShopData()
 			},
-			searchDone(e) {
-				this.searchValue = e.target.value
-				this.page = 1
-				this.getShopData()
-			},
-
+			
+			search(val){
+							// console.log(val);
+							this.searchValue = val
+							this.page = 1
+							this.getShopData()
+						},
 			
 			bindPickerChange3(e) {
 				this.thirdIndex = e.target.value

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

@@ -17,11 +17,13 @@
 
 
 			<!-- 搜索 -->
-			<view class="searchBox">
+			<!-- <view class="searchBox">
 				<image src="../../static/img/icon_search.png" class="searchImg"></image>
 				<input type="text" class="searchInput" placeholder="请输入门店名称、联系人、手机号" v-model="searchValue"
 					@confirm="searchDone" />
-			</view>
+			</view> -->
+			<searchBox placeholder="请输入门店名称、联系人、手机号" @search='search($event)'></searchBox>
+
 
 			<!-- 条件筛选 -->
 			<view class="siftBg">
@@ -54,7 +56,7 @@
 			<view v-for="(item,index) in shopData" :key="index">
 
 				<!-- shopBox -->
-				<view class="shopBox" @click="goAppraise(item)" >
+				<view class="shopBox" @click="goAppraise(item)">
 					<view class=" shopTop">
 
 						<view class="shopName">{{item.ShopName}}</view>
@@ -63,9 +65,9 @@
 						<view class="type" v-if="item.State == 1">待提交</view>
 						<view class="type" v-if="item.State == 2">待作业</view>
 						<view class="type" v-if="item.State == 3">待点评</view>
-						<view class="type" v-if="item.State == 4">待回复</view>
+						<view class="type" v-if="item.State == 4">待回复</view>
 						<view class="type" v-if="item.State == 5">已完成</view>
-						
+
 
 					</view>
 
@@ -74,7 +76,8 @@
 					<!-- 第2行 -->
 					<view class="bottomView">
 						<!-- 运营经理 -->
-						<view class="manager">{{item.ManagerName}} · {{item.CheckTime.slice(0,item.CheckTime.length-8)}}</view>
+						<view class="manager">{{item.ManagerName}} · {{item.CheckTime.slice(0,item.CheckTime.length-8)}}
+						</view>
 						<!-- 评分 -->
 						<view class="score" v-if="item.ShopScore">{{item.ShopScore}}分</view>
 					</view>
@@ -98,14 +101,16 @@
 
 <script>
 	import timeChose from '@/components/timeChose/timeChose.vue'
+	import searchBox from '@/components/searchBox/searchBox.vue'
 	export default {
 		components: {
-			timeChose
+			timeChose,
+			searchBox
 		},
 		data() {
 			return {
 				tabIndex: 0,
-				status: '', 
+				status: '',
 				searchValue: '',
 				data: {
 					provinceCode: '',
@@ -128,28 +133,28 @@
 				timeShow: false,
 				starTime: '',
 				endTime: '',
-				dateTime: null,
-				isDirector:'',
+				dateTime: null,
+				isDirector: '',
 			}
 		},
-		onShow() {
-			this.isDirector = this.$common.isDirector()
-			
-			if(this.isDirector) {
-				this.getManager()
+		onShow() {
+			this.isDirector = this.$common.isDirector()
+
+			if (this.isDirector) {
+				this.getManager()
 			}
-
+
 			this.page = 1
 			this.getShopData()
 		},
 		methods: {
 			timeClick() {
-				
+
 				this.$refs.timepop.father();
 			},
-			goAppraise(item){
+			goAppraise(item) {
 				uni.navigateTo({
-					url:'reportDetail?id='+item.ID
+					url: 'reportDetail?id=' + item.ID
 				})
 			},
 			returnDate(e) {
@@ -162,7 +167,7 @@
 					this.dateTime = null
 				}
 
-				this.page = 1;
+				this.page = 1;
 				this.getShopData()
 			},
 			tabClick(num) {
@@ -176,8 +181,9 @@
 				this.page = 1;
 				this.getShopData()
 			},
-			searchDone(e) {
-				this.searchValue = e.target.value
+			search(val) {
+				// console.log(val);
+				this.searchValue = val
 				this.page = 1
 				this.getShopData()
 			},
@@ -200,7 +206,7 @@
 						}
 					}
 					this.data.address = this.data.province + this.data.city + this.data.area
-				} 
+				}
 
 
 
@@ -211,9 +217,9 @@
 			},
 			bindPickerChange3(e) {
 				this.thirdIndex = e.target.value
-				this.managerId = this.thirdArr[this.thirdIndex].ID
-				if(e.target.value == 0){
-					this.thirdIndex = null
+				this.managerId = this.thirdArr[this.thirdIndex].ID
+				if (e.target.value == 0) {
+					this.thirdIndex = null
 				}
 				this.page = 1
 				this.getShopData()
@@ -259,23 +265,22 @@
 						}
 					})
 
-					
+
 					if (this.page == 1) {
 						this.shopData = list
 					} else {
 						this.shopData = this.shopData.concat(list)
 					}
-
-
-					if(list.length < 10){
-						this.noMoreShow = false
-					}
-					else {
-						this.noMoreShow = true
+
+
+					if (list.length < 10) {
+						this.noMoreShow = false
+					} else {
+						this.noMoreShow = true
 					}
 				})
 			},
-			
+
 
 		},
 

+ 41 - 35
operatingCompany/pages/team/manageStore.vue

@@ -2,11 +2,13 @@
 	<view class="content">
 		<!-- 搜索 -->
 		<view class="searchBoxBg">
-			<view class="searchBox">
+			<!-- <view class="searchBox">
 				<image src="../../static/img/icon_search.png" mode="" class="searchImg"></image>
 				<input type="text" class="searchInput" placeholder="请输入门店名称、联系人、手机号" v-model="searchValue"
 					@confirm="searchDone" />
-			</view>
+			</view> -->
+			<searchBox placeholder="请输入门店名称、联系人、手机号" @search='search($event)'></searchBox>
+
 		</view>
 
 		<!-- 门店列表 -->
@@ -52,7 +54,11 @@
 </template>
 
 <script>
+	import searchBox from '@/components/searchBox/searchBox.vue'
 	export default {
+		components: {
+			searchBox
+		},
 		data() {
 			return {
 				searchValue: '',
@@ -70,16 +76,17 @@
 			uni.getLocation({
 				success(res) {
 					that.lng = res.longitude
-					that.lat = res.latitude
-					
+					that.lat = res.latitude
+
 					that.page = 1
 					that.getShopData()
 				}
 			})
 		},
 		methods: {
-			searchDone(e) {
-				this.searchValue = e.target.value;
+			search(val) {
+				// console.log(val);
+				this.searchValue = val
 				this.page = 1
 				this.getShopData()
 			},
@@ -88,8 +95,8 @@
 					title: '加载中'
 				})
 				let url = 'accompany/SuperAccounts/queryShopListByManagerID',
-					params = {
-						page: this.page,
+					params = {
+						page: this.page,
 						limit: 20,
 						managerID: this.managerID,
 						shopName: this.searchValue,
@@ -97,29 +104,28 @@
 						lat: this.lat,
 					}
 				this.$http(url, params, 'GET').then(res => {
-					var list = res.data.Items
-					
-					// 处理 undefined和null转为空白字符串
-					list.forEach((item, index) => {
-						for (const key in item) {
-							item[key] = this.$praseStrEmpty(item[key])
-						}
-					})
-					
-					
-					if (this.page == 1) {
-						this.shopData = list
-					} else {
-						this.shopData = this.shopData.concat(list)
+					var list = res.data.Items
+
+					// 处理 undefined和null转为空白字符串
+					list.forEach((item, index) => {
+						for (const key in item) {
+							item[key] = this.$praseStrEmpty(item[key])
+						}
+					})
+
+
+					if (this.page == 1) {
+						this.shopData = list
+					} else {
+						this.shopData = this.shopData.concat(list)
+					}
+
+					if (list.length < 10) {
+						this.noMoreShow = false
+					} else {
+						this.noMoreShow = true
 					}
-
-					if(list.length < 10){
-						this.noMoreShow = false
-					}
-					else {
-						this.noMoreShow = true
-					}
-					
+
 				})
 			},
 
@@ -138,17 +144,17 @@
 					})
 				}
 			}
-		},
+		},
 		// 下拉刷新 上拉加载更多
 		onPullDownRefresh() {
 			this.getShopData()
 			setTimeout(function() {
 				uni.stopPullDownRefresh();
 			}, 1000);
-		},
-		onReachBottom() {
-			this.page++
-			this.getShopData()
+		},
+		onReachBottom() {
+			this.page++
+			this.getShopData()
 		}
 	}
 </script>

+ 23 - 15
operatingCompany/pages/team/myTeam.vue

@@ -2,12 +2,15 @@
 	<view class="content">
 		<!-- 搜索 -->
 		<view class="searchBoxBg">
-			<view class="searchBox">
+			<!-- <view class="searchBox">
 				<image src="../../static/img/icon_search.png" mode="" class="searchImg"></image>
 				<input type="text" class="searchInput" placeholder="请输入姓名、手机号" v-model="searchValue"
 					@confirm="searchDone" />
-			</view>
+			</view> -->
+			<searchBox placeholder="请输入姓名、手机号" @search='search($event)'></searchBox>
 		</view>
+		
+
 
 		<!-- 团队数量 -->
 		<view class="teamTop">
@@ -46,13 +49,17 @@
 </template>
 
 <script>
+	import searchBox from '@/components/searchBox/searchBox.vue'
 	export default {
+		components: {
+			searchBox
+		},
 		data() {
 			return {
 				shopData: [],
 				count: 0,
 				searchValue: '',
-				page: 1,
+				page: 1,
 				noMoreShow: false,
 			}
 		},
@@ -61,8 +68,10 @@
 			this.getData()
 		},
 		methods: {
-			searchDone(e) {
-				this.searchValue = e.target.value;
+
+			search(val) {
+				// console.log(val);
+				this.searchValue = val
 				this.page = 1
 				this.getData()
 			},
@@ -92,20 +101,19 @@
 						}
 					})
 
-					
+
 					if (this.page == 1) {
 						this.shopData = list
 					} else {
 						this.shopData = this.shopData.concat(list)
-					}
-					
-					if(list.length < 10){
-						this.noMoreShow = false
-					}
-					else {
-						this.noMoreShow = true
-					}
-					
+					}
+
+					if (list.length < 10) {
+						this.noMoreShow = false
+					} else {
+						this.noMoreShow = true
+					}
+
 				})
 			}
 		},

+ 5 - 6
operatingCompany/pages/teamStore/teamStore.vue

@@ -139,13 +139,12 @@
 
 		methods: {
 			search(val){
-				console.log(val);
-			},
-			searchDone(e) {
-				this.searchValue = e.target.value
-				this.page = 1
-				this.getShopData()
+				// console.log(val);
+				this.searchValue = val
+				this.page = 1
+				this.getShopData()
 			},
+			
 			bindChange: function(e) {
 				this.data.address = '区域筛选';
 				this.data.provinceCode = '';