From 47e11b50d01c1af68cae2b3724b91be205f00cd6 Mon Sep 17 00:00:00 2001 From: wangxiaohua <1214073490@qq.com> Date: Tue, 24 Aug 2021 15:01:52 +0800 Subject: [PATCH] init --- pages.json | 9 + pages/center/consumer/consumerDetail.vue | 289 ++++++++++++++++-- pages/center/consumer/index.vue | 14 +- .../consumer/newFollowup/newFollowup.vue | 5 +- pages/index/index.vue | 6 +- pages/mine/ScoringPlaylist.vue | 99 ++++++ 6 files changed, 391 insertions(+), 31 deletions(-) create mode 100644 pages/mine/ScoringPlaylist.vue diff --git a/pages.json b/pages.json index 653dfc4..a59c62a 100644 --- a/pages.json +++ b/pages.json @@ -112,6 +112,15 @@ "navigationBarTextStyle": "black" } }, + { + "path": "ScoringPlaylist", + "style": { + "navigationBarTitleText": "匹配标签", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black" + } + }, + { "path": "Myprofile", "style": { diff --git a/pages/center/consumer/consumerDetail.vue b/pages/center/consumer/consumerDetail.vue index 4e24041..9d17cab 100644 --- a/pages/center/consumer/consumerDetail.vue +++ b/pages/center/consumer/consumerDetail.vue @@ -58,11 +58,11 @@ - + {{item.agentName.slice(0,1) || '--'}} - {{item.agentName || ''}} + {{item.agentName || '--'}} 代接待 - - - - - - 宋幸运 - - 2021-07-20 16:00:30 + + + + + + 总执行率 {{totalRate}}% + + + + {{item.name}} + + + - 有意向,想要更多优惠 + {{((item.ratepercent/item.rate).toFixed(2)*100).toFixed()}}% + + - - 编辑记录 + + + + {{subitem.name}} + + + - 执行率 添加提醒 - 写跟进 + 写跟进 @@ -138,7 +150,10 @@ createTime:'', agentName:'' }, - Thevisitingrecords:[] + Thevisitingrecords:[], + totalRate:[], + ratelist:[], + fllowList:[], } }, onLoad(options) { @@ -171,8 +186,63 @@ this.activeTotal=idx if(idx==0){ this.getVisitList() + }else if(idx==1){ + this.getFollowList() + }else{ + this.getRatelist() + } + }, + tapThevisiting(item) { + if(item.yon!=0){ + uni.showToast({ + icon:'none', + title: '暂无录音', + duration: 2000 + }); + return + }else{ + const parames = { + pageNum: 1, + pageSize: 100, + query: { + customerId: item.id, + } + } + var item={ + bg:0, + customerId:item.id, + id:'' + } + this.$u.post("/corpus/findByPage", parames).then(res => { + if(res[0].recordDuration>360){ + let newobj = res[0]; + uni.navigateTo({ + url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"2"}` + }) + }else{ + let newobj = res[0]; + uni.navigateTo({ + url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"1"}` + }) + } + }) } }, + // 获取跟进记录 + getFollowList() { + this.fllowList=[]; + this.$u.post("/customer/getCusStage", { + customerId: this.customerId + }).then(res => { + this.fllowList = res; + }) + }, + // 新增跟进 + followRecordAdd() { + uni.navigateTo({ + url: `/pages/center/consumer/newFollowup/newFollowup?id=${this.customerId}` + }) + }, // 去编辑 goedit(){ // console.log('去编辑') @@ -186,6 +256,69 @@ url:'/pages/center/consumer/remind' }) }, + //评分点击 + clickaudeopal(item){ + if(item.selected==0){ + uni.navigateTo({ + url: '/pages/mine/ScoringPlaylist?customerId='+this.customerId +"&id="+item.marketingId + }) + } + }, + changeshow(item, type) { + if (type == 1) { + item.show = true + } else { + item.show = false + } + }, + // 获取评分 + getRatelist() { + this.$u.get("/customer/findzkMByCusId", { + cusId: this.customerId + }).then(res => { + if (res.length) { + let level1 = [] + let level2rate = 0 + res.forEach(item => { + if (item.pid == 0) { + level1.push({ + id: item.marketingId, + rate: item.fraction, + name: item.name, + sort: item.sort, + show: false, + ratepercent: 0, + children: [] + }) + } else { + if (item.selected == 0) { + level2rate += item.fraction + } + } + }) + this.totalRate = level2rate + res.forEach(subitem => { + let subitempid = subitem.pid + level1.forEach(item => { + if (subitempid == item.id) { + if (subitem.selected == 0) { + item.ratepercent += subitem.fraction + } + item.children.push({ + id: subitem.id, + rate: subitem.fraction, + selected: subitem.selected, + name: subitem.name, + marketingId:subitem.marketingId + }) + } + }) + }) + level1[0].show = true; + this.ratelist = level1 + } + }) + }, } } @@ -196,6 +329,116 @@ height: 100%; background: #F8F8F8; } + // 评分 + .rate-box { + padding: 10rpx 20rpx; + background-color: #FFFFFF; + .date { + width: 300rpx; + height: 33rpx; + font-size: 24rpx; + font-weight: 400; + color: #333333; + line-height: 33rpx; + letter-spacing: 1rpx; + margin-bottom: 8rpx; + } + + .title { + width: 100%; + height: 42rpx; + font-size: 30rpx; + font-weight: 500; + color: #333333; + line-height: 42rpx; + letter-spacing: 2rpx; + margin-bottom: 20rpx; + } + + .level1 { + display: flex; + align-items: center; + + .level-name { + width: 104rpx; + height: 33rpx; + font-size: 24rpx; + font-weight: 500; + color: #333333; + line-height: 33rpx; + letter-spacing: 1rpx; + margin-right: 10rpx; + } + + .level-progress { + flex: 1; + border-radius: 11rpx; + height: 21rpx; + background-color: #BEE4FF; + position: relative; + + .color { + width: 0; + position: absolute; + top: 0; + left: 0; + height: 21rpx; + border-radius: 11rpx 0 0 11rpx; + background-color: #008EF2; + } + } + + .level-rate { + width: 65rpx; + height: 33rpx; + font-size: 24rpx; + font-weight: 500; + color: #333333; + line-height: 33rpx; + letter-spacing: 1rpx; + margin: 0 20rpx 0 15rpx; + } + + .arrow { + width: 37rpx; + height: 21rpx; + padding: 5rpx 20rpx; + } + + .rotatearrow { + transform: rotate(270deg); + } + } + + .level1-subbox { + display: flex; + margin-top: 20rpx; + flex-wrap: wrap; + + .sub-name { + width: 50%; + display: flex; + margin-bottom: 18rpx; + + .subitem-name { + width: 104rpx; + height: 33rpx; + font-size: 24rpx; + font-weight: 400; + color: #999999; + line-height: 33rpx; + letter-spacing: 1rpx; + margin-right: 12rpx; + } + + .checkimg { + width: 27rpx; + height: 27rpx; + } + + } + } + } .tab{ height: 88rpx; border-bottom: 1px solid #E0E0E0; diff --git a/pages/center/consumer/index.vue b/pages/center/consumer/index.vue index 03b2084..7674b97 100644 --- a/pages/center/consumer/index.vue +++ b/pages/center/consumer/index.vue @@ -47,7 +47,7 @@ {{item.fraction || '0'}}% | {{item.fraction || '0'}}分 - + 写跟进 @@ -165,7 +165,8 @@ recordList:[], nextPage:1, totalRecord:'', - freeList:[] + freeList:[], + userInfo:{} } }, onShow() { @@ -223,9 +224,16 @@ }else{ parames.query.levels='' } - + this.userInfo = uni.getStorageSync('weapp_session_userInfo_data'); this.$u.post("/customer/customerManagement", parames).then(data => { var list = data.results || []; + list.forEach(item=>{ + if(this.userInfo.dataCode == 6){ + item.isshow=true; + }else{ + item.isshow=false; + } + }) this.recordList = [...this.recordList, ...list]; this.totalRecord=data.totalPage; }) diff --git a/pages/center/consumer/newFollowup/newFollowup.vue b/pages/center/consumer/newFollowup/newFollowup.vue index 80b63e7..e89408a 100644 --- a/pages/center/consumer/newFollowup/newFollowup.vue +++ b/pages/center/consumer/newFollowup/newFollowup.vue @@ -127,7 +127,6 @@ } this.$u.post('/customer/getStage',premo) .then(res=>{ - // console.log(res) this.stateList=res }) @@ -181,7 +180,7 @@ } this.$u.post('/customer/addZkDailyWorkRecord',param) .then(res=>{ - util.showSuccess("提交成功"); + // util.showSuccess("提交成功"); uni.hideLoading(); uni.navigateBack(); }) @@ -274,7 +273,7 @@ height: 88rpx; display: flex; width: 100%; - margin-top: 300rpx; + margin-top: 160rpx; .screen-foot-reset{ width: 80%; diff --git a/pages/index/index.vue b/pages/index/index.vue index 300e76b..fdf1f96 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -183,6 +183,7 @@ +