This commit is contained in:
yyy 2024-12-04 16:48:13 +08:00
parent 5b0bbd53c6
commit ad21ea3496
6 changed files with 349 additions and 311 deletions

View File

@ -1,18 +1,20 @@
<template> <template>
<uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1"> <uv-sticky>
<template v-slot:left> <uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1">
<uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon> <template v-slot:left>
</template> <uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon>
<template v-slot:center> </template>
<text style="color:#ffffff">{{title}}</text> <template v-slot:center>
</template> <text style="color:#ffffff">{{title}}</text>
</uv-navbar> </template>
<view class="container"> </uv-navbar>
<view class="pb-2 flex px-5" style="background-color: #09b4f1;"> <view class="pb-2 flex px-5" style="background-color: #09b4f1;">
<uv-search placeholder="搜索线索名称" v-model="keyword" bgColor="#ffffff" :customStyle="customStyle" <uv-search placeholder="搜索线索名称" v-model="keyword" bgColor="#ffffff" :customStyle="customStyle"
:show-action="false" @change="onSearch"></uv-search> :show-action="false" @change="onSearch"></uv-search>
<uv-icon name="/static/images/screen.png" :size="26" @click="openSearch"></uv-icon> <uv-icon name="/static/images/screen.png" :size="26" @click="openSearch"></uv-icon>
</view> </view>
</uv-sticky>
<view class="container">
<view class="bg-white"> <view class="bg-white">
<uv-tabs :list="list" @click="handleSelect" :scrollable="false"></uv-tabs> <uv-tabs :list="list" @click="handleSelect" :scrollable="false"></uv-tabs>
</view> </view>
@ -328,7 +330,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container { .container {
background-color: #F7F7F7; background-color: #F7F7F7;
} }

View File

@ -1,18 +1,20 @@
<template> <template>
<uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1"> <uv-sticky>
<template v-slot:left> <uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1">
<uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon> <template v-slot:left>
</template> <uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon>
<template v-slot:center> </template>
<text style="color:#ffffff">{{title}}</text> <template v-slot:center>
</template> <text style="color:#ffffff">{{title}}</text>
</uv-navbar> </template>
<view class="container"> </uv-navbar>
<view class="pb-2 flex px-5" style="background-color: #09b4f1;"> <view class="pb-2 flex px-5" style="background-color: #09b4f1;">
<uv-search placeholder="搜索联系人姓名" v-model="keyword" bgColor="#ffffff" :customStyle="customStyle" <uv-search placeholder="搜索联系人姓名" v-model="keyword" bgColor="#ffffff" :customStyle="customStyle"
:show-action="false" @change="onSearch"></uv-search> :show-action="false" @change="onSearch"></uv-search>
<uv-icon name="/static/images/screen.png" :size="26" @click="openSearch"></uv-icon> <uv-icon name="/static/images/screen.png" :size="26" @click="openSearch"></uv-icon>
</view> </view>
</uv-sticky>
<view class="container">
<view class="bg-white"> <view class="bg-white">
<uv-tabs :list="list" @click="handleSelect" :scrollable="false"></uv-tabs> <uv-tabs :list="list" @click="handleSelect" :scrollable="false"></uv-tabs>
</view> </view>

View File

