|
|
|
@ -6,17 +6,37 @@
|
|
|
|
<view>
|
|
|
|
<view>
|
|
|
|
<u-button :custom-style="{'margin':'24rpx 24rpx 0 24rpx'}" type="warning" @click="refresh">刷新</u-button>
|
|
|
|
<u-button :custom-style="{'margin':'24rpx 24rpx 0 24rpx'}" type="warning" @click="refresh">刷新</u-button>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!-- 搜索 -->
|
|
|
|
<!-- 搜索(同一行) -->
|
|
|
|
<view class="search">
|
|
|
|
<view class="search-row">
|
|
|
|
<view class="input-content">
|
|
|
|
<view class="search small">
|
|
|
|
<u-input :clearable="false" :value="select.keyword" placeholder="请输入要搜索的内容" height="30" :custom-style="inputStyle"
|
|
|
|
<view class="input-content">
|
|
|
|
@input="searchInput"></u-input>
|
|
|
|
<u-input :clearable="false" :value="select.keyword" placeholder="请输入要搜索的内容" height="30" :custom-style="inputStyle"
|
|
|
|
|
|
|
|
@input="searchInput"></u-input>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="icon">
|
|
|
|
|
|
|
|
<u-icon name="search" size="46" color="#ABAEBE"></u-icon>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="icon">
|
|
|
|
|
|
|
|
<u-icon name="search" size="46" color="#ABAEBE"></u-icon>
|
|
|
|
<view class="search small">
|
|
|
|
|
|
|
|
<view class="input-content">
|
|
|
|
|
|
|
|
<u-input :clearable="true" :value="select.village_name" placeholder="请输入村/社区名称" height="30" :custom-style="inputStyle"
|
|
|
|
|
|
|
|
@input="villageInput"></u-input>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="icon">
|
|
|
|
|
|
|
|
<u-icon name="home" size="46" color="#ABAEBE"></u-icon>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 回访/生存状态 下拉(同一行) -->
|
|
|
|
|
|
|
|
<view class="drop-down" style="padding: 0 24rpx;">
|
|
|
|
|
|
|
|
<u-dropdown>
|
|
|
|
|
|
|
|
<u-dropdown-item v-model="select.has_quality_callbacks" title="回访" :options="callbackDropdownOptions" />
|
|
|
|
|
|
|
|
<u-dropdown-item v-model="select.is_dead" title="状态" :options="deadDropdownOptions" />
|
|
|
|
|
|
|
|
</u-dropdown>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 护理列表 -->
|
|
|
|
<!-- 护理列表 -->
|
|
|
|
<view class="nursing-list">
|
|
|
|
<view class="nursing-list">
|
|
|
|
<view v-if="nursingList && nursingList.length > 0">
|
|
|
|
<view v-if="nursingList && nursingList.length > 0">
|
|
|
|
@ -24,9 +44,9 @@
|
|
|
|
<view class="top">
|
|
|
|
<view class="top">
|
|
|
|
<view v-if="item.quality_callbacks_count>0" @click="pageTo('/package_sub/pages/quality/qualityHistory?customer_id='+item.id)" class="time">
|
|
|
|
<view v-if="item.quality_callbacks_count>0" @click="pageTo('/package_sub/pages/quality/qualityHistory?customer_id='+item.id)" class="time">
|
|
|
|
回访次数 <text style="color:#2979ff">{{ item.quality_callbacks_count }}</text> 次</view>
|
|
|
|
回访次数 <text style="color:#2979ff">{{ item.quality_callbacks_count }}</text> 次</view>
|
|
|
|
<view v-else class="time">回访次数 {{ 0 }} 次</view>
|
|
|
|
<view v-else class="time">回访次数 {{ 0 }} 次</view>
|
|
|
|
<view class="status">
|
|
|
|
<view class="status">
|
|
|
|
<view class="status-text">{{ item.product_type.name }}</view>
|
|
|
|
<view class="status-text">{{ item.product_type_name }}</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="line"></view>
|
|
|
|
<view class="line"></view>
|
|
|
|
@ -65,7 +85,7 @@
|
|
|
|
<view>
|
|
|
|
<view>
|
|
|
|
<u-icon name="man-add-fill" size="28" color="#1479FF"></u-icon>
|
|
|
|
<u-icon name="man-add-fill" size="28" color="#1479FF"></u-icon>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="text">联系人 {{ item.contact_name }}</view>
|
|
|
|
<view class="text">联系人 {{ item.contact_name?item.contact_name:'' }}</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="sex">
|
|
|
|
<view class="sex">
|
|
|
|
@ -93,6 +113,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
<u-loadmore :status="status" :load-text='loadText' @loadmore='select.page++,getList()' />
|
|
|
|
<u-loadmore :status="status" :load-text='loadText' @loadmore='select.page++,getList()' />
|
|
|
|
<u-back-top :scroll-top="scrollTop"></u-back-top>
|
|
|
|
<u-back-top :scroll-top="scrollTop"></u-back-top>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 附近客户 悬浮按钮 -->
|
|
|
|
|
|
|
|
<view class="nearby-fab" @click="fetchNearby">
|
|
|
|
|
|
|
|
<text class="nearby-fab-text">附近客户</text>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
@ -104,10 +129,20 @@ export default {
|
|
|
|
scrollTop: 0,
|
|
|
|
scrollTop: 0,
|
|
|
|
isShowCalendar: false,
|
|
|
|
isShowCalendar: false,
|
|
|
|
inputStyle: {
|
|
|
|
inputStyle: {
|
|
|
|
width: "600rpx",
|
|
|
|
width: "100%",
|
|
|
|
fontSize: "28rpx",
|
|
|
|
fontSize: "28rpx",
|
|
|
|
fontWeight: "500"
|
|
|
|
fontWeight: "500"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
callbackDropdownOptions: [
|
|
|
|
|
|
|
|
{ label: '全部', value: 'all' },
|
|
|
|
|
|
|
|
{ label: '无回访', value: 0 },
|
|
|
|
|
|
|
|
{ label: '有回访', value: 1 },
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
deadDropdownOptions: [
|
|
|
|
|
|
|
|
{ label: '全部', value: 'all' },
|
|
|
|
|
|
|
|
{ label: '正常', value: 0 },
|
|
|
|
|
|
|
|
{ label: '死亡', value: 1 },
|
|
|
|
|
|
|
|
],
|
|
|
|
optionsStatus: [{
|
|
|
|
optionsStatus: [{
|
|
|
|
label: '全部',
|
|
|
|
label: '全部',
|
|
|
|
value: ''
|
|
|
|
value: ''
|
|
|
|
@ -151,7 +186,12 @@ export default {
|
|
|
|
select: {
|
|
|
|
select: {
|
|
|
|
page_size: 10,
|
|
|
|
page_size: 10,
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
keyword: ''
|
|
|
|
keyword: '',
|
|
|
|
|
|
|
|
village_name: '',
|
|
|
|
|
|
|
|
has_quality_callbacks: 'all',
|
|
|
|
|
|
|
|
is_dead: 'all',
|
|
|
|
|
|
|
|
lat: '',
|
|
|
|
|
|
|
|
lng: ''
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -161,7 +201,12 @@ export default {
|
|
|
|
this.select = {
|
|
|
|
this.select = {
|
|
|
|
page_size: 10,
|
|
|
|
page_size: 10,
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
keyword: ''
|
|
|
|
keyword: '',
|
|
|
|
|
|
|
|
village_name: '',
|
|
|
|
|
|
|
|
has_quality_callbacks: 'all',
|
|
|
|
|
|
|
|
is_dead: 'all',
|
|
|
|
|
|
|
|
lat: '',
|
|
|
|
|
|
|
|
lng: ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.nursingList = []
|
|
|
|
this.nursingList = []
|
|
|
|
this.getList()
|
|
|
|
this.getList()
|
|
|
|
@ -175,8 +220,37 @@ export default {
|
|
|
|
this.select.page = 1
|
|
|
|
this.select.page = 1
|
|
|
|
this.$u.debounce(this.getList, 1000)
|
|
|
|
this.$u.debounce(this.getList, 1000)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
villageInput(e) {
|
|
|
|
|
|
|
|
this.select.village_name = e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.nursingList = []
|
|
|
|
|
|
|
|
this.select.page = 1
|
|
|
|
|
|
|
|
this.$u.debounce(this.getList, 1000)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async fetchNearby() {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const res = await uni.getLocation({ type: 'gcj02', isHighAccuracy: true })
|
|
|
|
|
|
|
|
// uni.getLocation Promise 风格返回 [err, data]
|
|
|
|
|
|
|
|
const location = Array.isArray(res) ? res[1] : res
|
|
|
|
|
|
|
|
if (location && location.latitude && location.longitude) {
|
|
|
|
|
|
|
|
this.select.lat = location.latitude
|
|
|
|
|
|
|
|
this.select.lng = location.longitude
|
|
|
|
|
|
|
|
this.nursingList = []
|
|
|
|
|
|
|
|
this.select.page = 1
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
uni.showToast({ icon: 'none', title: '定位失败,请稍后重试' })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
uni.showToast({ icon: 'none', title: '未能获取定位权限' })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
async getList() {
|
|
|
|
async getList() {
|
|
|
|
const response = await this.$u.api.adminCustomerList(this.select)
|
|
|
|
const params = { ...this.select }
|
|
|
|
|
|
|
|
if (params.has_quality_callbacks === 'all') params.has_quality_callbacks = ''
|
|
|
|
|
|
|
|
if (params.is_dead === 'all') params.is_dead = ''
|
|
|
|
|
|
|
|
const response = await this.$u.api.adminCustomerList(params)
|
|
|
|
console.log("response",response)
|
|
|
|
console.log("response",response)
|
|
|
|
let res = response.data
|
|
|
|
let res = response.data
|
|
|
|
if (res.data.length > 0 && res.data) {
|
|
|
|
if (res.data.length > 0 && res.data) {
|
|
|
|
@ -221,6 +295,16 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
|
|
|
|
'select.has_quality_callbacks'(val) {
|
|
|
|
|
|
|
|
this.nursingList = []
|
|
|
|
|
|
|
|
this.select.page = 1
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
'select.is_dead'(val) {
|
|
|
|
|
|
|
|
this.nursingList = []
|
|
|
|
|
|
|
|
this.select.page = 1
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onReachBottom() {
|
|
|
|
onReachBottom() {
|
|
|
|
this.select.page++
|
|
|
|
this.select.page++
|
|
|
|
@ -241,11 +325,11 @@ export default {
|
|
|
|
<style scoped lang="scss">
|
|
|
|
<style scoped lang="scss">
|
|
|
|
//下拉自定义
|
|
|
|
//下拉自定义
|
|
|
|
/deep/.u-dropdown__menu {
|
|
|
|
/deep/.u-dropdown__menu {
|
|
|
|
justify-content: space-evenly !important;
|
|
|
|
justify-content: space-between !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/deep/.u-dropdown__menu__item {
|
|
|
|
/deep/.u-dropdown__menu__item {
|
|
|
|
width: 224rpx !important;
|
|
|
|
width: 340rpx !important; // 与上方输入框一致
|
|
|
|
flex: none !important;
|
|
|
|
flex: none !important;
|
|
|
|
height: 70rpx;
|
|
|
|
height: 70rpx;
|
|
|
|
background: #FFFFFF;
|
|
|
|
background: #FFFFFF;
|
|
|
|
@ -305,6 +389,18 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.search-row {
|
|
|
|
|
|
|
|
width: 710rpx;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
margin: 24rpx 24rpx 0 24rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.search.small {
|
|
|
|
|
|
|
|
width: 340rpx;
|
|
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.drop-down {
|
|
|
|
.drop-down {
|
|
|
|
margin-top: 20rpx;
|
|
|
|
margin-top: 20rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -505,4 +601,25 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.nearby-fab {
|
|
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
|
|
right: 32rpx;
|
|
|
|
|
|
|
|
bottom: 120rpx;
|
|
|
|
|
|
|
|
width: 140rpx;
|
|
|
|
|
|
|
|
height: 140rpx;
|
|
|
|
|
|
|
|
background: #1479FF;
|
|
|
|
|
|
|
|
color: #FFFFFF;
|
|
|
|
|
|
|
|
border-radius: 70rpx;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
box-shadow: 0 6rpx 20rpx rgba(20, 121, 255, 0.35);
|
|
|
|
|
|
|
|
z-index: 9;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.nearby-fab-text {
|
|
|
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|