|
- <template>
- <view class="box">
- <view style="width: 690rpx;margin: 0 auto;margin-top: 20rpx;">
- <u-search @search='searchinfo()' placeholder="请输入" v-model="keyword"></u-search>
- </view>
- <!-- <view @click="searchinfo()">搜索</view> -->
- <view class="content">
-
- <view class="content-tips" v-for="(item,index) in recordList" :key='index' @click="tapThevisiting(item)">
- <view class="content-first">
- <view class="left">
- <!-- <view class="img">{{item.agentName.slice(0,1)}}</view> -->
- <view class="name">{{item.agentName}}</view>
- <view class="status" v-if="item.replace==1">代接待</view>
- </view>
- <!-- <view class="right">
- <view class="point"></view>
- <view class="">优秀案例</view>
- </view> -->
- </view>
- <view class="content-sec">
- <view class="left">
- <view class="cus">客户:{{item.name || '--'}} |</view>
- <view class="arriveNum">{{item.visitRecord || "0"}}次到访</view>
- </view>
- <view class="right">
- {{item.fraction || '0'}}% | {{item.fraction || '0'}}分
- </view>
- </view>
- <view class="content-last">
- {{item.createTime}} | {{item.mm || '0'}}分钟
- </view>
- </view>
- </view>
- </view>
- </template>
-
- <script>
- export default{
- data(){
- return{
- keyword:'',
- recordList:[],
- buildingID:'',
- nextPage:1,
- totalRecord:"",
- }
- },
- onShow() {
- this.buildingID = uni.getStorageSync('buildingID').id;
- },
- onReachBottom() {
- if(this.totalRecord==this.nextPage){
- uni.showToast({
- icon:'none',
- title: '到底了',
- duration: 2000
- });
- return
- }else{
- this.nextPage+=1;
- this.getMyCustom();
- }
- },
- methods:{
- tapThevisiting(item) {
- if(item.status==0){
- uni.showToast({
- icon: "none",
- title: "排队中"
- })
- return
- }else{
- const parames = {
- pageNum: 1,
- pageSize: 100,
- query: {
- customerId: item.id,
- }
- }
- var item={
- bg:0,
- customerId:item.id,
- }
- this.$u.post("/corpus/findByPage", parames).then(res => {
- if(res==null){
- uni.showToast({
- icon: "none",
- title: "暂无音频"
- })
- return
- }else{
- let newobj = res[0];
- if(res[0].merge==0){
- uni.navigateTo({
- url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"2"}`
- })
- }else{
- uni.navigateTo({
- url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"1"}`
- })
- }
- }
- })
- }
-
- },
- searchinfo(){
- this.nextPage=1;
- this.recordList=[];
- this.getMyCustom();
- },
- getMyCustom(){
- var parames = {
- pageNum: this.nextPage,
- pageSize: 10,
- query: {
- projectId:this.buildingID,
- time:1,
- nameOrPhone:this.keyword
- }
- };
- this.$u.post("/customer/findbypage", parames).then(data => {
- var list = data.results || [];
- this.recordList = [...this.recordList, ...list];
- this.totalRecord=data.totalPage;
- })
- },
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .box {
- width: 100%;
- height: 100vh;
- background: #F8F8F8;
- }
- .content{
- .content-tips{
- background: #fff;
- padding: 0 20rpx;
- box-sizing: border-box;
- overflow: hidden;
- margin-top: 20rpx;
- .content-first{
- margin-top: 19rpx;
- display: flex;
- justify-content: space-between;
- .left{
- display: flex;
- .img{
- width: 52rpx;
- height: 52rpx;
- background: #FFFFFF;
- border: 1px solid #C9C9C9;
- border-radius: 50%;
- text-align: center;
- line-height: 52rpx;
- }
- .name{
- font-weight: 600;
- color: #333333;
- // margin-left: 20rpx;
- margin-top: 11rpx;
- }
- .status{
- width: 110rpx;
- height: 42rpx;
- background: #FFF9F5;
- border-radius: 4rpx;
- font-size: 26rpx;
- font-weight: 400;
- color: #EC8D49;
- line-height: 42rpx;
- text-align: center;
- margin-left: 19rpx;
- margin-top: 11rpx;
- }
- }
- .right{
- display: flex;
- margin-top: 11rpx;
- .point{
- width: 12rpx;
- height: 12rpx;
- background: #2B6EFF;
- border-radius: 50%;
- margin-right: 9rpx;
- margin-top: 16rpx;
-
- }
- }
- }
-
-
- .content-sec{
- display: flex;
- justify-content: space-between;
- margin-top: 19rpx;
- .left{
- display: flex;
- .cus{
- font-size: 30rpx;
- font-weight: 400;
- color: #666666;
- line-height: 30rpx;
- }
- .arriveNum{
- font-size: 30rpx;
- font-weight: 400;
- line-height: 30rpx;
- margin-left: 10rpx;
- }
- }
- .right{
- width: 192rpx;
- height: 46rpx;
- background: #F4F8FD;
- border-radius: 6rpx;
- text-align: center;
- line-height: 46rpx;
- font-weight: 400;
- color: #2671E2;
- }
- }
- .content-last{
- margin: 30rpx 0;
- font-size: 30rpx;
- font-weight: 400;
- color: #666666;
- line-height: 30rpx;
- }
-
- }
- }
- </style>
|