@ -1,18 +1,19 @@
<template> <template>
<uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1"> <uv-sticky>
<template v-slot:left> <uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1">
<uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon> <template v-slot:left>
</template> <uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon>
<template v-slot:center> </template>
<text style="color:#ffffff">{{title}}</text> <template v-slot:center>
</template> <text style="color:#ffffff">{{title}}</text>
</uv-navbar> </template>
<view class="container"> </uv-navbar>
<view class="pb-2 flex px-5" style="background-color: #09b4f1;"> <view class="pb-2 flex px-5" style="background-color: #09b4f1;">
<uv-search placeholder="搜索合同名称" v-model="keyword" bgColor="#ffffff" :customStyle="customStyle" <uv-search placeholder="搜索合同名称" v-model="keyword" bgColor="#ffffff" :customStyle="customStyle"
:show-action="false" @change="onSearch"></uv-search> :show-action="false" @change="onSearch"></uv-search>
<!-- <uv-icon name="/static/images/screen.png" :size="26" @click="openSearch"></uv-icon> -->
</view> </view>
</uv-sticky>
<view class="container">
<view class="wrap"> <view class="wrap">
<uv-tabs :list="list" @click="handleSelect" :scrollable="false"></uv-tabs> <uv-tabs :list="list" @click="handleSelect" :scrollable="false"></uv-tabs>
<scroll-view scroll-y class="sv" :style="{height:scrollHeight+'px'}" :scroll-top="scrollTop" @scroll="scroll" <scroll-view scroll-y class="sv" :style="{height:scrollHeight+'px'}" :scroll-top="scrollTop" @scroll="scroll"

View File

@ -1,18 +1,20 @@
<template> <template>
<uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1"> <uv-sticky>
<template v-slot:left> <uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1">
<uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon> <template v-slot:left>
</template> <uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon>
<template v-slot:center> </template>
<text style="color:#ffffff">{{title}}</text> <template v-slot:center>
</template> <text style="color:#ffffff">{{title}}</text>
</uv-navbar> </template>
<view class="container"> </uv-navbar>
<view class="pb-2 flex px-5" style="background-color: #09b4f1;"> <view class="pb-2 flex px-5" style="background-color: #09b4f1;">
<uv-search placeholder="搜索客户名称" v-model="keyword" bgColor="#ffffff" :customStyle="customStyle" <uv-search placeholder="搜索客户名称" v-model="keyword" bgColor="#ffffff" :customStyle="customStyle"
:show-action="false" @change="onSearch"></uv-search> :show-action="false" @change="onSearch"></uv-search>
<uv-icon name="/static/images/screen.png" :size="26" @click="openSearch"></uv-icon> <uv-icon name="/static/images/screen.png" :size="26" @click="openSearch"></uv-icon>
</view> </view>
</uv-sticky>
<view class="container">
<view class="wrap"> <view class="wrap">
<scroll-view scroll-y class="sv" :style="{height:scrollHeight+'px'}" :scroll-top="scrollTop" lower-threshold="20" <scroll-view scroll-y class="sv" :style="{height:scrollHeight+'px'}" :scroll-top="scrollTop" lower-threshold="20"
@scroll="scroll" @scrolltolower="reachBottom"> @scroll="scroll" @scrolltolower="reachBottom">

View File

@ -1,31 +1,31 @@
<template> <template>
<uv-navbar <uv-sticky>
:fixed="false" <uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1">
@leftClick="$onClickLeft" <template v-slot:left>
bgColor="#09b4f1" <uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon>
> </template>
<template v-slot:left> <template v-slot:center>
<uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon> <text style="color:#ffffff">{{title}}</text>
</template> </template>
<template v-slot:center> </uv-navbar>
<text style="color:#ffffff">{{title}}</text> <view class="bg-white">
</template>
</uv-navbar>
<view class="container" >
<view class="bg-white">
<uv-tabs :list="list" @click="handleSelect" :scrollable="false"></uv-tabs> <uv-tabs :list="list" @click="handleSelect" :scrollable="false"></uv-tabs>
</view> </view>
</uv-sticky>
<view class="container">
<view class="wrap"> <view class="wrap">
<scroll-view scroll-y class="sv" :style="{height:scrollHeight+'px'}" :scroll-top="scrollTop" lower-threshold="20" @scroll="scroll" @scrolltolower="reachBottom"> <scroll-view scroll-y class="sv" :style="{height:scrollHeight+'px'}" :scroll-top="scrollTop" lower-threshold="20"
@scroll="scroll" @scrolltolower="reachBottom">
<view class="page-box" @touchmove="handletouchstart" @touchend="handletouchend"> <view class="page-box" @touchmove="handletouchstart" @touchend="handletouchend">
<block v-if="dataList.length > 0"> <block v-if="dataList.length > 0">
<view class="client" v-for="(items, index) in dataList" :key="index"> <view class="client" v-for="(items, index) in dataList" :key="index">
<view class="top"> <view class="top">
<view class="left"> <view class="left">
<view class="store uv-line-1"> <view class="store uv-line-1">
<uv-text v-if="items.types == 'customer'" type="success" :text="'关联客户:'+items.typesName"></uv-text> <uv-text v-if="items.types == 'customer'" type="success" :text="'关联客户:'+items.typesName"></uv-text>
<uv-text v-else-if="items.types == 'clues'" type="warning" :text="'关联线索:'+items.typesName"></uv-text> <uv-text v-else-if="items.types == 'clues'" type="warning"
<uv-text v-else type="error" :text="'关联商机:'+items.typesName"></uv-text> :text="'关联线索:'+items.typesName"></uv-text>
<uv-text v-else type="error" :text="'关联商机:'+items.typesName"></uv-text>
</view> </view>
</view> </view>
</view> </view>
@ -34,276 +34,308 @@
{{items.content}} {{items.content}}
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="client_time" >下次跟进{{timeFormats(items.nextTime)}}</view> <view class="client_time">下次跟进{{timeFormats(items.nextTime)}}</view>
<view class="flex"> <view class="flex">
<view>{{items.ownUserName}}</view> <view>{{items.ownUserName}}</view>
</view> </view>
</view> </view>
</view> </view>
<uv-load-more :status="listStatus" /> <uv-load-more :status="listStatus" />
</block> </block>
<uv-empty text="暂无数据" v-else margin-top="100" mode="list"></uv-empty> <uv-empty text="暂无数据" v-else margin-top="100" mode="list"></uv-empty>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import {
ref, ref,
computed computed
} from 'vue' } from 'vue'
import { onLoad,onShow ,onReady} from '@dcloudio/uni-app' import {
import { onLoad,
getRecordPage onShow,
} from '@/api/customer' onReady
import { formatDateTime } from '@/utils/util' } from '@dcloudio/uni-app'
const title = ref('跟进记录') import {
const keyword = ref('') getRecordPage
const mobile = ref('') } from '@/api/customer'
const phone = ref('') import {
const dealStatus = ref(-1) formatDateTime
const dealStatusName = ref('') } from '@/utils/util'
const scrollHeight = ref(0) const title = ref('跟进记录')
const pH = ref(0) const keyword = ref('')
const scrollTop = ref(-1) const mobile = ref('')
const specClass = ref('hide') const phone = ref('')
const oldScrollTop = ref(0) const dealStatus = ref(-1)
const dataList = ref([]) const dealStatusName = ref('')
const dx = ref(0) const scrollHeight = ref(0)
const page = ref(1) const pH = ref(0)
const pageSize = ref(10) const scrollTop = ref(-1)
const lastPage = ref(false) const specClass = ref('hide')
const listStatus = ref('loadmore') const oldScrollTop = ref(0)
const isRefresh = ref(false) const dataList = ref([])
const relation = ref('my') const dx = ref(0)
const list = ref( const page = ref(1)
[{ const pageSize = ref(10)
name: '我的记录', const lastPage = ref(false)
value: 'my' const listStatus = ref('loadmore')
}, { const isRefresh = ref(false)
name: '下属记录', const relation = ref('my')
value: 'sub' const list = ref(
}] [{
) name: '我的记录',
const actions = ref( value: 'my'
[{ }, {
name: '未成交', name: '下属记录',
value:0 value: 'sub'
}, { }]
name: '成交', )
value:1 const actions = ref(
} ] [{
) name: '未成交',
value: 0
defineExpose({isRefresh}) }, {
name: '成交',
const customStyle = computed(() =>{ value: 1
return { }]
paddingLeft:'10rpx', )
paddingRight:'120rpx'
} const handleSelect = (key) => {
}) if (key.value !== relation.value) {
const statusBarHeight = ref(0) page.value = 1
statusBarHeight.value = uni.getSystemInfoSync().statusBarHeight lastPage.value = false
const customStyle2 = computed(() =>{ scrollTop.value = 0
return { dataList.value = []
marginTop:(uni.getSystemInfoSync().statusBarHeight+40)+'px', getRecordList()
backgroundColor:'#ffffff' }
//top:'100px' }
}
}) defineExpose({
const popup = ref() isRefresh
})
onReady(()=>{
uni.getSystemInfo({ const customStyle = computed(() => {
success(res) { return {
pH.value = res.windowHeight paddingLeft: '10rpx',
let scrollH = uni.createSelectorQuery().select(".sv") paddingRight: '120rpx'
scrollH.boundingClientRect(data=>{
let pH0 = pH.value
scrollHeight.value = pH0 - data.top - 5
}).exec()
} }
}) })
}) const statusBarHeight = ref(0)
statusBarHeight.value = uni.getSystemInfoSync().statusBarHeight
onLoad((e) => { const customStyle2 = computed(() => {
getRecordList(); return {
}) marginTop: (uni.getSystemInfoSync().statusBarHeight + 40) + 'px',
backgroundColor: '#ffffff'
onShow(()=>{ //top:'100px'
if (isRefresh.value) {
isRefresh.value = false
page.value = 1
lastPage.value = false
scrollTop.value = 0
dataList.value = []
getRecordList()
}
})
const handletouchstart = () => {
specClass.value = 'show'
}
const handletouchend = () => {
specClass.value = 'hide'
}
//
const timeFormats = (val) => {
if(val){
return formatDateTime(val)
} else {
return '--'
}
}
//
const getRecordList = async(isNextPage,pages) => {
await getRecordPage({
pageNo: page.value,
pageSize: pageSize.value,
relation: relation.value,
}).then(res => {
if(res) {
//
if (res.list.length < 10) {
listStatus.value = 'nomore'
}
//
if(res.list.length == 0) {
lastPage.value = true
}
//
if(isNextPage) {
dataList.value = dataList.value.concat(res.list)
return
}
dataList.value = res.list
} }
}) })
} const popup = ref()
// scroll
const scroll = (e) => { onReady(() => {
oldScrollTop.value = e.detail.scrollTop; // uni.getSystemInfo({
} success(res) {
// pH.value = res.windowHeight
const reachBottom = () => { let scrollH = uni.createSelectorQuery().select(".sv")
if(lastPage.value || listStatus.value == 'loading') return ; scrollH.boundingClientRect(data => {
if (!lastPage.value) { let pH0 = pH.value
listStatus.value = 'loading'; scrollHeight.value = pH0 - data.top - 5
setTimeout(() => { }).exec()
listStatus.value = 'loadmore' }
getRecordList(true,++page.value) })
}, 500) })
onLoad((e) => {
getRecordList();
})
onShow(() => {
if (isRefresh.value) {
isRefresh.value = false
page.value = 1
lastPage.value = false
scrollTop.value = 0
dataList.value = []
getRecordList()
}
})
const handletouchstart = () => {
specClass.value = 'show'
}
const handletouchend = () => {
specClass.value = 'hide'
} }
}
//
const timeFormats = (val) => {
if (val) {
return formatDateTime(val)
} else {
return '--'
}
}
//
const getRecordList = async (isNextPage, pages) => {
await getRecordPage({
pageNo: page.value,
pageSize: pageSize.value,
relation: relation.value,
}).then(res => {
if (res) {
//
if (res.list.length < 10) {
listStatus.value = 'nomore'
}
//
if (res.list.length == 0) {
lastPage.value = true
}
//
if (isNextPage) {
dataList.value = dataList.value.concat(res.list)
return
}
dataList.value = res.list
}
})
}
// scroll
const scroll = (e) => {
oldScrollTop.value = e.detail.scrollTop; //
}
//
const reachBottom = () => {
if (lastPage.value || listStatus.value == 'loading') return;
if (!lastPage.value) {
listStatus.value = 'loading';
setTimeout(() => {
listStatus.value = 'loadmore'
getRecordList(true, ++page.value)
}, 500)
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
.container { .container {
background-color: #F7F7F7; background-color: #F7F7F7;
} }
.page-box {
padding: 20rpx 20rpx 45rpx; .page-box {
} padding: 20rpx 20rpx 45rpx;
.client { }
width: 710rpx;
background-color: #ffffff; .client {
margin-bottom: 20rpx; width: 710rpx;
border-radius: 20rpx; background-color: #ffffff;
box-sizing: border-box; margin-bottom: 20rpx;
padding: 20rpx; border-radius: 20rpx;
font-size: 28rpx; box-sizing: border-box;
.top { padding: 20rpx;
display: flex; font-size: 28rpx;
justify-content: space-between;
.left { .top {
display: flex;
justify-content: space-between;
.left {
display: flex;
align-items: center;
.store {
max-width: 400rpx;
font-size: 30rpx;
font-weight: bold;
}
}
}
.tap {
display: flex; display: flex;
align-items: center; align-items: center;
.store { flex-wrap: wrap;
max-width: 400rpx; margin: 20rpx 0 0;
font-size: 30rpx;
font-weight: bold;
}
}
}
.tap {
display: flex;
align-items: center;
flex-wrap: wrap;
margin: 20rpx 0 0;
.tap-item {
background-color: #FF6146;
color: #fff;
font-size: 25rpx;
padding: 10rpx 25rpx;
border-radius: 8rpx;
margin-left: 10rpx;
margin-bottom: 10rpx;
}
}
.item {
display: flex;
margin: 20rpx 0 0;
.content {
flex: 1;
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $uv-tips-color;
}
}
.right {
margin-left: 10rpx;
text-align: right;
.decimal {
font-size: 24rpx;
margin-top: 4rpx;
}
.number {
color: $uv-tips-color;
font-size: 24rpx;
}
}
}
.bottom {
display: flex;
margin-top: 20rpx;
justify-content: space-between;
align-items: center;
.client_time {
color: #777;
font-size: 26rpx;
}
.btn {
line-height: 60rpx;
width: 160rpx;
border-radius: 5px;
font-size: 26rpx;
text-align: center;
color: $uv-primary-dark;
}
.entity {
color: #fff;
background-color: #09b4f1;
}
}
}
.wrap {
display: flex;
flex-direction: column;
width: 100%;
}
.tap-item {
background-color: #FF6146;
color: #fff;
font-size: 25rpx;
padding: 10rpx 25rpx;
border-radius: 8rpx;
margin-left: 10rpx;
margin-bottom: 10rpx;
}
}
</style> .item {
display: flex;
margin: 20rpx 0 0;
.content {
flex: 1;
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $uv-tips-color;
}
}
.right {
margin-left: 10rpx;
text-align: right;
.decimal {
font-size: 24rpx;
margin-top: 4rpx;
}
.number {
color: $uv-tips-color;
font-size: 24rpx;
}
}
}
.bottom {
display: flex;
margin-top: 20rpx;
justify-content: space-between;
align-items: center;
.client_time {
color: #777;
font-size: 26rpx;
}
.btn {
line-height: 60rpx;
width: 160rpx;
border-radius: 5px;
font-size: 26rpx;
text-align: center;
color: $uv-primary-dark;
}
.entity {
color: #fff;
background-color: #09b4f1;
}
}
}
.wrap {
display: flex;
flex-direction: column;
width: 100%;
}
</style>

View File

@ -320,7 +320,9 @@
} }
const getData = async () => { const getData = async () => {
let data = await indexCount() let data = await indexCount({
relation: 'all'
})
let brieCount = data.brieCountVO let brieCount = data.brieCountVO
toolIcons3.value[0].count = brieCount.count01 toolIcons3.value[0].count = brieCount.count01
toolIcons3.value[1].count = brieCount.count02 toolIcons3.value[1].count = brieCount.count02
@ -345,8 +347,6 @@
text: count + '' text: count + ''
}) })
} }
} }
@ -364,7 +364,6 @@
uni.switchTab({ uni.switchTab({
url url
}) })
} }
</script> </script>