Commit aa562e82 authored by zhengke's avatar zhengke

修改

parent ff8089e1
...@@ -283,6 +283,19 @@ export function MarketCreateType(data) { ...@@ -283,6 +283,19 @@ export function MarketCreateType(data) {
}) })
} }
/**
* 获取细分渠道
* @param {查询参数} data
*/
export function MarketChannelStatic(data) {
return request({
url: '/UserCenter/MarketChannelStatic',
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>序号</th>
<th style="width:150px">渠道名</th>
<th>回单</th>
<th>到访</th>
<th>合同数</th>
<th>新业绩金额</th>
<th>到访率</th>
<th>合同转化率</th>
</tr>
<template v-if="dataList&&dataList.length>0">
<tr v-for="(cItem,cIndex) in dataList" :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 {
MarketChannelStatic
} 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 = "";
}
MarketChannelStatic(this.msg).then(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>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</template> </template>
</q-field> </q-field>
</div> </div>
<div class="col-3 Sysuser_Date"> <div class="col-3 Sysuser_Date" v-if="IsShowEmpQuery">
<q-field filled> <q-field filled>
 <template v-slot:control>  <template v-slot:control>
<el-select class="topselect" v-model="msg.empList" @change="getData" style="width:100%;" collapse-tags <el-select class="topselect" v-model="msg.empList" @change="getData" style="width:100%;" collapse-tags
...@@ -179,11 +179,27 @@ ...@@ -179,11 +179,27 @@
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() - 8.64e6 return time.getTime() > Date.now() - 8.64e6
} }
} },
IsQueryAuth: false, //是否有查询市场部和课程顾问部人员权限
IsShowEmpQuery: false, //是否显示员工下拉框
}; };
}, },
created() { created() {
this.CurrentUserInfo = this.getLocalStorage();
if (this.CurrentUserInfo && this.CurrentUserInfo.ActionMenuList && this.CurrentUserInfo.ActionMenuList.length >
0) {
this.CurrentUserInfo.ActionMenuList.forEach((x) => {
if (x.FunctionCode == "Query_MarketConsultant") {
this.IsQueryAuth = true;
}
});
}
if (this.IsQueryAuth || (this.CurrentUserInfo.IsManager == 1 && this.CurrentUserInfo.IsCourseConsultant == 1) || (
this.CurrentUserInfo.IsManager == 1 && this.CurrentUserInfo.IsMarket == 1)) {
this.IsShowEmpQuery = true;
} else {
this.msg.empList.push(this.CurrentUserInfo.Id);
}
}, },
mounted() { mounted() {
var now = new Date(); var now = new Date();
......
...@@ -32,8 +32,9 @@ ...@@ -32,8 +32,9 @@
<div class="col-4 Sysuser_Date"> <div class="col-4 Sysuser_Date">
<q-field filled> <q-field filled>
 <template v-slot:control>  <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" <el-date-picker v-model="dateList" type="daterange" style="width:100%" :picker-options="pickerOptions0"
@change="getData" unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> align="right" value-format="yyyy-MM-dd" @change="getData" unlink-panels range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</template> </template>
</q-field> </q-field>
...@@ -52,73 +53,20 @@ ...@@ -52,73 +53,20 @@
</div> </div>
</div> </div>
<div class="makeOutDiv"> <div class="makeOutDiv">
<table class="visitTable" style="border-collapse:collapse;"> <q-tabs v-model="top_Check" @input="getCheck" class="text-primary" align="left">
<tr> <q-tab :name="1" label="同行渠道" />
<th colspan="8">同行渠道</th> <q-tab :name="2" label="内部渠道" />
</tr> <q-tab :name="3" label="学校渠道" />
<tr> <q-tab :name="4" label="转介渠道" />
<th>序号</th> </q-tabs>
<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;"> <table class="visitTable" style="border-collapse:collapse;margin-top:20px;">
<tr> <tr>
<th colspan="8">学校渠道</th> <th colspan="8">
<span v-if="top_Check==1">同行渠道</span>
<span v-if="top_Check==2">内部渠道</span>
<span v-if="top_Check==3">学校渠道</span>
<span v-if="top_Check==4">转介渠道</span>
</th>
</tr> </tr>
<tr> <tr>
<th>序号</th> <th>序号</th>
...@@ -130,40 +78,8 @@ ...@@ -130,40 +78,8 @@
<th>到访率</th> <th>到访率</th>
<th>合同转化率</th> <th>合同转化率</th>
</tr> </tr>
<template v-if="dataList.schoolDataList&&dataList.schoolDataList.length>0"> <template v-if="dataList.length>0">
<tr v-for="(cItem,cIndex) in dataList.schoolDataList" :key="cIndex"> <tr v-for="(cItem,cIndex) in dataList" :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>{{cIndex+1}}</td>
<td>{{cItem.ChannelName}}</td> <td>{{cItem.ChannelName}}</td>
<td>{{cItem.ClueCount}}</td> <td>{{cItem.ClueCount}}</td>
...@@ -205,7 +121,9 @@ ...@@ -205,7 +121,9 @@
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() - 8.64e6 return time.getTime() > Date.now() - 8.64e6
} }
} },
top_Check: 1,
allData: []
}; };
}, },
created() { created() {
...@@ -218,19 +136,35 @@ ...@@ -218,19 +136,35 @@
var month = now.getMonth() + 1; var month = now.getMonth() + 1;
var day = now.getDate(); var day = now.getDate();
if (month >= 1 && month <= 9) { if (month >= 1 && month <= 9) {
month = "0" + month; month = "0" + month;
} }
if (day >= 1 && day <= 9) { if (day >= 1 && day <= 9) {
day = "0" + day; day = "0" + day;
} }
this.msg.startTime = year + strLink + month + strLink + '01'; this.msg.startTime = year + strLink + month + strLink + '01';
this.msg.endTime = year + strLink + month + strLink + day; this.msg.endTime = year + strLink + month + strLink + day;
this.dateList.push(year + strLink + month + strLink + '01'); this.dateList.push(year + strLink + month + strLink + '01');
this.dateList.push(year + strLink + month + strLink + day); this.dateList.push(year + strLink + month + strLink + day);
this.getEmployeeList(); this.getEmployeeList();
this.getData(); this.getData();
}, },
methods: { methods: {
getCheck() {
switch (this.top_Check) {
case 1:
this.dataList = this.allData.customerDataList;
break;
case 2:
this.dataList = this.allData.innerDataList;
break;
case 3:
this.dataList = this.allData.schoolDataList;
break;
case 4:
this.dataList = this.allData.transDataList;
break;
}
},
//获取数据 //获取数据
getData() { getData() {
if (this.dateList && this.dateList.length > 0) { if (this.dateList && this.dateList.length > 0) {
...@@ -241,9 +175,9 @@ ...@@ -241,9 +175,9 @@
this.msg.endTime = ""; this.msg.endTime = "";
} }
MarketCreateType(this.msg).then(res => { MarketCreateType(this.msg).then(res => {
console.log(res, '数据');
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.allData = res.Data;
this.dataList = this.allData.customerDataList;
} }
}); });
}, },
......
...@@ -1035,6 +1035,11 @@ const routes = [{ ...@@ -1035,6 +1035,11 @@ const routes = [{
component: () => component: () =>
import("pages/sale/visitTransform.vue") import("pages/sale/visitTransform.vue")
}, },
{
path: "/sale/channelDetail", //细分渠道
component: () =>
import("pages/sale/channelDetail.vue")
},
{ {
path: "/sale/auditionList", //试听列表 path: "/sale/auditionList", //试听列表
component: () => 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