wangxiaohua 2 years ago
parent
commit
47e11b50d0
6 changed files with 391 additions and 31 deletions
  1. +9
    -0
      pages.json
  2. +266
    -23
      pages/center/consumer/consumerDetail.vue
  3. +11
    -3
      pages/center/consumer/index.vue
  4. +2
    -3
      pages/center/consumer/newFollowup/newFollowup.vue
  5. +4
    -2
      pages/index/index.vue
  6. +99
    -0
      pages/mine/ScoringPlaylist.vue

+ 9
- 0
pages.json View File

@@ -112,6 +112,15 @@
"navigationBarTextStyle": "black"
}
},
{
"path": "ScoringPlaylist",
"style": {
"navigationBarTitleText": "匹配标签",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
}
},
{
"path": "Myprofile",
"style": {


+ 266
- 23
pages/center/consumer/consumerDetail.vue View File

@@ -58,11 +58,11 @@
</view>
<view class="tabactive1" v-if="activeTotal==0">
<view class="content-tips" v-for="(item,index) in Thevisitingrecords" :key="index">
<view class="content-tips" v-for="(item,index) in Thevisitingrecords" :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="name">{{item.agentName || '--'}}</view>
<view class="status">代接待</view>
</view>
<!-- <view class="right">
@@ -83,45 +83,57 @@
</view>
</view>
<view class="tabactive2" v-if="activeTotal==1">
<view class="tab2-tips">
<view class="tab2-tips" v-for="(item,index) in fllowList" :key="index">
<view class="tab2-first">
<view class="tab2-first-1">
<view class="tab2-first-left">
<view class="img"></view>
<view class="name">宋幸运</view>
<view class="img">{{item.agentName.slice(0,1) || '--'}}</view>
<view class="name">{{item.agentName || '||'}}</view>
</view>
<view class="tab2-first-right">2021-07-20 16:00:30</view>
<view class="tab2-first-right">{{item.createTime}}</view>
</view>
<view class="tab2-first-foot">有意向,想要更多优惠</view>
<view class="tab2-first-foot">{{item.remarks || '--'}}</view>
</view>
<view class="tab2-sec">
<!-- <view class="tab2-sec">
<view class="tab-sec-edit">编辑记录</view>
</view>
</view> -->
</view>
<view class="tab2-tips">
<view class="tab2-first">
<view class="tab2-first-1">
<view class="tab2-first-left">
<view class="img">宋</view>
<view class="name">宋幸运</view>
</view>
<view class="tab2-first-right">2021-07-20 16:00:30</view>
</view>
<!-- <view class="tabactive" v-if="activeTotal==2">执行率</view> -->
<!-- 评分 -->
<view v-if="activeTotal==2" class="tabactive rate-box" >
<view class="title">总执行率 {{totalRate}}%</view>
<view v-for="(item,index) in ratelist" :key="index" class="u-m-b-14">
<view class="level1">
<view class="level-name u-line-1">
{{item.name}}
</view>
<view class="level-progress">
<view class="color" :style="{width: item.ratepercent/item.rate*100+'%'}"></view>
</view>
<view class="tab2-first-foot">有意向,想要更多优惠</view>
<view class="level-rate">{{((item.ratepercent/item.rate).toFixed(2)*100).toFixed()}}%</view>
<image v-if="!item.show" class="arrow rotatearrow" @click="changeshow(item,1)" src="/static/images/down.png"
mode="" />
<image v-else class="arrow" @click="changeshow(item,0)" src="/static/images/up.png" mode="" />
</view>
<view class="tab2-sec">
<view class="tab-sec-edit">编辑记录</view>
<view class="level1-subbox" v-if="item.show">
<view class="sub-name" v-for="(subitem,i) in item.children" :key="i">
<view class="subitem-name u-line-1" @tap="clickaudeopal(subitem)">{{subitem.name}}</view>
<image class="checkimg" v-if="!subitem.selected" src="/static/images/rate-checked.png" mode="" />
<image class="checkimg" v-else src="/static/images/rate-nocheck.png" mode="" />
</view>
</view>
</view>
</view>
<view class="tabactive" v-if="activeTotal==2">执行率</view>
</view>
<view class="pon-foot">
<view class="foot-tab" @click="goRemind">添加提醒</view>
<!-- <view class="foot-tab">拨打电话</view> -->
<view class="foot-tab">写跟进</view>
<view class="foot-tab" @click="followRecordAdd()">写跟进</view>
</view>
</view>
@@ -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
}
})
},
}
}
</script>
@@ -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;


