Commit ff8089e1 authored by zhengke's avatar zhengke

1

parent a6a4e272
......@@ -271,6 +271,19 @@ export function MarketChannelStudentStatic(data) {
})
}
/**
* 获取到访转化统计
* @param {查询参数} data
*/
export function MarketCreateType(data) {
return request({
url: '/UserCenter/MarketCreateType',
method: 'post',
data
})
}
......
<style>
.visitTable {
text-align: center;
width: 100%;
}
.visitTable th,
.visitTable td {
border: 1px solid #d1d1d1;
height: 40px;
}
.visitTable tr th {
height: 40px;
background-color: rgb(238, 238, 239);
}
.Sysuser_Date .el-input__inner {
background: transparent !important;
border: 0 !important;
}
.Sysuser_Date .el-range-editor .el-range-input {
background: transparent !important;
}
</style>
<template>
<div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-4 Sysuser_Date">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="dateList" type="daterange" style="width:100%" :picker-options="pickerOptions0" align="right" value-format="yyyy-MM-dd"
@change="getData" unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</template>
</q-field>
</div>
<div class="col-3 Sysuser_Date">
<q-field filled>
 <template v-slot:control>
<el-select class="topselect" v-model="msg.empList" @change="getData" style="width:100%;" collapse-tags
multiple filterable placeholder="请选择">
<el-option v-for="item in EmployeeList" :key="item.Id" :label="item.EmployeeName" :value="item.Id">
</el-option>
</el-select>
</template>
</q-field>
</div>
</div>
</div>
<div class="makeOutDiv">
<table class="visitTable" style="border-collapse:collapse;">
<tr>
<th colspan="8">同行渠道</th>
</tr>
<tr>
<th>序号</th>
<th style="width:150px">渠道名</th>
<th>回单</th>
<th>到访</th>
<th>合同数</th>
<th>新业绩金额</th>
<th>到访率</th>
<th>合同转化率</th>
</tr>
<template v-if="dataList.customerDataList&&dataList.customerDataList.length>0">
<tr v-for="(cItem,cIndex) in dataList.customerDataList" :key="cIndex">
<td>{{cIndex+1}}</td>
<td>{{cItem.ChannelName}}</td>
<td>{{cItem.ClueCount}}</td>
<td>{{cItem.VisitCount}}</td>
<td>{{cItem.OrderCount}}</td>
<td>{{cItem.OrderIncome}}</td>
<td>{{getStatical(cItem.VisitCount,cItem.ClueCount)}}%</td>
<td>{{getStatical(cItem.OrderCount,cItem.VisitCount)}}%</td>
</tr>
</template>
<template v-else>
<tr>
<td colspan="8" rowspan="3">暂无数据</td>
</tr>
</template>
</table>
<table class="visitTable" style="border-collapse:collapse;margin-top:20px;">
<tr>
<th colspan="8">内部渠道</th>
</tr>
<tr>
<th>序号</th>
<th style="width:150px">渠道名</th>
<th>回单</th>
<th>到访</th>
<th>合同数</th>
<th>新业绩金额</th>
<th>到访率</th>
<th>合同转化率</th>
</tr>
<template v-if="dataList.innerDataList&&dataList.innerDataList.length>0">
<tr v-for="(cItem,cIndex) in dataList.innerDataList" :key="cIndex">
<td>{{cIndex+1}}</td>
<td>{{cItem.ChannelName}}</td>
<td>{{cItem.ClueCount}}</td>
<td>{{cItem.VisitCount}}</td>
<td>{{cItem.OrderCount}}</td>
<td>{{cItem.OrderIncome}}</td>
<td>{{getStatical(cItem.VisitCount,cItem.ClueCount)}}%</td>
<td>{{getStatical(cItem.OrderCount,cItem.VisitCount)}}%</td>
</tr>
</template>
<template v-else>
<tr>
<td colspan="8" rowspan="3">暂无数据</td>
</tr>
</template>
</table>
<table class="visitTable" style="border-collapse:collapse;margin-top:20px;">
<tr>
<th colspan="8">学校渠道</th>
</tr>
<tr>
<th>序号</th>
<th style="width:150px">渠道名</th>
<th>回单</th>
<th>到访</th>
<th>合同数</th>
<th>新业绩金额</th>
<th>到访率</th>
<th>合同转化率</th>
</tr>
<template v-if="dataList.schoolDataList&&dataList.schoolDataList.length>0">
<tr v-for="(cItem,cIndex) in dataList.schoolDataList" :key="cIndex">
<td>{{cIndex+1}}</td>
<td>{{cItem.ChannelName}}</td>
<td>{{cItem.ClueCount}}</td>
<td>{{cItem.VisitCount}}</td>
<td>{{cItem.OrderCount}}</td>
<td>{{cItem.OrderIncome}}</td>
<td>{{getStatical(cItem.VisitCount,cItem.ClueCount)}}%</td>
<td>{{getStatical(cItem.OrderCount,cItem.VisitCount)}}%</td>
</tr>
</template>
<template v-else>
<tr>
<td colspan="8" rowspan="3">暂无数据</td>
</tr>
</template>
</table>
<table class="visitTable" style="border-collapse:collapse;margin-top:20px;">
<tr>
<th colspan="8">转介绍渠道</th>
</tr>
<tr>
<th>序号</th>
<th style="width:150px">渠道名</th>
<th>回单</th>
<th>到访</th>
<th>合同数</th>
<th>新业绩金额</th>
<th>到访率</th>
<th>合同转化率</th>
</tr>
<template v-if="dataList.transDataList&&dataList.transDataList.length>0">
<tr v-for="(cItem,cIndex) in dataList.transDataList" :key="cIndex">
<td>{{cIndex+1}}</td>
<td>{{cItem.ChannelName}}</td>
<td>{{cItem.ClueCount}}</td>
<td>{{cItem.VisitCount}}</td>
<td>{{cItem.OrderCount}}</td>
<td>{{cItem.OrderIncome}}</td>
<td>{{getStatical(cItem.VisitCount,cItem.ClueCount)}}%</td>
<td>{{getStatical(cItem.OrderCount,cItem.VisitCount)}}%</td>
</tr>
</template>
<template v-else>
<tr>
<td colspan="8" rowspan="3">暂无数据</td>
</tr>
</template>
</table>
</div>
</div>
</template>
<script>
import {
MarketCreateType
} from '../../api/users/user'
import {
queryEmployee
} from "../../api/users/user";
export default {
data() {
return {
msg: {
startTime: "",
endTime: "",
empList: []
},
dateList: [],
dataList: [],
EmployeeList: [],
pickerOptions0: {
disabledDate(time) {
return time.getTime() > Date.now() - 8.64e6
}
}
};
},
created() {
},
mounted() {
var now = new Date();
var strLink = "-";
var year = now.getFullYear();
var month = now.getMonth() + 1;
var day = now.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (day >= 1 && day <= 9) {
day = "0" + day;
}
this.msg.startTime = year + strLink + month + strLink + '01';
this.msg.endTime = year + strLink + month + strLink + day;
this.dateList.push(year + strLink + month + strLink + '01');
this.dateList.push(year + strLink + month + strLink + day);
this.getEmployeeList();
this.getData();
},
methods: {
//获取数据
getData() {
if (this.dateList && this.dateList.length > 0) {
this.msg.startTime = this.dateList[0];
this.msg.endTime = this.dateList[1];
} else {
this.msg.startTime = "";
this.msg.endTime = "";
}
MarketCreateType(this.msg).then(res => {
console.log(res, '数据');
if (res.Code == 1) {
this.dataList = res.Data;
}
});
},
//获取员工列表
getEmployeeList() {
var qMsg = {
IsLeave: 1,
Dept_Id: 4
};
queryEmployee(qMsg).then(res => {
this.EmployeeList = res.Data;
});
},
//获取统计
getStatical(num, total) {
num = parseFloat(num);
total = parseFloat(total);
if (isNaN(num) || isNaN(total)) {
return "-";
}
return total <= 0 ? "0" : (Math.round(num / total * 10000) / 100.00);
},
}
}
</script>
......@@ -1030,6 +1030,11 @@ const routes = [{
component: () =>
import("pages/sale/makeupRate.vue")
},
{
path: "/sale/visitTransform", //到访转化
component: () =>
import("pages/sale/visitTransform.vue")
},
{
path: "/sale/auditionList", //试听列表
component: () =>
......
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