|
@@ -4,7 +4,7 @@
|
|
|
<view class="topView">
|
|
|
<!-- 搜索 -->
|
|
|
<view class="searchBox">
|
|
|
- <image src="../../static/img/icon_search.png" mode="" class="searchImg"></image>
|
|
|
+ <image src="../../static/img/icon_search.png" class="searchImg"></image>
|
|
|
<input type="text" class="searchInput" placeholder="请输入门店名称、联系人、手机号" v-model="searchValue"
|
|
|
@confirm="searchDone" />
|
|
|
</view>
|
|
@@ -17,8 +17,9 @@
|
|
|
</view>
|
|
|
</picker>
|
|
|
|
|
|
- <picker value="thirdIndex" :range="thirdArr" @change="bindPickerChange3">
|
|
|
- <view class="uni-input">{{thirdIndex == null ? '运营经理' : thirdArr[thirdIndex]}}
|
|
|
+ <picker :value="thirdIndex" mode="selector" range-key='name' :range="thirdArr"
|
|
|
+ @change="bindPickerChange3">
|
|
|
+ <view class="uni-input">{{thirdIndex == null ? '运营经理' : thirdArr[thirdIndex].name}}
|
|
|
<image class="downArrow" src="../../static/img/icon_downArrow.png"></image>
|
|
|
</view>
|
|
|
</picker>
|
|
@@ -33,30 +34,31 @@
|
|
|
<view class="shopBox">
|
|
|
<view class="shopTop">
|
|
|
|
|
|
- <view class="shopName">门店名称</view>
|
|
|
+ <view class="shopName">{{item.ShopName}}</view>
|
|
|
|
|
|
<!-- 地址 和电话 图标 -->
|
|
|
- <image class="tubiao" src="../../static/img/icon_daohang_def.png" mode=""
|
|
|
- @click="goAddress(item.address)">
|
|
|
+ <image class="tubiao" src="../../static/img/icon_daohang_def.png"
|
|
|
+ @click="goAddress(item.lng, item.lat)">
|
|
|
</image>
|
|
|
- <image class="tubiao" src="../../static/img/icon_phone_def.png" mode=""
|
|
|
- @click="call(item.phone)">
|
|
|
+ <image class="tubiao" src="../../static/img/icon_phone_def.png"
|
|
|
+ @click="call(item.ContactorPhone)">
|
|
|
</image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 门店类型-开业时间-联系人 -->
|
|
|
- <view class="shopType"><text style='color: #B98B5D;'>门店类型</text> · 开业时间 · 联系人:{{lianxiren}}
|
|
|
+ <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">山东省济南市历下区齐鲁软件园创业广场广广场广广场广广场广广场广</view>
|
|
|
- <view class="distance">29.6km</view>
|
|
|
+ <view class="address">{{item.Address}}</view>
|
|
|
+ <view class="distance">{{item.distance}}km</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 运营经理 -->
|
|
|
- <view class="manager">运营经理:安老师 17762277777</view>
|
|
|
+ <view class="manager">运营经理:{{item.name}} {{item.AccountName}}</view>
|
|
|
|
|
|
<!-- 历史记录 -->
|
|
|
<view class="bottomView">
|
|
@@ -67,6 +69,14 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <!-- 上拉 加载更多 -->
|
|
|
+ <!-- <view class="noMore" v-if="noMoreShow">没有更多数据</view> -->
|
|
|
+ <!-- 无数据空白页 -->
|
|
|
+ <view class="nodataBox" v-if="shopData.length == 0">
|
|
|
+ <image src="../../static/img/pic_empty_def.png" mode="widthFix" class="nodataImg"></image>
|
|
|
+ <view class="noTxt">暂无数据</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -85,44 +95,122 @@
|
|
|
address: null,
|
|
|
},
|
|
|
thirdIndex: null,
|
|
|
- thirdName: '',
|
|
|
- thirdArr: ['王老师', '李老师'],
|
|
|
- shopData: [1, 2, 3, 4, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],
|
|
|
- lianxiren: '小李老师'
|
|
|
+ thirdArr: [],
|
|
|
+ managerId: '',
|
|
|
+ shopData: [],
|
|
|
+ page: 1,
|
|
|
+ noMoreShow: false,
|
|
|
+ lng: '',
|
|
|
+ lat: '',
|
|
|
}
|
|
|
},
|
|
|
- onShow() {
|
|
|
- this.secondIndex = null
|
|
|
- this.thirdIndex = null
|
|
|
+ onLoad() {
|
|
|
+ var that = this
|
|
|
+ uni.getLocation({
|
|
|
+ success(res) {
|
|
|
+ that.lng = res.longitude
|
|
|
+ that.lat = res.latitude
|
|
|
+
|
|
|
+ that.page = 1
|
|
|
+ that.getShopData()
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ this.getManager()
|
|
|
+
|
|
|
},
|
|
|
+
|
|
|
methods: {
|
|
|
searchDone(e) {
|
|
|
- this.searchValue = e.target.value;
|
|
|
+ this.searchValue = e.target.value
|
|
|
+ this.page = 1
|
|
|
+ this.getShopData()
|
|
|
},
|
|
|
bindChange: function(e) {
|
|
|
- console.log(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.province + this.data.city + this.data.area
|
|
|
+ this.page = 1
|
|
|
+ this.getShopData()
|
|
|
},
|
|
|
bindPickerChange3(e) {
|
|
|
- this.thirdIndex = e.target.value;
|
|
|
- this.thirdName = this.thirdArr[this.thirdIndex];
|
|
|
+ this.thirdIndex = e.target.value
|
|
|
+ this.managerId = this.thirdArr[this.thirdIndex].ID
|
|
|
+ this.page = 1
|
|
|
+ this.getShopData()
|
|
|
},
|
|
|
goAddress(e) {
|
|
|
console.log('地图导航');
|
|
|
},
|
|
|
call(e) {
|
|
|
- console.log('打电话');
|
|
|
+ if(e.length != 0) {
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber:e
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
history() {
|
|
|
console.log('历史记录');
|
|
|
+ },
|
|
|
+
|
|
|
+ getManager() {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ let url = 'accompany/SuperAccounts/queryManagerListByDept',
|
|
|
+ params = {
|
|
|
+ name: '',
|
|
|
+ }
|
|
|
+ this.$http(url, params, 'GET').then(res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ this.thirdArr = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getShopData() {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ let url = 'accompany/SuperAccounts/listCheckPage',
|
|
|
+ params = {
|
|
|
+ page: this.page,
|
|
|
+ limit: 10,
|
|
|
+ provinceCode: this.data.provinceCode,
|
|
|
+ cityCode: this.data.cityCode,
|
|
|
+ areaCode: this.data.areaCode,
|
|
|
+ manager: this.managerId,
|
|
|
+ shopName: this.searchValue,
|
|
|
+ lng: this.lng,
|
|
|
+ lat: this.lat,
|
|
|
+ }
|
|
|
+ this.$http(url, params, 'GET').then(res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ var list = res.data
|
|
|
+ if (list.length < 10) {
|
|
|
+ this.noMoreShow = true
|
|
|
+ }
|
|
|
+ if (this.page == 1) {
|
|
|
+ this.shopData = list
|
|
|
+ } else {
|
|
|
+ this.shopData = this.shopData.concat(list)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.page = 1
|
|
|
+ this.getShopData()
|
|
|
+ setTimeout(function() {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }, 1000);
|
|
|
+ },
|
|
|
+ // onReachBottom() {
|
|
|
+ // this.page++;
|
|
|
+ // this.getShopData()
|
|
|
+ // },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -187,9 +275,7 @@
|
|
|
.shopList {
|
|
|
background-color: #F4F5F7;
|
|
|
padding: 0rpx 24rpx;
|
|
|
- position: relative;
|
|
|
- left: 0rpx;
|
|
|
- top: 200rpx;
|
|
|
+ padding-top: 200rpx;
|
|
|
}
|
|
|
|
|
|
.shopBox {
|
|
@@ -264,4 +350,27 @@
|
|
|
line-height: 56rpx;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ /* 空白页css */
|
|
|
+ .nodataBox {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .nodataImg {
|
|
|
+ width: 400rpx;
|
|
|
+ padding-top: 300rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .noTxt {
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: #999999;
|
|
|
+ padding-top: 50rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .noMore {
|
|
|
+ text-align: center;
|
|
|
+ line-height: 50rpx;
|
|
|
+ color: #999999;
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
</style>
|