+ 11
- 3
pages/center/consumer/index.vue View File

@@ -47,7 +47,7 @@
<view class="">{{item.fraction || '0'}}% | {{item.fraction || '0'}}分</view>
</view>
</view>
<view class="content-last">
<view class="content-last" v-if="item.isshow==true">
<!-- <view class="content-last-tab">添加提醒</view>
<view class="content-last-tab">拨打电话</view> -->
<view class="content-last-tab" @click.stop="gotoFollowUp(item.id)">写跟进</view>
@@ -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;
})


+ 2
- 3
pages/center/consumer/newFollowup/newFollowup.vue View File

@@ -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%;


+ 4
- 2
pages/index/index.vue View File

@@ -183,6 +183,7 @@
</template>

<script>
var util = require("../../utils/util.js");
var config = require("../../config");
export default {
data() {
@@ -275,7 +276,7 @@
sumCustomer: data.data.data.sumCustomer,
receivingCustomer: data.data.data.receivingCustomer,
activeCustomer: data.data.data.activeCustomer,
sumDuration: data.data.data.sumDuration,
sumDuration: util.formatSecond(data.data.data.sumDuration),
tagCustomer: data.data.data.tagCustomer,
fraction: data.data.data.fraction,
}
@@ -303,7 +304,7 @@
sumCustomer: data.data.data.sumCustomer,
receivingCustomer: data.data.data.receivingCustomer,
activeCustomer: data.data.data.activeCustomer,
sumDuration: data.data.data.sumDuration,
sumDuration: util.formatSecond(data.data.data.sumDuration),
tagCustomer: data.data.data.tagCustomer,
fraction: data.data.data.fraction,
}
@@ -311,6 +312,7 @@
}
})
},
//设备
initequipment() {
uni.request({


+ 99
- 0
pages/mine/ScoringPlaylist.vue View File

@@ -0,0 +1,99 @@
<template>
<view class="translation">
<view style="width: 690rpx;margin: 0 auto;margin-top: 10rpx;">
<view style="width: 100%;border-bottom: 1px solid #E0E0E0;display: flex;padding-bottom: 10rpx;margin-top: 40rpx;"
v-for="(item,index) in listarr" :key='index' @click="toaidoinfo(item.Content,item.corpusId,item.index)">
<view style="width: 26rpx;height: 36rpx;margin-top: 4rpx;">
<image style="width: 26rpx;height: 28rpx;" src="../../static/images/testimg.png" mode=""></image>
</view>
<view v-html="item.Content.onebest" style="color: #666666;font-size: 28rpx;line-height: 36rpx;margin-left: 10rpx;width: 80%;"></view>
<view style="font-size: 28rpx;width: 10%;width: 14%;text-align: right;">{{item.Content.time}}</view>
</view>
</view>
</view>
</template>

<script>
var util = require("../../utils/util.js");
var config = require("../../config");
export default {
data() {
return {
customerId:'',
listarr:[],
id:'',
};
},
onLoad: function(options) {
this.customerId = options.customerId;
this.id=options.id;
this.searchinfo()
},
methods: {
formatTime(num) {
//格式化时间格式
num = num.toFixed(0);
let second = num % 60;
if (second < 10) second = '0' + second;
let min = Math.floor(num / 60);
if (min < 10) min = '0' + min;
return min + ":" + second;
},
//搜索
searchinfo(){
let parames={
marketingId:this.id,
customerId:this.customerId
}
this.$u.post("/corpus/pinWordMatching", parames).then(res => {
res.forEach(item=>{
item.Content=JSON.parse(item.transferContent)
})
res.forEach(cet=>{
cet.Content.time=this.formatTime(cet.Content.bg/1000)
})
this.listarr=res;
})
},
//跳转
toaidoinfo(item,id,index){
item.customerId=this.customerId;
item.id=id;
item.index=index;
this.infostust(item)
},
//只有一条的时候
infostust(item){
console.log("zobudao")
let d = JSON.parse(JSON.stringify([item]))
d[0].onebest=""
const parames = {
pageNum: 1,
pageSize: 100,
query: {
customerId: this.customerId,
}
}
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(d[0])}&stateisshow=${'2'}`
})
}else{
let newobj = res[0];
uni.navigateTo({
url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}`
})
}
})
},
},
}
</script>
<style lang="scss" scoped>

</style>

Loading…
Cancel
Save