|
@@ -1,7 +1,21 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
- <view class="topView">
|
|
|
+ <view class="zdyNav">
|
|
|
+ <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
|
|
|
+ <view class="nav">
|
|
|
+ <view>
|
|
|
+ <image src="../../static/img/baiheiback.png" mode="" class="baiheiback" @click="back"></image>
|
|
|
+ </view>
|
|
|
+ <view>门店列表</view>
|
|
|
+ <view style="width:70px;"></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
|
|
|
+ <view style="height: 44px;"></view>
|
|
|
|
|
|
+ <view class="topView">
|
|
|
+ <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
|
|
|
+ <view style="height: 44px;"></view>
|
|
|
<!-- 搜索 -->
|
|
|
<view class="searchBox">
|
|
|
<image src="../../static/img/icon_search.png" class="searchImg"></image>
|
|
@@ -34,40 +48,41 @@
|
|
|
|
|
|
<!-- 门店列表 -->
|
|
|
<view class="shopContent">
|
|
|
- <view v-for="(item,index) in shopData" :key="index">
|
|
|
+ <view v-for="(item,index) in shopData" :key="index">
|
|
|
<!-- 需要检查项 大于0 -->
|
|
|
<view class="shopBox" v-if="isHave && item.checkCount > 0">
|
|
|
<view class="shopTop">
|
|
|
<view class="shopName">{{item.ShopName}}</view>
|
|
|
-
|
|
|
-
|
|
|
- <!-- 地址 和电话 图标 -->
|
|
|
- <image class="tubiao" src="../../static/img/icon_daohang_def@2x.png" @click="goAddress(item)">
|
|
|
- </image>
|
|
|
- <image class="tubiao" src="../../static/img/icon_phone_def@2x.png"
|
|
|
- @click="call(item.ContactorPhone)">
|
|
|
- </image>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 地址 和电话 图标 -->
|
|
|
+ <image class="tubiao" src="../../static/img/icon_daohang_def@2x.png" @click="goAddress(item)">
|
|
|
+ </image>
|
|
|
+ <image class="tubiao" src="../../static/img/icon_phone_def@2x.png"
|
|
|
+ @click="call(item.ContactorPhone)">
|
|
|
+ </image>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
</view>
|
|
|
- <!-- 门店类型-开业时间-联系人 -->
|
|
|
- <view class="shopType"><text style='color: #B98B5D;'>{{item.levelName}}</text> ·
|
|
|
- <text v-if="item.OpeningTime != null">{{item.OpeningTime}}</text> 联系人:{{item.Contactor}}
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 详细地址 -->
|
|
|
- <view class="addressView">
|
|
|
- <view class="address">{{item.Address}}</view>
|
|
|
- <view class="distance" v-if="item.distance != 0.00">{{item.distance}}km</view>
|
|
|
+ <!-- 门店类型-开业时间-联系人 -->
|
|
|
+ <view class="shopType"><text style='color: #B98B5D;'>{{item.levelName}}</text> ·
|
|
|
+ <text v-if="item.OpeningTime != null">{{item.OpeningTime}}</text> 联系人:{{item.Contactor}}
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 详细地址 -->
|
|
|
+ <view class="addressView">
|
|
|
+ <view class="address">{{item.Address}}</view>
|
|
|
+ <view class="distance" v-if="item.distance != 0.00">{{item.distance}}km</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 提交信息 -->
|
|
|
<view class="tijao">
|
|
|
- <view class="time" v-if="item.maxTime">距上次提交:<text style='color: #FF4F00;'>{{item.maxTime}}</text>天</view>
|
|
|
- <view class="time" v-else>暂无提交记录</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>
|
|
|
|
|
@@ -78,51 +93,52 @@
|
|
|
<view class="baogao" @click="goEntered(item)">录入报告</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <!-- 展示全部数据 -->
|
|
|
- <view class="shopBox" v-if="!isHave">
|
|
|
- <view class="shopTop">
|
|
|
- <view class="shopName">{{item.ShopName}}</view>
|
|
|
-
|
|
|
-
|
|
|
- <!-- 地址 和电话 图标 -->
|
|
|
- <image class="tubiao" src="../../static/img/icon_daohang_def@2x.png" @click="goAddress(item)">
|
|
|
- </image>
|
|
|
- <image class="tubiao" src="../../static/img/icon_phone_def@2x.png"
|
|
|
- @click="call(item.ContactorPhone)">
|
|
|
- </image>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- </view>
|
|
|
- <!-- 门店类型-开业时间-联系人 -->
|
|
|
- <view class="shopType"><text style='color: #B98B5D;'>{{item.levelName}}</text> ·
|
|
|
- <text v-if="item.OpeningTime != null">{{item.OpeningTime}}</text> 联系人:{{item.Contactor}}
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 详细地址 -->
|
|
|
- <view class="addressView">
|
|
|
- <view class="address">{{item.Address}}</view>
|
|
|
- <view class="distance" v-if="item.distance != 0.00">{{item.distance}}km</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 提交信息 -->
|
|
|
- <view class="tijao">
|
|
|
- <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>
|
|
|
-
|
|
|
- <!-- btns -->
|
|
|
- <view class="btns">
|
|
|
- <view class="lishi" @click="goHistory(item)">历史记录</view>
|
|
|
- <view class="qiandao">签到</view>
|
|
|
- <view class="baogao" @click="goEntered(item)">录入报告</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
+
|
|
|
+ <!-- 展示全部数据 -->
|
|
|
+ <view class="shopBox" v-if="!isHave">
|
|
|
+ <view class="shopTop">
|
|
|
+ <view class="shopName">{{item.ShopName}}</view>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 地址 和电话 图标 -->
|
|
|
+ <image class="tubiao" src="../../static/img/icon_daohang_def@2x.png" @click="goAddress(item)">
|
|
|
+ </image>
|
|
|
+ <image class="tubiao" src="../../static/img/icon_phone_def@2x.png"
|
|
|
+ @click="call(item.ContactorPhone)">
|
|
|
+ </image>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <!-- 门店类型-开业时间-联系人 -->
|
|
|
+ <view class="shopType"><text style='color: #B98B5D;'>{{item.levelName}}</text> ·
|
|
|
+ <text v-if="item.OpeningTime != null">{{item.OpeningTime}}</text> 联系人:{{item.Contactor}}
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 详细地址 -->
|
|
|
+ <view class="addressView">
|
|
|
+ <view class="address">{{item.Address}}</view>
|
|
|
+ <view class="distance" v-if="item.distance != 0.00">{{item.distance}}km</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 提交信息 -->
|
|
|
+ <view class="tijao">
|
|
|
+ <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>
|
|
|
+
|
|
|
+ <!-- btns -->
|
|
|
+ <view class="btns">
|
|
|
+ <view class="lishi" @click="goHistory(item)">历史记录</view>
|
|
|
+ <view class="qiandao">签到</view>
|
|
|
+ <view class="baogao" @click="goEntered(item)">录入报告</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -150,8 +166,13 @@
|
|
|
shopData: [],
|
|
|
page: 1,
|
|
|
noMoreShow: false,
|
|
|
+ iStatusBarHeight: '',
|
|
|
}
|
|
|
},
|
|
|
+ onLoad() {
|
|
|
+ //页面加载初始化生命周期函数
|
|
|
+ this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
|
|
+ },
|
|
|
onShow() {
|
|
|
this.firstIndex = null
|
|
|
this.isHave = false
|
|
@@ -160,36 +181,41 @@
|
|
|
success(res) {
|
|
|
that.lng = res.longitude
|
|
|
that.lat = res.latitude
|
|
|
-
|
|
|
+
|
|
|
that.page = 1
|
|
|
- that.getShopData()
|
|
|
+ that.getShopData()
|
|
|
},
|
|
|
fail() {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
- //#ifdef H5
|
|
|
-
|
|
|
- that.lng='117.06533'
|
|
|
- that.lat='36.68013'
|
|
|
- that.getShopData()
|
|
|
- // #endif
|
|
|
+ //#ifdef H5
|
|
|
+
|
|
|
+ that.lng = '117.06533'
|
|
|
+ that.lat = '36.68013'
|
|
|
+ that.getShopData()
|
|
|
+ // #endif
|
|
|
},
|
|
|
- methods: {
|
|
|
- goHistory(item){
|
|
|
- uni.navigateTo({
|
|
|
- url:'historyReport?shopId=' + item.shopId
|
|
|
- })
|
|
|
+ methods: {
|
|
|
+ back() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '../index/index'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ goHistory(item) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: 'historyReport?shopId=' + item.shopId
|
|
|
+ })
|
|
|
},
|
|
|
- goEntered(item){
|
|
|
- this.$store.commit('mutationsCategoryList','');
|
|
|
- this.$store.commit('mutationssuggestList','')
|
|
|
+ goEntered(item) {
|
|
|
+ this.$store.commit('mutationsCategoryList', '');
|
|
|
+ this.$store.commit('mutationssuggestList', '')
|
|
|
uni.navigateTo({
|
|
|
- url:'entered?shopId='+item.shopId+'&ShopName='+item.ShopName
|
|
|
+ url: 'entered?shopId=' + item.shopId + '&ShopName=' + item.ShopName
|
|
|
})
|
|
|
},
|
|
|
searchDone(e) {
|
|
|
- this.searchValue = e.target.value;
|
|
|
+ this.searchValue = e.target.value;
|
|
|
this.page = 1
|
|
|
this.getShopData()
|
|
|
},
|
|
@@ -198,91 +224,90 @@
|
|
|
this.page = 1
|
|
|
this.getShopData()
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
changeHave() {
|
|
|
- this.isHave = !this.isHave
|
|
|
-
|
|
|
+ this.isHave = !this.isHave
|
|
|
+
|
|
|
},
|
|
|
- goAddress(v) {
|
|
|
-
|
|
|
- uni.openLocation({
|
|
|
- latitude: Number(v.lat),
|
|
|
- longitude: Number(v.lng),
|
|
|
- name: v.shopName,
|
|
|
- address: v.Address,
|
|
|
- });
|
|
|
- },
|
|
|
- call(e) {
|
|
|
- if (e.length != 0) {
|
|
|
- uni.makePhoneCall({
|
|
|
- phoneNumber: e
|
|
|
- })
|
|
|
- }
|
|
|
+ goAddress(v) {
|
|
|
+
|
|
|
+ uni.openLocation({
|
|
|
+ latitude: Number(v.lat),
|
|
|
+ longitude: Number(v.lng),
|
|
|
+ name: v.shopName,
|
|
|
+ address: v.Address,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ call(e) {
|
|
|
+ if (e.length != 0) {
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber: e
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
getShopData() {
|
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
|
- })
|
|
|
- var maxTime = ''
|
|
|
- if(this.firstIndex == 0){
|
|
|
- maxTime = ''
|
|
|
- }
|
|
|
- else {
|
|
|
- maxTime = Number(this.firstIndex)
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ })
|
|
|
+ var maxTime = ''
|
|
|
+ if (this.firstIndex == 0) {
|
|
|
+ maxTime = ''
|
|
|
+ } else {
|
|
|
+ maxTime = Number(this.firstIndex)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
let url = 'accompany/SuperAccounts/queryShopListByMyTeam',
|
|
|
- params = {
|
|
|
- // page: this.page,
|
|
|
+ params = {
|
|
|
+ // page: this.page,
|
|
|
// limit: 20,
|
|
|
shopName: this.searchValue,
|
|
|
lng: this.lng,
|
|
|
- lat: this.lat,
|
|
|
- maxTime:maxTime,
|
|
|
-
|
|
|
+ lat: this.lat,
|
|
|
+ maxTime: maxTime,
|
|
|
+
|
|
|
}
|
|
|
this.$http(url, params, 'GET').then(res => {
|
|
|
- var list = res.data
|
|
|
-
|
|
|
- // 处理 undefined和null转为空白字符串
|
|
|
- list.forEach((item, index) => {
|
|
|
- for (const key in item) {
|
|
|
- item[key] = this.$praseStrEmpty(item[key])
|
|
|
- }
|
|
|
- })
|
|
|
- this.shopData = list
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // if (this.page == 1) {
|
|
|
- // this.shopData = list
|
|
|
- // } else {
|
|
|
- // this.shopData = this.shopData.concat(list)
|
|
|
+ var list = res.data
|
|
|
+
|
|
|
+ // 处理 undefined和null转为空白字符串
|
|
|
+ list.forEach((item, index) => {
|
|
|
+ for (const key in item) {
|
|
|
+ item[key] = this.$praseStrEmpty(item[key])
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.shopData = list
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // if (this.page == 1) {
|
|
|
+ // this.shopData = list
|
|
|
+ // } else {
|
|
|
+ // this.shopData = this.shopData.concat(list)
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if(list.length < 10){
|
|
|
+ // this.noMoreShow = false
|
|
|
// }
|
|
|
-
|
|
|
- // if(list.length < 10){
|
|
|
- // this.noMoreShow = false
|
|
|
- // }
|
|
|
- // else {
|
|
|
- // this.noMoreShow = true
|
|
|
- // }
|
|
|
-
|
|
|
+ // else {
|
|
|
+ // this.noMoreShow = true
|
|
|
+ // }
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
- },
|
|
|
- // 下拉刷新 上拉加载更多
|
|
|
-
|
|
|
+ },
|
|
|
+ // 下拉刷新 上拉加载更多
|
|
|
+
|
|
|
onPullDownRefresh() {
|
|
|
this.getShopData()
|
|
|
setTimeout(function() {
|
|
|
uni.stopPullDownRefresh();
|
|
|
}, 1000);
|
|
|
- },
|
|
|
- // onReachBottom() {
|
|
|
- // this.page++;
|
|
|
- // this.getShopData()
|
|
|
+ },
|
|
|
+ // onReachBottom() {
|
|
|
+ // this.page++;
|
|
|
+ // this.getShopData()
|
|
|
// },
|
|
|
}
|
|
|
</script>
|
|
@@ -293,14 +318,40 @@
|
|
|
min-height: 100vh;
|
|
|
}
|
|
|
|
|
|
+ .zdyNav {
|
|
|
+ position: fixed;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ background: #FFFFFF;
|
|
|
+ z-index: 99;
|
|
|
+ }
|
|
|
+
|
|
|
+ .nav {
|
|
|
+ width: 100vw;
|
|
|
+ height: 44px;
|
|
|
+ background: #FFFFFF;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ font-size: 34rpx;
|
|
|
+ line-height: 44px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .status_bar {
|
|
|
+ background: #FFFFFF;
|
|
|
+ }
|
|
|
+
|
|
|
+ .baiheiback {
|
|
|
+ width: 70px;
|
|
|
+ height: 44px;
|
|
|
+ }
|
|
|
+
|
|
|
.topView {
|
|
|
width: 100%;
|
|
|
- height: 200rpx;
|
|
|
background-color: #FFFFFF;
|
|
|
left: 0rpx;
|
|
|
top: 0rpx;
|
|
|
position: fixed;
|
|
|
- z-index: 99;
|
|
|
+ z-index: 98;
|
|
|
}
|
|
|
|
|
|
/* #ifdef H5 */
|
|
@@ -393,14 +444,14 @@
|
|
|
font-size: 30rpx;
|
|
|
font-weight: bold;
|
|
|
color: #3C3C3C;
|
|
|
- margin-right: 20rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
width: 500rpx;
|
|
|
}
|
|
|
|
|
|
- .tubiao {
|
|
|
- width: 48rpx;
|
|
|
- height: 48rpx;
|
|
|
- padding-left: 40rpx;
|
|
|
+ .tubiao {
|
|
|
+ width: 48rpx;
|
|
|
+ height: 48rpx;
|
|
|
+ padding-left: 40rpx;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -414,8 +465,8 @@
|
|
|
padding: 10rpx 20rpx;
|
|
|
display: flex;
|
|
|
font-size: 26rpx;
|
|
|
- color: #999999;
|
|
|
- display: flex;
|
|
|
+ color: #999999;
|
|
|
+ display: flex;
|
|
|
justify-content: space-between;
|
|
|
}
|
|
|
|