Commit 6dd3c2b5 authored by 黄奎's avatar 黄奎

页面修改

parent 7c579bc3
...@@ -5,26 +5,20 @@ ...@@ -5,26 +5,20 @@
<h1>每日引流统计</h1> <h1>每日引流统计</h1>
</div> </div>
<div class="row flex"> <div class="row flex">
<div style="margin-right: 20px"> <div style="margin-right: 20px">
<el-date-picker v-model="msg.month" type="month" icon="el-icon-date" slot="append" class="input-with-select" <el-date-picker v-model="msg.month" type="month" icon="el-icon-date" slot="append" class="input-with-select"
@change="changeMonthHandler" placeholder="选择查询的月份"> @change="changeMonthHandler" placeholder="选择查询的月份">
</el-date-picker> </el-date-picker>
</div>
<div>
<span class="font-size-12" style="padding-right: 10px">业务员</span>
<el-select style="width: 220px;" filterable multiple clearable v-model="msg.QEmployeeIdsArr"
@change="changeEmployee">
<el-option v-for="(item, index) in EmployeeList" :key="index" :label="item.EmName" :value="item.EmployeeId">
</el-option>
</el-select>
</div>
</div> </div>
<div>
<span class="font-size-12" style="padding-right: 10px"
>业务员</span
>
<!-- height: 40px; overflow: auto -->
<el-select style="width: 220px;" filterable multiple clearable v-model="msg.QEmployeeIdsArr" @change="changeEmployee">
<el-option
v-for="(item, index) in EmployeeList"
:key="index"
:label="item.EmName"
:value="item.EmployeeId"
>
</el-option>
</el-select>
</div></div>
<div class="rightmenu"> <div class="rightmenu">
<el-dropdown @command="handleCommand"> <el-dropdown @command="handleCommand">
<el-button class="crm-btn crm-btn-more easy-btn margin-right0"> <el-button class="crm-btn crm-btn-more easy-btn margin-right0">
...@@ -42,7 +36,8 @@ ...@@ -42,7 +36,8 @@
<el-table-column> <el-table-column>
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.YearStr>0&&scope.row.MonthStr>0"> <template v-if="scope.row.YearStr>0&&scope.row.MonthStr>0">
<span class="pointer" style="color:blue;text-decoration:underline;" @click="seeDetails(scope.row)">{{scope.row.DateStr}}</span> <span class="pointer" style="color:blue;text-decoration:underline;"
@click="seeDetails(scope.row)">{{scope.row.DateStr}}</span>
</template> </template>
<template v-else> <template v-else>
<span>{{scope.row.DateStr}} </span> <span>{{scope.row.DateStr}} </span>
...@@ -51,98 +46,114 @@ ...@@ -51,98 +46,114 @@
</el-table-column> </el-table-column>
<el-table-column label="引流总数"> <el-table-column label="引流总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,1,'0')">{{scope.row.PushCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.PushCount}} </span> @click="seeDetails(scope.row,1,'0')">{{scope.row.PushCount}}</span>
<span v-else>{{scope.row.PushCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="有效总数"> <el-table-column label="有效总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,1,'1')">{{scope.row.EffectiveCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.EffectiveCount}} </span> @click="seeDetails(scope.row,1,'1')">{{scope.row.EffectiveCount}}</span>
<span v-else>{{scope.row.EffectiveCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="无效总数"> <el-table-column label="无效总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,1,'2')">{{scope.row.InvalidCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.InvalidCount}} </span> @click="seeDetails(scope.row,1,'2')">{{scope.row.InvalidCount}}</span>
<span v-else>{{scope.row.InvalidCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="小红书总数"> <el-table-column label="小红书总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'7')">{{scope.row.RedBookCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.RedBookCount}} </span> @click="seeDetails(scope.row,2,'7')">{{scope.row.RedBookCount}}</span>
<span v-else>{{scope.row.RedBookCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="DouYinCount" label="抖音总数"> <el-table-column prop="DouYinCount" label="抖音总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'9')">{{scope.row.DouYinCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.DouYinCount}} </span> @click="seeDetails(scope.row,2,'9')">{{scope.row.DouYinCount}}</span>
<span v-else>{{scope.row.DouYinCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="飞猪总数"> <el-table-column label="飞猪总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'8')">{{scope.row.FlyingPigCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.FlyingPigCount}} </span> @click="seeDetails(scope.row,2,'8')">{{scope.row.FlyingPigCount}}</span>
<span v-else>{{scope.row.FlyingPigCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="社群聊天总数"> <el-table-column label="社群聊天总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'1')">{{scope.row.GroupChatCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.GroupChatCount}} </span> @click="seeDetails(scope.row,2,'1')">{{scope.row.GroupChatCount}}</span>
<span v-else>{{scope.row.GroupChatCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="线下拜访总数"> <el-table-column label="线下拜访总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'2')">{{scope.row.OfflineVisitCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.OfflineVisitCount}} </span> @click="seeDetails(scope.row,2,'2')">{{scope.row.OfflineVisitCount}}</span>
<span v-else>{{scope.row.OfflineVisitCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="直客介绍总数"> <el-table-column label="直客介绍总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'3')">{{scope.row.StraightCustomerCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.StraightCustomerCount}} </span> @click="seeDetails(scope.row,2,'3')">{{scope.row.StraightCustomerCount}}</span>
<span v-else>{{scope.row.StraightCustomerCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="同业介绍总数"> <el-table-column label="同业介绍总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'4')">{{scope.row.PeerCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.PeerCount}} </span> @click="seeDetails(scope.row,2,'4')">{{scope.row.PeerCount}}</span>
<span v-else>{{scope.row.PeerCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="其他介绍总数"> <el-table-column label="其他介绍总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'6')">{{scope.row.OtherCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.OtherCount}} </span> @click="seeDetails(scope.row,2,'6')">{{scope.row.OtherCount}}</span>
<span v-else>{{scope.row.OtherCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单总数"> <el-table-column label="订单总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,3,'')">{{scope.row.OrderCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.OrderCount}} </span> @click="seeDetails(scope.row,3,'')">{{scope.row.OrderCount}}</span>
<span v-else>{{scope.row.OrderCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="机票订单总数"> <el-table-column label="机票订单总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,3,'1')">{{scope.row.TicketOrderCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.TicketOrderCount}} </span> @click="seeDetails(scope.row,3,'1')">{{scope.row.TicketOrderCount}}</span>
<span v-else>{{scope.row.TicketOrderCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="签证订单总数"> <el-table-column label="签证订单总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,3,'2')">{{scope.row.VisaOrderCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.VisaOrderCount}} </span> @click="seeDetails(scope.row,3,'2')">{{scope.row.VisaOrderCount}}</span>
<span v-else>{{scope.row.VisaOrderCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="地接订单总数"> <el-table-column label="地接订单总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,3,'3')">{{scope.row.GroundOrderCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.GroundOrderCount}} </span> @click="seeDetails(scope.row,3,'3')">{{scope.row.GroundOrderCount}}</span>
<span v-else>{{scope.row.GroundOrderCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="套餐订单总数"> <el-table-column label="套餐订单总数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,3,'4')">{{scope.row.ComboOrderCount}}</span> <span v-if="scope.row.YearStr>0&&scope.row.MonthStr>0" class="pointer"
<span v-else>{{scope.row.ComboOrderCount}} </span> @click="seeDetails(scope.row,3,'4')">{{scope.row.ComboOrderCount}}</span>
<span v-else>{{scope.row.ComboOrderCount}} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -154,201 +165,202 @@ ...@@ -154,201 +165,202 @@
</template> </template>
<script> <script>
import rightDrawer from "../../components/workStatistics/rightDrawer.vue"; import rightDrawer from "../../components/workStatistics/rightDrawer.vue";
export default { export default {
components: { components: {
rightDrawer, rightDrawer,
},
data() {
return {
drawer: false,
isDrawer: true,
msg: {
month: "",
YearStr: "",
MonthStr: "",
},
total: 0,
tableData: [],
loading: false,
selfParams: {
queryTime: {},
},
EmployeeList: []
};
},
provide() {
return {
selfParams: this.selfParams,
};
},
created() {
let d = new Date();
this.msg.month = d;
this.msg.YearStr = d.getFullYear();
this.msg.MonthStr = d.getMonth() + 1;
},
mounted() {
this.init();
this.Employee()
},
methods: {
handleClose(done) {
done();
}, },
// 获取业务员 data() {
Employee() { return {
let userInfo = this.getLocalStorage(); drawer: false,
let msg = { isDrawer: true,
RB_Group_id: userInfo.RB_Group_id, msg: {
BranchId: -1, month: "",
DepartmentId: 0, YearStr: "",
PostId: 0, MonthStr: "",
IsLeave: 0,
};
this.apipost2(
"admin_get_EmployeeGetList",
msg,
(res) => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
// let data = {
// EmName: "不限",
// EmployeeId: "0",
// };
// this.EmployeeList.unshift(data);
} else {
}
},
(err) => {}
);
}, },
// 查看详情 total: 0,
seeDetails(row, type = 0, val = "0") { tableData: [],
var d = new Date(); loading: false,
var currentY = this.msg.YearStr; selfParams: {
var currentM = this.msg.MonthStr; queryTime: {},
var MonthDayNum = new Date(currentY, currentM, 0).getDate(); //计算当月的天数
this.selfParams.queryTime.StartTime =
this.msg.YearStr + "-" + row.DateStr;
this.selfParams.queryTime.EndTime = this.msg.YearStr + "-" + row.DateStr;
delete this.selfParams.queryTime.ClueState;
delete this.selfParams.queryTime.CustomerSourceType;
this.selfParams.queryTime.OrderType = "";
this.selfParams.queryTime.queryType = type;
this.selfParams.queryTime.queryVal = val;
if (type == 1) {
this.selfParams.queryTime.ClueState = val;
} else if (type == 2) {
this.selfParams.queryTime.CustomerSourceType = val;
} else if (type == 3) {
this.selfParams.queryTime.OrderType = val;
}
this.drawer = true;
},
init() {
if (this.loading) return;
this.loading = true;
this.apipost(
"/api/ClueStatic/GetClueDayV2",
this.msg,
(res) => {
this.loading = false;
this.tableData = res.data.data;
}, },
(e) => { EmployeeList: []
this.loading = false; };
} },
); provide() {
return {
selfParams: this.selfParams,
};
}, },
tableRowClassName({ row }) { created() {
let cname = "font-size-12"; let d = new Date();
if ( this.msg.month = d;
row.DateStr == "总数" || this.msg.YearStr = d.getFullYear();
row.DateStr == "上期总数" || this.msg.MonthStr = d.getMonth() + 1;
row.DateStr == "环比成长" },
) { mounted() {
cname += " xiaoji-row"; this.init();
} else if (row.DateStr == "月总数") { this.Employee()
cname += " sum-row";
}
return cname;
}, },
tableCellClassName({ row, column }) { methods: {
if ( handleClose(done) {
row[column.property] && done();
row[column.property].toString().indexOf("-") != -1 && },
column.property != "DateStr" // 获取业务员
) { Employee() {
return "warning-col"; let userInfo = this.getLocalStorage();
} else if (column.property == "InvalidCount") { let msg = {
RB_Group_id: userInfo.RB_Group_id,
BranchId: 1245,
DepartmentId: 0,
PostId: 0,
IsLeave: 0,
};
this.apipost2(
"admin_get_EmployeeGetList",
msg,
(res) => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
}
},
(err) => {}
);
},
// 查看详情
seeDetails(row, type = 0, val = "0") {
var d = new Date();
var currentY = this.msg.YearStr;
var currentM = this.msg.MonthStr;
var MonthDayNum = new Date(currentY, currentM, 0).getDate(); //计算当月的天数
this.selfParams.queryTime.StartTime =
this.msg.YearStr + "-" + row.DateStr;
this.selfParams.queryTime.EndTime = this.msg.YearStr + "-" + row.DateStr;
delete this.selfParams.queryTime.ClueState;
delete this.selfParams.queryTime.CustomerSourceType;
this.selfParams.queryTime.OrderType = "";
this.selfParams.queryTime.queryType = type;
this.selfParams.queryTime.queryVal = val;
if (type == 1) {
this.selfParams.queryTime.ClueState = val;
} else if (type == 2) {
this.selfParams.queryTime.CustomerSourceType = val;
} else if (type == 3) {
this.selfParams.queryTime.OrderType = val;
}
this.drawer = true;
},
init() {
if (this.loading) return;
this.loading = true;
this.apipost(
"/api/ClueStatic/GetClueDayV2",
this.msg,
(res) => {
this.loading = false;
this.tableData = res.data.data;
},
(e) => {
this.loading = false;
}
);
},
tableRowClassName({
row
}) {
let cname = "font-size-12";
if ( if (
parseFloat(row[column.property]) / parseFloat(row.PushCount) >= row.DateStr == "总数" ||
0.2 row.DateStr == "上期总数" ||
row.DateStr == "环比成长"
) {
cname += " xiaoji-row";
} else if (row.DateStr == "月总数") {
cname += " sum-row";
}
return cname;
},
tableCellClassName({
row,
column
}) {
if (
row[column.property] &&
row[column.property].toString().indexOf("-") != -1 &&
column.property != "DateStr"
) { ) {
return "warning-col"; return "warning-col";
} else if (column.property == "InvalidCount") {
if (
parseFloat(row[column.property]) / parseFloat(row.PushCount) >=
0.2
) {
return "warning-col";
}
} }
} },
}, changeMonthHandler(val) {
changeMonthHandler(val) { this.msg.YearStr = val.getFullYear();
this.msg.YearStr = val.getFullYear(); this.msg.MonthStr = val.getMonth() + 1;
this.msg.MonthStr = val.getMonth() + 1; this.init();
this.init(); },
}, changeEmployee() {
changeEmployee() { this.msg.QEmployeeIds = this.msg.QEmployeeIdsArr.join(',')
this.msg.QEmployeeIds =this.msg.QEmployeeIdsArr.join(',') this.init();
this.init(); },
}, handleCommand(command) {
handleCommand(command) { if (command == "1") {
if (command == "1") { this.downloadHandler();
this.downloadHandler();
}
},
downloadHandler() {
this.GetLocalFile(
"/api/ClueStatic/DownLoadClueDay",
this.msg,
"每日引流数据统计.xls",
(res) => {
this.$message({
message: "导出成功",
type: "success",
});
} }
); },
downloadHandler() {
this.GetLocalFile(
"/api/ClueStatic/DownLoadClueDay",
this.msg,
"每日引流数据统计.xls",
(res) => {
this.$message({
message: "导出成功",
type: "success",
});
}
);
},
}, },
}, };
};
</script> </script>
<style> <style>
@import "../../assets/css/customerManage.css"; @import "../../assets/css/customerManage.css";
.flex {
display: flex; .flex {
} display: flex;
.el-table__fixed-body-wrapper table { }
padding-bottom: 8px !important;
} .el-table__fixed-body-wrapper table {
padding-bottom: 8px !important;
}
.el-table .xiaoji-row { .el-table .xiaoji-row {
background: #ffff00; background: #ffff00;
} }
.el-table .sum-row { .el-table .sum-row {
background: #00b0f0; background: #00b0f0;
} }
.el-table .warning-col { .el-table .warning-col {
background: red; background: red;
} }
.pointer { .pointer {
cursor: pointer; cursor: pointer;
} }
.pointer:hover { .pointer:hover {
color: #00b0f0; color: #00b0f0;
} }
</style> </style>
\ No newline at end of file
...@@ -5,26 +5,20 @@ ...@@ -5,26 +5,20 @@
<h1>月度引流统计</h1> <h1>月度引流统计</h1>
</div> </div>
<div class="flex"> <div class="flex">
<div style="margin-right: 20px"> <div style="margin-right: 20px">
<el-date-picker v-model="msg.month" type="year" icon="el-icon-date" slot="append" class="input-with-select" <el-date-picker v-model="msg.month" type="year" icon="el-icon-date" slot="append" class="input-with-select"
format="yyyy 年" @change="changeMonthHandler" placeholder="选择查询的月份"> format="yyyy 年" @change="changeMonthHandler" placeholder="选择查询的月份">
</el-date-picker> </el-date-picker>
</div>
<div>
<span class="font-size-12" style="padding-right: 10px">业务员</span>
<el-select style="width: 220px;" filterable multiple clearable v-model="msg.QEmployeeIdsArr"
@change="changeEmployee">
<el-option v-for="(item, index) in EmployeeList" :key="index" :label="item.EmName" :value="item.EmployeeId">
</el-option>
</el-select>
</div>
</div> </div>
<div>
<span class="font-size-12" style="padding-right: 10px"
>业务员</span
>
<!-- height: 40px; overflow: auto -->
<el-select style="width: 220px;" filterable multiple clearable v-model="msg.QEmployeeIdsArr" @change="changeEmployee">
<el-option
v-for="(item, index) in EmployeeList"
:key="index"
:label="item.EmName"
:value="item.EmployeeId"
>
</el-option>
</el-select>
</div></div>
<div class="rightmenu"> <div class="rightmenu">
<el-dropdown @command="handleCommand"> <el-dropdown @command="handleCommand">
<el-button class="crm-btn crm-btn-more easy-btn margin-right0"> <el-button class="crm-btn crm-btn-more easy-btn margin-right0">
...@@ -238,7 +232,7 @@ ...@@ -238,7 +232,7 @@
selfParams: { selfParams: {
queryTime: {}, queryTime: {},
}, },
EmployeeList: [] EmployeeList: []
}; };
}, },
provide() { provide() {
...@@ -254,40 +248,39 @@ ...@@ -254,40 +248,39 @@
mounted() { mounted() {
this.init(); this.init();
this.initRate(); this.initRate();
this.Employee() this.Employee()
}, },
methods: { methods: {
changeEmployee() { changeEmployee() {
this.msg.QEmployeeIds =this.msg.QEmployeeIdsArr.join(',') this.msg.QEmployeeIds = this.msg.QEmployeeIdsArr.join(',')
this.init(); this.init();
}, },
// 获取业务员 // 获取业务员
Employee() { Employee() {
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
let msg = { let msg = {
RB_Group_id: userInfo.RB_Group_id, RB_Group_id: userInfo.RB_Group_id,
BranchId: -1, BranchId: 1245,
DepartmentId: 0, DepartmentId: 0,
PostId: 0, PostId: 0,
IsLeave: 0, IsLeave: 0,
}; };
this.apipost2( this.apipost2(
"admin_get_EmployeeGetList", "admin_get_EmployeeGetList",
msg, msg,
(res) => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data; this.EmployeeList = res.data.data;
// let data = { // let data = {
// EmName: "不限", // EmName: "不限",
// EmployeeId: "0", // EmployeeId: "0",
// }; // };
// this.EmployeeList.unshift(data); // this.EmployeeList.unshift(data);
} else { } else {}
} },
}, (err) => {}
(err) => {} );
); },
},
handleClose(done) { handleClose(done) {
done(); done();
}, },
......
<template> <template>
<div class="customerManage" style="display:flex;height:calc(100% - 20px);flex-direction:column;"> <div class="customerManage" style="display:flex;height:calc(100% - 20px);flex-direction:column;">
<div class="tools" style="border:none;"> <div class="tools" style="border:none;">
<div class="tools-item"> <div class="tools-item">
<h1>年度引流统计</h1> <h1>年度引流统计</h1>
</div> </div>
<div> <div>
<span class="font-size-12" style="padding-right: 10px" <span class="font-size-12" style="padding-right: 10px">业务员</span>
>业务员</span <el-select style="width: 220px;" filterable multiple clearable v-model="msg.QEmployeeIdsArr"
> @change="changeEmployee">
<!-- height: 40px; overflow: auto --> <el-option v-for="(item, index) in EmployeeList" :key="index" :label="item.EmName" :value="item.EmployeeId">
<el-select style="width: 220px;" filterable multiple clearable v-model="msg.QEmployeeIdsArr" @change="changeEmployee"> </el-option>
<el-option </el-select>
v-for="(item, index) in EmployeeList" </div>
:key="index" <div class="rightmenu">
:label="item.EmName" <el-dropdown @command="handleCommand">
:value="item.EmployeeId" <el-button class="crm-btn crm-btn-more easy-btn margin-right0">
> <i class="iconfont icongengduo"></i>
</el-option> </el-button>
</el-select> <el-dropdown-menu slot="dropdown">
</div> <el-dropdown-item command="1"><i class="iconfont icondaochu"></i> 导出</el-dropdown-item>
<div class="rightmenu"> </el-dropdown-menu>
<el-dropdown @command="handleCommand"> </el-dropdown>
<el-button class="crm-btn crm-btn-more easy-btn margin-right0"> </div>
<i class="iconfont icongengduo"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="1"><i class="iconfont icondaochu"></i> 导出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
<el-tabs v-model="activeName" style="flex:1;height:100%;" class="diy-eltabs" tab-position="top">
<el-tab-pane label="年度数据" name="monthdata" style="background:#000">
<div class="data-box-item">
<el-table :data="tableData" tooltip-effect="dark" v-loading="loading" style="width: 100%;" height="100%" border>
<el-table-column prop="ItemName" label="" width="150">
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">{{year.first}}</template>
<template slot-scope="scope">{{scope.row.FirstYear}}</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">{{year.second}}</template>
<template slot-scope="scope">{{scope.row.SecondYear}}</template>
</el-table-column>
<el-table-column prop="YearRate" label="平均" :formatter="formatter"></el-table-column>
</el-table>
</div>
</el-tab-pane>
<el-tab-pane label="年度成长率" name="monthrate">
<div class="data-box-item">
<el-table :data="rateData" tooltip-effect="dark" v-loading="rateLoading" style="width: 100%;" height="100%" border :cell-class-name="tableCellClassName" :row-class-name="tableRowClassName">
<el-table-column prop="ItemName" label="" width="150">
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">{{year.first}}</template>
<template slot-scope="scope">{{scope.row.FirstYear}}</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">{{year.second}}</template>
<template slot-scope="scope">{{scope.row.SecondYear}}%</template>
</el-table-column>
<el-table-column prop="YearRate" label="平均" :formatter="formatter"></el-table-column>
</el-table>
</div>
</el-tab-pane>
</el-tabs>
</div> </div>
<el-tabs v-model="activeName" style="flex:1;height:100%;" class="diy-eltabs" tab-position="top">
<el-tab-pane label="年度数据" name="monthdata" style="background:#000">
<div class="data-box-item">
<el-table :data="tableData" tooltip-effect="dark" v-loading="loading" style="width: 100%;" height="100%"
border>
<el-table-column prop="ItemName" label="" width="150">
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">{{year.first}}</template>
<template slot-scope="scope">{{scope.row.FirstYear}}</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">{{year.second}}</template>
<template slot-scope="scope">{{scope.row.SecondYear}}</template>
</el-table-column>
<el-table-column prop="YearRate" label="平均" :formatter="formatter"></el-table-column>
</el-table>
</div>
</el-tab-pane>
<el-tab-pane label="年度成长率" name="monthrate">
<div class="data-box-item">
<el-table :data="rateData" tooltip-effect="dark" v-loading="rateLoading" style="width: 100%;" height="100%"
border :cell-class-name="tableCellClassName" :row-class-name="tableRowClassName">
<el-table-column prop="ItemName" label="" width="150">
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">{{year.first}}</template>
<template slot-scope="scope">{{scope.row.FirstYear}}</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">{{year.second}}</template>
<template slot-scope="scope">{{scope.row.SecondYear}}%</template>
</el-table-column>
<el-table-column prop="YearRate" label="平均" :formatter="formatter"></el-table-column>
</el-table>
</div>
</el-tab-pane>
</el-tabs>
</div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
msg: { msg: {},
}, total: 0,
total: 0, tableData: [],
tableData: [], loading: false,
loading: false, rateLoading: false,
rateLoading: false, activeName: "monthdata",
activeName: "monthdata", rateData: [],
rateData: [], year: {
year: { first: "",
first: "", second: "",
second: "",
},
EmployeeList: []
};
},
mounted() {
this.init();
this.initRate();
this.Employee()
},
methods: {
changeEmployee() {
this.msg.QEmployeeIds =this.msg.QEmployeeIdsArr.join(',')
this.init();
},
// 获取业务员
Employee() {
let userInfo = this.getLocalStorage();
let msg = {
RB_Group_id: userInfo.RB_Group_id,
BranchId: -1,
DepartmentId: 0,
PostId: 0,
IsLeave: 0,
};
this.apipost2(
"admin_get_EmployeeGetList",
msg,
(res) => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
// let data = {
// EmName: "不限",
// EmployeeId: "0",
// };
// this.EmployeeList.unshift(data);
} else {
}
},
(err) => {}
);
},
init() {
if (this.loading) return;
this.loading = true;
this.apipost(
"/api/ClueStatic/GetClueYearV2",
this.msg,
(res) => {
this.loading = false;
let t = res.data.data[0];
this.year.first = t.FirstYearStr;
this.year.second = t.SecondYearStr;
this.tableData = res.data.data;
}, },
(e) => { EmployeeList: []
this.loading = false; };
}
);
}, },
initRate() { mounted() {
if (this.rateLoading) return;
this.rateLoading = true;
this.apipost(
"/api/ClueStatic/GetClueYearRateV2",
this.msg,
(res) => {
this.rateLoading = false;
this.rateData = res.data.data;
},
(e) => {
this.rateLoading = false;
}
);
},
tableRowClassName({ row }) {
let cname = "font-size-12";
if (row.DateStr == "平均") {
cname += " xiaoji-row";
} else if (row.DateStr == "总数") {
cname += " sum-row";
}
return cname;
},
tableCellClassName({ row, column }) {
try {
if (
row[column.property].toString().indexOf("-") != -1 &&
column.property != "DateStr"
) {
return "warning-col";
}
} catch (error) {}
},
changeMonthHandler(val) {
this.msg.YearStr = val.getFullYear();
this.init(); this.init();
this.initRate(); this.initRate();
this.Employee()
}, },
formatter(row, column) { methods: {
return row[column.property] + "%"; changeEmployee() {
}, this.msg.QEmployeeIds = this.msg.QEmployeeIdsArr.join(',')
handleCommand(command) { this.init();
if (command == "1") { },
this.downloadHandler(); // 获取业务员
} Employee() {
}, let userInfo = this.getLocalStorage();
downloadHandler() { let msg = {
this.GetLocalFile( RB_Group_id: userInfo.RB_Group_id,
"/api/ClueStatic/DownLoadClueDay", BranchId: 1245,
this.msg, DepartmentId: 0,
"数据统计.xls", PostId: 0,
(res) => { IsLeave: 0,
};
this.apipost2(
"admin_get_EmployeeGetList",
msg,
(res) => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
} else {}
},
(err) => {}
);
},
init() {
if (this.loading) return;
this.loading = true;
this.apipost(
"/api/ClueStatic/GetClueYearV2",
this.msg,
(res) => {
this.loading = false;
let t = res.data.data[0];
this.year.first = t.FirstYearStr;
this.year.second = t.SecondYearStr;
this.tableData = res.data.data;
},
(e) => {
this.loading = false;
}
);
},
initRate() {
if (this.rateLoading) return;
this.rateLoading = true;
this.apipost(
"/api/ClueStatic/GetClueYearRateV2",
this.msg,
(res) => {
this.rateLoading = false;
this.rateData = res.data.data;
},
(e) => {
this.rateLoading = false;
}
);
},
tableRowClassName({
row
}) {
let cname = "font-size-12";
if (row.DateStr == "平均") {
cname += " xiaoji-row";
} else if (row.DateStr == "总数") {
cname += " sum-row";
}
return cname;
},
tableCellClassName({
row,
column
}) {
try {
if (
row[column.property].toString().indexOf("-") != -1 &&
column.property != "DateStr"
) {
return "warning-col";
}
} catch (error) {}
},
changeMonthHandler(val) {
this.msg.YearStr = val.getFullYear();
this.init();
this.initRate();
},
formatter(row, column) {
return row[column.property] + "%";
},
handleCommand(command) {
if (command == "1") {
this.downloadHandler();
}
},
downloadHandler() {
this.GetLocalFile(
"/api/ClueStatic/DownLoadClueDay",
this.msg,
"数据统计.xls",
(res) => {
this.$message({
message: "导出成功",
type: "success",
});
}
);
},
handleCommand(command) {
if (command == "1") {
if (this.activeName == "monthdata") {
this.downloadHandler(
"/api/ClueStatic/DownLoadClueYear",
"年度引流数据"
);
} else {
this.downloadHandler(
"/api/ClueStatic/DownLoadClueYearRate",
"年度引流成长率"
);
}
}
},
downloadHandler(url, name) {
this.GetLocalFile(url, this.msg, `${name}.xls`, (res) => {
this.$message({ this.$message({
message: "导出成功", message: "导出成功",
type: "success", type: "success",
}); });
}
);
},
handleCommand(command) {
if (command == "1") {
if (this.activeName == "monthdata") {
this.downloadHandler(
"/api/ClueStatic/DownLoadClueYear",
"年度引流数据"
);
} else {
this.downloadHandler(
"/api/ClueStatic/DownLoadClueYearRate",
"年度引流成长率"
);
}
}
},
downloadHandler(url, name) {
this.GetLocalFile(url, this.msg, `${name}.xls`, (res) => {
this.$message({
message: "导出成功",
type: "success",
}); });
}); },
}, },
}, };
};
</script> </script>
<style> <style>
@import "../../assets/css/customerManage.css"; @import "../../assets/css/customerManage.css";
.el-table__fixed-body-wrapper table {
padding-bottom: 8px !important;
}
.el-table .xiaoji-row {
background: #ffff00;
}
.el-table .sum-row {
background: #00b0f0;
}
.el-table .warning-col {
background: red;
}
.el-table__fixed-body-wrapper table { .diy-eltabs .el-tabs__content {
padding-bottom: 8px !important; height: calc(100% - 40px);
} }
.el-table .xiaoji-row {
background: #ffff00;
}
.el-table .sum-row { .diy-eltabs .data-box-item {
background: #00b0f0; position: absolute;
} top: 0;
.el-table .warning-col { bottom: 0;
background: red; left: 0;
} right: 0;
.diy-eltabs .el-tabs__content { }
height: calc(100% - 40px); </style>
} \ No newline at end of file
.diy-eltabs .data-box-item {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
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