Commit ce78bdba authored by 赵茹林's avatar 赵茹林

update

parent c0596a85
<template>
<el-dialog :title="title" append-to-body :visible.sync="show" width="800px">
<el-dialog :title="title" append-to-body :visible.sync="show" width="960px">
<div v-loading="loading">
<div></div>
<el-table :data="list">
<el-table-column label="销售顾问" prop="month_order_rate"></el-table-column>
<el-table-column label="老师名" prop="month_order_rate"></el-table-column>
<el-table-column label="UID" prop="month_order_rate" v-if="dialogObj.type == 'callback'"></el-table-column>
<el-table-column label="客户微信昵称" prop="month_order_rate"></el-table-column>
<el-table-column label="电话号码" prop="month_order_rate"></el-table-column>
<el-table-column label="意向度" prop="month_order_rate"></el-table-column>
<el-table-column label="最近备注时间" prop="month_order_rate"></el-table-column>
<el-table-column label="下次回访时间" prop="month_order_rate"></el-table-column>
<!--回访 开始-->
<el-table v-if="dialogObj.type == 'callback'" :data="list" border size="small">
<el-table-column label="销售顾问" prop="staff_name"></el-table-column>
<el-table-column label="老师名" prop="teacher_name"></el-table-column>
<el-table-column label="UID" prop="user_id"></el-table-column>
<el-table-column label="客户微信昵称" prop="nickname"></el-table-column>
<el-table-column label="电话号码">
<template slot-scope="scope">{{scope.row.mobile || '-'}}</template>
</el-table-column>
<el-table-column label="意向度">
<template slot-scope="scope">{{scope.row.intention || '-'}}</template>
</el-table-column>
<el-table-column label="最近备注时间">
<template slot-scope="scope">
<template v-if="scope.row.remark_time && String(scope.row.remark_time).indexOf(' ') > -1">
<div>{{String(scope.row.remark_time).split(' ')[0]}}</div>
<div>{{String(scope.row.remark_time).split(' ')[1]}}</div>
</template>
<template v-else>-</template>
</template>
</el-table-column>
<el-table-column label="下次回访时间">
<template slot-scope="scope">{{scope.row.next_visit_at || '-'}}</template>
</el-table-column>
</el-table>
<!--回访 结束-->
<page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<!--有效沟通 开始-->
<el-table v-if="dialogObj.type == 'validchat'" :data="list" border size="small">
<el-table-column label="销售顾问" prop="staff_name"></el-table-column>
<el-table-column label="老师名" prop="teacher_name"></el-table-column>
<el-table-column label="UID" prop="user_id"></el-table-column>
<el-table-column label="客户微信昵称" prop="nick"></el-table-column>
<el-table-column label="电话号码">
<template slot-scope="scope">{{scope.row.mobile || '-'}}</template>
</el-table-column>
<el-table-column label="意向度">
<template slot-scope="scope">{{scope.row.intention || '-'}}</template>
</el-table-column>
<el-table-column label="最近备注时间">
<template slot-scope="scope">
<template v-if="scope.row.remark_time && String(scope.row.remark_time).indexOf(' ') > -1">
<div>{{String(scope.row.remark_time).split(' ')[0]}}</div>
<div>{{String(scope.row.remark_time).split(' ')[1]}}</div>
</template>
<template v-else>-</template>
</template>
</el-table-column>
<el-table-column label="下次回访时间">
<template slot-scope="scope">{{scope.row.next_visit_at || '-'}}</template>
</el-table-column>
</el-table>
<!--有效沟通 结束-->
<!--有效通次 开始-->
<el-table v-if="dialogObj.type == 'phonerecord'" :data="list" border size="small">
<el-table-column label="销售顾问" prop="staff_name"></el-table-column>
<el-table-column label="老师名" prop="teacher_name"></el-table-column>
<el-table-column label="UID" prop="user_id"></el-table-column>
<el-table-column label="客户名">
<template slot-scope="scope">{{scope.row.contact_name || '-'}}</template>
</el-table-column>
<el-table-column label="电话号码">
<template slot-scope="scope">{{scope.row.contact_phone || '-'}}</template>
</el-table-column>
<el-table-column label="意向度">
<template slot-scope="scope">{{scope.row.intention || '-'}}</template>
</el-table-column>
<el-table-column label="最近备注时间">
<template slot-scope="scope">
<template v-if="scope.row.remark_time && String(scope.row.remark_time).indexOf(' ') > -1">
<div>{{String(scope.row.remark_time).split(' ')[0]}}</div>
<div>{{String(scope.row.remark_time).split(' ')[1]}}</div>
</template>
<template v-else>-</template>
</template>
</el-table-column>
<el-table-column label="下次回访时间">
<template slot-scope="scope">{{scope.row.next_visit_at || '-'}}</template>
</el-table-column>
</el-table>
<!--有效通次 结束-->
<!--开课班级 开始-->
<el-table v-if="dialogObj.type == 'class'" :data="list" border size="small">
<el-table-column label="销售顾问" prop="staff_name"></el-table-column>
<el-table-column label="老师名" prop="teacher_name"></el-table-column>
<el-table-column label="期数名称" prop="user_id"></el-table-column>
<el-table-column label="班级名称">
<template slot-scope="scope">{{scope.row.contact_name || '-'}}</template>
</el-table-column>
<el-table-column label="开课时间">
<template slot-scope="scope">{{scope.row.contact_phone || '-'}}</template>
</el-table-column>
<el-table-column label="进班人数">
<template slot-scope="scope">{{scope.row.intention || '-'}}</template>
</el-table-column>
</el-table>
<!--开课班级 结束-->
<!--业绩 开始-->
<el-table v-if="dialogObj.type == 'achievement'" :data="list" border size="small">
<el-table-column label="组别" width="60px">
<template slot-scope="scope">{{scope.row.squad ? `T${scope.row.squad}` : '-'}}</template>
</el-table-column>
<el-table-column label="销售顾问">
<!--todo 优化-->
<template slot-scope="scope">{{(dialogObj.total || String(scope.row.staff_name).indexOf(',')>-1) ? '-' : dialogObj.staff_name}}</template>
</el-table-column>
<el-table-column label="平均转化率" prop="trans_rate"></el-table-column>
<el-table-column label="日课/体验课" prop="day_order_rate" width="90px"></el-table-column>
<el-table-column label="月课/季课" prop="month_order_rate"></el-table-column>
<el-table-column label="总订单" prop="total_order_num"></el-table-column>
<el-table-column label="一年课" prop="year_order_num">
</el-table-column>
<el-table-column label="两年课" prop="two_order_num">
</el-table-column>
<el-table-column label="总业绩" prop="total_order_money"></el-table-column>
<el-table-column label="一年课" prop="year_order_money"></el-table-column>
<el-table-column label="两年课" prop="two_order_money"></el-table-column>
</el-table>
<!--业绩 结束-->
<page v-if="total" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div>
</el-dialog>
......@@ -23,7 +138,7 @@
</template>
<script>
import { getVisitedApi,getClassOpenedApi,getAchievementApi,getPhoneRecordApi,getValidchatApi } from "@service/api";
import {getVisitedApi, getClassOpenedApi, getAchievementApi, getPhoneRecordApi, getValidchatApi} from "@service/api";
import page from '@framework/page'
export default {
......@@ -33,7 +148,8 @@
dialogObj: {
type: Object,
required: true,
default: () => {}
default: () => {
}
}
},
data() {
......@@ -55,87 +171,104 @@
console.log(this.dialogObj)
if (this.dialogObj) {
this.show = this.dialogObj.show;
this.getData();
}
},
getData() { // todo 名字
if (this.dialogObj.type == 'callback') {
this.getVisited();
this.title = `销售顾问:${this.dialogObj.staff_name} T${this.dialogObj.team}`
this.title = `销售顾问:${this.dialogObj.staff_name} T${this.dialogObj.squad}`
} else if (this.dialogObj.type == 'validchat') {
this.getValidchat();
this.title = `销售顾问:${this.dialogObj.staff_name} T${this.dialogObj.squad}`
} else if (this.dialogObj.type == 'phonerecord') {
this.getPhonerecord();
this.title = `销售顾问:${this.dialogObj.staff_name} T${this.dialogObj.squad}`
} else if (this.dialogObj.type == 'class') {
this.getClass();
this.title = `销售顾问:${this.dialogObj.staff_name} T${this.dialogObj.team}`
this.title = `销售顾问:${this.dialogObj.staff_name} T${this.dialogObj.squad}`
} else if (this.dialogObj.type == 'achievement') {
this.getAchievement();
this.title = `业绩详情:${this.dialogObj.staff_name} T${this.dialogObj.team}`
}
this.title = `业绩详情:${this.dialogObj.staff_name} T${this.dialogObj.squad}`
}
},
getData() {
getVisited() { // 已回访
let json = {
teacher_id: this.dialogObj.teacher_id,
start_at: this.dialogObj.start_at,
page: this.nowPage,
limit: this.limit
};
},
getVisited() {
let json = {
teacher_id: this.dialogObj.teacher_id,
// teacher_id: this.dialogObj.teacher_id,
teacher_id: '82',
start_at: this.dialogObj.start_at,
page: this.nowPage,
limit: this.limit
}
getVisitedApi(json).then(res => {
this.list = res;
this.total = res.total || 0; // todo 后台没给分页
this.loading = false;
console.log(res)
})
},
getValidchat() {
getValidchat() { // 有效沟通
let json = {
alias: this.dialogObj.alias,
teacher_id: this.dialogObj.teacher_id,
start_at: this.dialogObj.start_at,
page: this.nowPage,
limit: this.limit
}
getVisitedApi(json).then(res => {
getValidchatApi(json.alias, json).then(res => {
this.list = res.chat_friend_list.page_data;
this.total = res.chat_friend_list.total;
this.loading = false;
console.log(res)
})
},
getPhonerecord() {
let json = {
alias: this.dialogObj.alias,
teacher_id: this.dialogObj.teacher_id,
start_at: this.dialogObj.start_at,
page: this.nowPage,
limit: this.limit
}
getVisitedApi(json).then(res => {
getPhoneRecordApi(json.alias, json).then(res => {
this.list = res.phone_record_list.page_data;
this.total = res.phone_record_list.total;
this.loading = false;
console.log(res)
})
},
getClass() {
let json = {
teacher_id: this.dialogObj.teacher_id,
teacher_id: this.dialogObj.teacher_id.toString(),
start_at: this.dialogObj.start_at,
page: this.nowPage,
limit: this.limit
}
getClassOpenedApi(json).then(res => {
this.list = res;
this.total = res.total || 0;
this.loading = false;
console.log(res)
})
},
getAchievement() {
let json = {
teacher_id: this.dialogObj.teacher_id,
user_id: this.dialogObj.user_id,
start_at: this.dialogObj.start_at,
page: this.nowPage,
limit: this.limit
}
getAchievementApi(json).then(res => {
if (typeof res === 'object') {
res.squad = this.dialogObj.squad;
res.staff_name = this.dialogObj.total ? '-' : this.dialogObj.staff_name;
this.list = [res];
this.total = 0
}
this.loading = false;
console.log(res)
})
},
......@@ -158,6 +291,7 @@
deep: true
},
show(value) {
// this.nowPage = 1;
this.$emit("changeShow", value);
}
}
......
......@@ -17,11 +17,17 @@
<el-table-column label="组别" width="50px">
<template slot-scope="scope">{{(String(scope.row.squad).indexOf(',') > -1 && scope.row.total) ? '合计' : `T${scope.row.squad}`}}</template>
</el-table-column>
<el-table-column label="销售顾问">
<!--<el-table-column label="销售顾问">
<template slot-scope="scope">
<span v-html="transStaff(scope.row)"></span>
</template>
</el-table-column>-->
<el-table-column v-if="this.search.team != '1,2,3,4,5,6,7,8,9,10'" label="销售顾问">
<template slot-scope="scope">{{scope.row.total ? '-' : scope.row.staff_name}}</template>
</el-table-column>
<el-table-column prop="reach_class_num">
<template slot="header" slot-scope="scope">
<el-tooltip effect="dark" :content="TIP_TEAM['reach_class_num']" placement="top">
......@@ -31,6 +37,7 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="reach_course_num">
<template slot="header" slot-scope="scope">
<el-tooltip effect="dark" :content="TIP_TEAM['reach_course_num']" placement="top">
......@@ -40,6 +47,7 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="wait_add_friend">
<template slot="header" slot-scope="scope">
<el-tooltip effect="dark" :content="TIP_TEAM['wait_add_friend']" placement="top">
......@@ -49,6 +57,7 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="wait_visit_num">
<template slot="header" slot-scope="scope">
<el-tooltip effect="dark" :content="TIP_TEAM['wait_visit_num']" placement="top">
......@@ -58,6 +67,7 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="over_visit_num">
<template slot="header" slot-scope="scope">
<el-tooltip effect="dark" :content="TIP_TEAM['over_visit_num']" placement="top">
......@@ -70,6 +80,7 @@
<el-link @click="dialogToggle(scope.row, 'callback')">{{scope.row.over_visit_num}}</el-link>
</template>
</el-table-column>
<el-table-column prop="chat_contact_count">
<template slot="header" slot-scope="scope">
<el-tooltip effect="dark" :content="TIP_TEAM['chat_contact_count']" placement="top">
......@@ -79,6 +90,7 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="valid_chat_contact_count">
<template slot="header" slot-scope="scope">
<el-tooltip effect="dark" :content="TIP_TEAM['valid_chat_contact_count']" placement="top">
......@@ -91,6 +103,7 @@
<el-link @click="dialogToggle(scope.row, 'validchat')">{{scope.row.valid_chat_contact_count}}</el-link>
</template>
</el-table-column>
<el-table-column prop="valid_phone_counts">
<template slot="header" slot-scope="scope">
<el-tooltip effect="dark" :content="TIP_TEAM['valid_phone_counts']" placement="top">
......@@ -103,6 +116,7 @@
<el-link @click="dialogToggle(scope.row, 'phonerecord')">{{scope.row.valid_phone_counts}}</el-link>
</template>
</el-table-column>
<el-table-column prop="phone_total_time">
<template slot="header" slot-scope="scope">
<!--TODO-->
......@@ -136,7 +150,7 @@
</el-tooltip>
</template>
<template slot-scope="scope">
<el-link @click="dialogToggle">{{scope.row.month_order_num}}</el-link>
<el-link @click="dialogToggle(scope.row, 'achievement')">{{scope.row.month_order_num}}</el-link>
</template>
</el-table-column>
......@@ -149,7 +163,7 @@
</el-tooltip>
</template>
<template slot-scope="scope">
<el-link @click="dialogToggle">
<el-link @click="dialogToggle(scope.row, 'achievement')">
{{transRate(scope.row.month_trans_order_num, scope.row.month_trans_user_num)}}
</el-link>
</template>
......@@ -164,7 +178,7 @@
</el-tooltip>
</template>
<template slot-scope="scope">
<el-link @click="dialogToggle">{{scope.row.order_money_count}}</el-link>
<el-link @click="dialogToggle(scope.row, 'achievement')">{{scope.row.order_money_count}}</el-link>
</template>
</el-table-column>
</el-table>
......@@ -271,15 +285,18 @@
}
return '';
},
dialogToggle(row, type) {
console.log('row', row);
this.dialogObj = {
team: this.search.team,
alias: row.alias, // 老师微信号
squad: (String(row.squad).indexOf(',') > -1 && row.total) ? '' : `${row.squad}`,
show: true,
total: row.total,
type: type,
user_id: row.user_id,
teacher_id: row.teacher_id,
start_at: this.search.start_at,
staff_name: row.staff_name
staff_name: row.staff_name.indexOf(',')>-1 ? row.staff_name.split(',').join(',') : row.staff_name
}
},
getData() {
......
......@@ -32,8 +32,7 @@ axios.interceptors.request.use(
config.params = config.params || {};
let json = JSON.parse(JSON.stringify(config.params));
// console.log(json)
for(let k in json)
{
for(let k in json) {
// let reg = /^[0-9]+$/u;
// if(reg.test(json[k])){
// console.log(json[k])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment