Commit a3eb851c authored by 罗超's avatar 罗超

提交明细数据页面

parent 69cc4865
...@@ -70,10 +70,13 @@ export default { ...@@ -70,10 +70,13 @@ export default {
@import url("//at.alicdn.com/t/font_1627123_grz80mbm3sv.css"); @import url("//at.alicdn.com/t/font_1627123_grz80mbm3sv.css");
/* @import './assets/css/common.css'; */ /* @import './assets/css/common.css'; */
@font-face { @font-face {
font-family: 'iconfont'; /* Project id 1627123 */ font-family: "iconfont"; /* Project id 1627123 */
src: url('//at.alicdn.com/t/font_1627123_zynqp2as0d.woff2?t=1652257333900') format('woff2'), src: url("//at.alicdn.com/t/font_1627123_zynqp2as0d.woff2?t=1652257333900")
url('//at.alicdn.com/t/font_1627123_zynqp2as0d.woff?t=1652257333900') format('woff'), format("woff2"),
url('//at.alicdn.com/t/font_1627123_zynqp2as0d.ttf?t=1652257333900') format('truetype'); url("//at.alicdn.com/t/font_1627123_zynqp2as0d.woff?t=1652257333900")
format("woff"),
url("//at.alicdn.com/t/font_1627123_zynqp2as0d.ttf?t=1652257333900")
format("truetype");
} }
@import "./assets/css/init.css"; @import "./assets/css/init.css";
body, body,
...@@ -92,7 +95,15 @@ html { ...@@ -92,7 +95,15 @@ html {
.el-scrollbar { .el-scrollbar {
height: 100%; height: 100%;
} }
.hide-tabs-content .el-tabs__header {
margin: 0 !important;
}
.hide-tabs-content .el-tabs__content {
display: none !important;
}
.hide-tabs-content .el-tabs__nav-wrap::after {
background: none !important;
}
.el-scrollbar__wrap { .el-scrollbar__wrap {
overflow: auto !important; overflow: auto !important;
width: 100%; width: 100%;
......
...@@ -1104,15 +1104,7 @@ export default { ...@@ -1104,15 +1104,7 @@ export default {
.loudou-card .el-card__header { .loudou-card .el-card__header {
border: none; border: none;
} }
.hide-tabs-content .el-tabs__header {
margin: 0 !important;
}
.hide-tabs-content .el-tabs__content {
display: none !important;
}
.hide-tabs-content .el-tabs__nav-wrap::after {
background: none !important;
}
.hide_input_time { .hide_input_time {
position: relative !important; position: relative !important;
} }
......
<style> <style>
@import '../../assets/css/customerManage.css'; @import "../../assets/css/customerManage.css";
.el-table__fixed-body-wrapper table { .el-table__fixed-body-wrapper table {
padding-bottom: 8px !important; padding-bottom: 8px !important;
} }
.clueTitle { .clueTitle {
padding: 20px 20px 0 20px; padding: 20px 20px 0 20px;
} }
</style> </style>
<template> <template>
<div class="customerManage"> <div class="customerManage" style="display:flex;flex-direction:column;height:100%;">
<div class="tools"> <div class="tools">
<div class="tools-item"> <div class="tools-item">
<h1 :class="isDrawer?'clueTitle':''">线索管理</h1> <h1 :class="isDrawer?'clueTitle':''" v-if="title==''">线索管理</h1>
<el-tag class="f12" size="medium" style="margin-top:10px;margin-left:10px;" v-else>{{title}}</el-tag>
</div> </div>
<template v-if="!isDrawer"> <template v-if="!isDrawer">
<div style="width: 340px;"> <div style="width: 340px;">
...@@ -113,13 +114,13 @@ ...@@ -113,13 +114,13 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content" style="flex:1;">
<el-table v-if="loading" v-loading="true" :data="[]"> <el-table v-if="loading" v-loading="true" :data="[]">
<el-table-column v-for="(item, index) in queryType2" :key="index" :label="item.label"> <el-table-column v-for="(item, index) in queryType2" :key="index" :label="item.label">
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table v-if="!loading" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" <el-table v-if="!loading" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
:height="sceneList.length > 0 ? '600' : '660'" border row-class-name="font-size-12" height="100%" border row-class-name="font-size-12"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column v-if="!isDrawer" fixed type="selection" width="40"></el-table-column> <el-table-column v-if="!isDrawer" fixed type="selection" width="40"></el-table-column>
<el-table-column prop="ClueState" label="线索状态" show-overflow-tooltip width="80"> <el-table-column prop="ClueState" label="线索状态" show-overflow-tooltip width="80">
...@@ -254,544 +255,612 @@ ...@@ -254,544 +255,612 @@
</div> </div>
</template> </template>
<script> <script>
import mySelect from "../dialogModel/select"; import mySelect from "../dialogModel/select";
import customerInfoBox from "./customerInfoBox"; import customerInfoBox from "./customerInfoBox";
import customerDialogBox from "./customerDialogBox"; import customerDialogBox from "./customerDialogBox";
import guestDialogBox from "./guestDialogBox"; import guestDialogBox from "./guestDialogBox";
import guestInfoBox from "./guestInfoBox"; import guestInfoBox from "./guestInfoBox";
import importDialogBox from "./importDialogBox"; import importDialogBox from "./importDialogBox";
export default { export default {
props: { props: {
isDrawer: { isDrawer: {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
queryTime: { queryTime: {
type: Object, type: Object,
default: null default: null,
} },
title: {
type: String,
default: "",
},
},
watch: {
queryTime: {
handler(val, oldVal) {
this.queryTime = val;
this.getList();
},
deep: true,
},
},
components: {
mySelect,
customerInfoBox,
customerDialogBox,
guestDialogBox,
guestInfoBox,
importDialogBox,
},
data() {
return {
receiptType: {
ReFinanceId: "",
ReFinanceId2: "", //单据类型
RelevanceFrId: "", //1机票 2签证 3地接 4套餐 5其他
},
activeNameNum: "1",
ruleList: [],
guestDialogBoxShow: false,
isShowGuestInfo: false, //是否显示直客弹窗
activeMenu: 1,
queryType2: [
{
label: "线索名称",
show: true,
}, },
watch: { {
queryTime: { label: "线索来源",
handler(val, oldVal) { show: true,
this.queryTime = val;
this.getList()
},
deep: true,
}
}, },
components: { {
mySelect, label: "来源细分",
customerInfoBox, show: true,
customerDialogBox,
guestDialogBox,
guestInfoBox,
importDialogBox,
}, },
data() { {
return { label: "需求",
receiptType: { show: true,
ReFinanceId: "",
ReFinanceId2: "", //单据类型
RelevanceFrId: "", //1机票 2签证 3地接 4套餐 5其他
},
activeNameNum: "1",
ruleList: [],
guestDialogBoxShow: false,
isShowGuestInfo: false, //是否显示直客弹窗
activeMenu: 1,
queryType2: [{
label: '线索名称',
show: true,
}, {
label: '线索来源',
show: true,
}, {
label: '来源细分',
show: true,
}, {
label: '需求',
show: true,
}, {
label: '客户级别',
show: true,
}, {
label: '联系人',
show: true,
}, {
label: '联系电话',
show: true,
}, {
label: '微信',
show: true,
}, {
label: '负责人',
show: true,
}, {
label: '创建人',
show: true,
}, {
label: '上次更新时间',
show: true,
}, {
label: '创建时间',
show: true,
}],
queryType: [{
label: '线索名称',
show: true,
}, {
label: '线索来源',
show: true,
}, {
label: '来源细分',
show: true,
}, {
label: '需求',
show: true,
}, {
label: '客户级别',
show: true,
}, {
label: '联系人',
show: true,
}, {
label: '联系电话',
show: true,
}, {
label: '微信',
show: true,
}, {
label: '负责人',
show: true,
}, {
label: '创建人',
show: true,
}, {
label: '上次更新时间',
show: true,
}, {
label: '创建时间',
show: true,
}],
CustomerId: 0,
CustomerIdStr: '',
transferVisible: false,
mySelectCtrl: false,
isShowCustomerInfo: false, //是否显示客户弹窗
loading: true,
dialogTableVisible: false,
dialogTableVisibleName: '新建线索',
tableData: [],
multipleSelection: [],
EmployeeList: [],
value: '',
userInfo: {},
transferMsg: {
CustomerIds: [],
EmpId: '',
},
CustomerTypeText: "", // 线索名称搜索
msg: {
KeyWord: '',
CustomerName: '',
Contact: '',
pageIndex: 1,
pageSize: 30,
ContactNumber: '',
WhereType: -1,
OrderBy: '',
CustomerType: 1,
ID: 33,
IsSelectAdmin: 0
},
total: 0,
selectionList: [{
name: '转移',
class: 'iconfont iconplus-transfer',
myFun: this.transfer,
show: true
}, {
name: '转化为客户',
class: 'iconfont iconplus-transfer',
myFun: this.waters,
show: true
}, {
name: '删除',
class: 'iconfont icondelete',
myFun: this.deleteClue,
show: true
}],
sceneList: [],
SceneEmployeeList: [],
sceneID: 33,
visible: false,
isShowImport: false, //是否显示导入弹窗
importType: 1, //导入文件类型(1-客户导入,2-直客导入)
IsSelectAdminList:[],//是否是线索管理员
};
}, },
mounted() { {
label: "客户级别",
this.userInfo = this.getLocalStorage(); show: true,
let $this = this
this.MsgBus.$on('closeCustomerDialogBox', function () {
$this.dialogTableVisible = false;
$this.guestDialogBoxShow = false;
$this.isShowImport = false;
})
this.MsgBus.$on('sceneSave', function (msg) {
$this.sceneList = [...msg]
$this.GetSceneEmployeeList()
let obj = {}
msg.forEach(element => {
obj[element.name] = element
});
$this.msg.Data = obj
$this.getList()
})
this.MsgBus.$on('editScene', function () {
$this.GetSceneEmployeeList()
})
this.GetConfigCuleAdmin()
this.Employee()
this.GetSceneEmployeeList()
}, },
beforeDestroy() { {
this.MsgBus.$off('sceneSave'); label: "联系人",
this.MsgBus.$off('editScene'); show: true,
}, },
methods: { {
// 获取线索管理详情 label: "联系电话",
GetConfigCuleAdmin() { show: true,
this.apipost('/api/Customer/GetConfigCuleAdmin', {}, res => { },
if (res.data.resultCode == 1) { {
this.IsSelectAdminList = res.data.data.Content.split(',') label: "微信",
if(this.IsSelectAdminList.indexOf(this.userInfo.EmployeeId.toString())!=-1){ show: true,
this.msg.IsSelectAdmin = 1 },
this.selectionList.forEach(item=>{ {
if(item.name=='转移'){ label: "负责人",
item.show = false show: true,
} },
}) {
this.getList() label: "创建人",
}else{ show: true,
this.getList() },
} {
}else{ label: "上次更新时间",
this.getList() show: true,
this.$message.error(res.data.message) },
} {
}) label: "创建时间",
show: true,
}, },
handleClose(done) { ],
done(); queryType: [
}, {
// 查看详情 label: "线索名称",
seeDetails(row) { show: true,
this.drawer = true },
this.queryTime = this.msg.YearStr + '-' + row.DateStr {
}, label: "线索来源",
changeWhere(item) { show: true,
this.msg.ID = item.ID },
this.sceneID = item.ID {
this.msg.Data = item.WhereData ? JSON.parse(item.WhereData) : {} label: "来源细分",
this.msg.WhereType = item.WhereType show: true,
this.visible = false },
this.getList() {
}, label: "需求",
GetSceneEmployeeList() { show: true,
this.apipost('/api/Scene/GetSceneEmployeeList', { },
LableType: 4 {
}, res => { label: "客户级别",
if (res.data.resultCode == 1) { show: true,
this.SceneEmployeeList = res.data.data },
} {
}) label: "联系人",
}, show: true,
deleteScene(index) { },
this.sceneList.splice(index, 1) {
let obj = {} label: "联系电话",
this.sceneList.forEach(element => { show: true,
obj[element.name] = element },
}); {
this.msg.Data = obj label: "微信",
this.getList() show: true,
}, },
handleCommand(command) { {
this.CustomerId = 0 label: "负责人",
if (command === '1') { show: true,
this.dialogTableVisibleName = '新建线索' },
this.dialogTableVisible = true {
} else if (command === '2') { label: "创建人",
this.guestDialogBoxShow = true show: true,
} else if (command === '3') { },
this.importType = 1; {
this.isShowImport = true; label: "上次更新时间",
} else if (command === '4') { show: true,
this.importType = 2; },
this.isShowImport = true; {
} label: "创建时间",
}, show: true,
Employee() { },
let msg = { ],
RB_Group_id: this.userInfo.RB_Group_id, CustomerId: 0,
BranchId: -1, CustomerIdStr: "",
DepartmentId: 0, transferVisible: false,
PostId: 0, mySelectCtrl: false,
IsLeave: 0, isShowCustomerInfo: false, //是否显示客户弹窗
} loading: true,
this.apipost2( dialogTableVisible: false,
"admin_get_EmployeeGetList", dialogTableVisibleName: "新建线索",
this.msg, tableData: [],
res => { multipleSelection: [],
if (res.data.resultCode == 1) { EmployeeList: [],
this.EmployeeList = res.data.data; value: "",
} else {} userInfo: {},
}, transferMsg: {
err => {} CustomerIds: [],
); EmpId: "",
}, },
//删除 CustomerTypeText: "", // 线索名称搜索
deleteClue(type) { msg: {
let tips = '确定将这些线索删除?' KeyWord: "",
if (type === 1) { CustomerName: "",
tips = '是否把线索“' + this.CustomerName + '”删除?' Contact: "",
this.multipleSelection.push(this.CustomerId) pageIndex: 1,
} pageSize: 30,
this.$confirm(tips, '提示', { ContactNumber: "",
confirmButtonText: '确定', WhereType: -1,
cancelButtonText: '取消', OrderBy: "",
type: 'warning' CustomerType: 1,
}).then(() => { ID: 33,
let str = '' IsSelectAdmin: 0,
this.multipleSelection.map((x, i) => { },
str = str + x + ',' total: 0,
}) selectionList: [
this.apipost('/api/Customer/DelCustomerClue', { {
CustomerIds: str.substring(0, str.length - 1), name: "转移",
CustomerType: this.msg.CustomerType class: "iconfont iconplus-transfer",
}, res => { myFun: this.transfer,
if (res.data.resultCode == 1) { show: true,
if (type === 1) {} { },
this.isShowCustomerInfo = false {
this.isShowGuestInfo = false name: "转化为客户",
} class: "iconfont iconplus-transfer",
this.multipleSelection = [] myFun: this.waters,
this.$message.success(res.data.message); show: true,
this.getList() },
} {
}) name: "删除",
}).catch(() => { class: "iconfont icondelete",
this.$message({ myFun: this.deleteClue,
type: 'info', show: true,
message: '已取消' },
}); ],
}); sceneList: [],
}, SceneEmployeeList: [],
//导出 sceneID: 33,
export () { visible: false,
isShowImport: false, //是否显示导入弹窗
}, importType: 1, //导入文件类型(1-客户导入,2-直客导入)
//转换为客户 IsSelectAdminList: [], //是否是线索管理员
waters(type) { };
let tips = '确定将这些线索转换为客户吗?' },
if (type === 1) { mounted() {
tips = '是否把线索“' + this.CustomerName + '”转换为客户吗?' this.userInfo = this.getLocalStorage();
this.multipleSelection.push(this.CustomerId) let $this = this;
} this.MsgBus.$on("closeCustomerDialogBox", function() {
this.$confirm(tips, '提示', { $this.dialogTableVisible = false;
confirmButtonText: '确定', $this.guestDialogBoxShow = false;
cancelButtonText: '取消', $this.isShowImport = false;
type: 'warning' });
}).then(() => { this.MsgBus.$on("sceneSave", function(msg) {
let str = '' $this.sceneList = [...msg];
this.multipleSelection.map((x, i) => { $this.GetSceneEmployeeList();
str = str + x + ',' let obj = {};
}) msg.forEach((element) => {
let msg = { obj[element.name] = element;
CustomerIds: str.substring(0, str.length - 1), });
CustomerType: this.msg.CustomerType $this.msg.Data = obj;
} $this.getList();
this.apipost('/api/Customer/UpdateCustomerClue', msg, res => { });
if (res.data.resultCode == 1) { this.MsgBus.$on("editScene", function() {
if (type === 1) {} { $this.GetSceneEmployeeList();
this.isShowCustomerInfo = false });
this.isShowGuestInfo = false this.GetConfigCuleAdmin();
} this.Employee();
this.multipleSelection = [] this.GetSceneEmployeeList();
this.$message.success(res.data.message); },
this.getList() beforeDestroy() {
} this.MsgBus.$off("sceneSave");
}) this.MsgBus.$off("editScene");
}).catch(() => { },
this.$message({ methods: {
type: 'info', // 获取线索管理详情
message: '已取消' GetConfigCuleAdmin() {
}); this.apipost("/api/Customer/GetConfigCuleAdmin", {}, (res) => {
}); if (res.data.resultCode == 1) {
}, this.IsSelectAdminList = res.data.data.Content.split(",");
// 关注 if (
CareforCustomer(scope) { this.IsSelectAdminList.indexOf(
this.apipost('/api/Customer/CareforCustomer', { this.userInfo.EmployeeId.toString()
CustomerCreateId: scope.row.CustomerCreateId ) != -1
}, res => { ) {
if (res.data.resultCode == 1) { this.msg.IsSelectAdmin = 1;
this.$message.success('操作成功'); this.selectionList.forEach((item) => {
this.getList() if (item.name == "转移") {
} item.show = false;
}) }
}, });
// 转移 this.getList();
transfer(type) { } else {
if (type !== 2) { this.getList();
if (type === 3) { }
this.multipleSelection.push(this.CustomerId) } else {
} this.getList();
if (this.ruleList.length == 0) { this.$message.error(res.data.message);
this.transferVisible = true }
} else { });
let tips = '系统已开启自动分配,无法指定推送,是否继续推送?' },
this.$confirm(tips, '提示', { handleClose(done) {
confirmButtonText: '确定', done();
cancelButtonText: '取消', },
type: 'warning' // 查看详情
}).then(() => { seeDetails(row) {
let ids this.drawer = true;
if (this.CustomerId) { this.queryTime = this.msg.YearStr + "-" + row.DateStr;
ids = this.CustomerId },
} else { changeWhere(item) {
ids = this.multipleSelection.join(',') this.msg.ID = item.ID;
} this.sceneID = item.ID;
this.apipost('/api/Customer/AutoTransferCustomer', { this.msg.Data = item.WhereData ? JSON.parse(item.WhereData) : {};
IDs: ids this.msg.WhereType = item.WhereType;
}, res => { this.visible = false;
if (res.data.resultCode == 1) { this.getList();
this.$message.success(res.data.message); },
this.getList() GetSceneEmployeeList() {
} this.apipost(
}) "/api/Scene/GetSceneEmployeeList",
}).catch(() => { {
this.$message({ LableType: 4,
type: 'info', },
message: '已取消' (res) => {
}); if (res.data.resultCode == 1) {
}); this.SceneEmployeeList = res.data.data;
} }
} else { }
if (this.transferMsg.EmpId === '') { );
return this.$message.error('请选择变更负责人!') },
} deleteScene(index) {
let str = '' this.sceneList.splice(index, 1);
this.multipleSelection.map((x, i) => { let obj = {};
str = str + x + ',' this.sceneList.forEach((element) => {
}) obj[element.name] = element;
this.transferMsg.CustomerIds = str.substring(0, str.length - 1) });
this.apipost('/api/Customer/TransferCustomerClue', this.transferMsg, res => { this.msg.Data = obj;
if (res.data.resultCode == 1) { this.getList();
this.multipleSelection = [] },
this.transferVisible = false handleCommand(command) {
if (type === 3) {} { this.CustomerId = 0;
this.isShowCustomerInfo = false if (command === "1") {
this.isShowGuestInfo = false this.dialogTableVisibleName = "新建线索";
} this.dialogTableVisible = true;
this.$message.success(res.data.message); } else if (command === "2") {
this.getList() this.guestDialogBoxShow = true;
this.transferMsg = { } else if (command === "3") {
CustomerIds: [], this.importType = 1;
EmpId: '', this.isShowImport = true;
} } else if (command === "4") {
} this.importType = 2;
}) this.isShowImport = true;
} }
}, },
showMessageFromChild(list) { Employee() {
this.mySelectCtrl = !this.mySelectCtrl let msg = {
if (list) { RB_Group_id: this.userInfo.RB_Group_id,
this.queryType = list BranchId: -1,
this.getList() DepartmentId: 0,
} PostId: 0,
IsLeave: 0,
};
this.apipost2(
"admin_get_EmployeeGetList",
this.msg,
(res) => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
} else {
}
},
(err) => {}
);
},
//删除
deleteClue(type) {
let tips = "确定将这些线索删除?";
if (type === 1) {
tips = "是否把线索“" + this.CustomerName + "”删除?";
this.multipleSelection.push(this.CustomerId);
}
this.$confirm(tips, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let str = "";
this.multipleSelection.map((x, i) => {
str = str + x + ",";
});
this.apipost(
"/api/Customer/DelCustomerClue",
{
CustomerIds: str.substring(0, str.length - 1),
CustomerType: this.msg.CustomerType,
}, },
editCust(type) { (res) => {
this.dialogTableVisibleName = '修改线索' if (res.data.resultCode == 1) {
if (type === 1) { if (type === 1) {
this.dialogTableVisible = true
} else {
this.guestDialogBoxShow = true
} }
}, {
openDetails(scope) { this.isShowCustomerInfo = false;
this.CustomerId = scope.row.CustomerId this.isShowGuestInfo = false;
if (this.msg.CustomerType == 0) {
this.CustomerName = scope.row.CustomerName;
} else if (this.msg.CustomerType == 1) {
this.CustomerName = scope.row.ClueName;
} }
if (this.msg.CustomerType === 0) { this.multipleSelection = [];
this.isShowCustomerInfo = true this.$message.success(res.data.message);
} else {
this.isShowGuestInfo = true
}
},
// 获取是否开启规则
GetCustomerAllotRule() {
this.apipost('/api/Customer/GetCustomerAllotRule', {}, res => {
if (res.data.resultCode == 1) {
this.ruleList = res.data.data.EmpList
}
})
},
handleSizeChange(val) {
this.msg.pageSize = val
this.getList();
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList(); this.getList();
}, }
handleClose(done) { }
done(); );
}, })
getList: function (isclose) { .catch(() => {
if (isclose && isclose == 1) { this.$message({
this.isShowGuestInfo = false; type: "info",
} message: "已取消",
if (this.msg.CustomerType != 1) { });
this.msg.CustomerName = this.CustomerTypeText });
this.msg.KeyWord = "" },
} else { //导出
this.msg.KeyWord = this.CustomerTypeText export() {},
this.msg.CustomerName = "" //转换为客户
} waters(type) {
this.tableData = [] let tips = "确定将这些线索转换为客户吗?";
this.loading = true if (type === 1) {
let url tips = "是否把线索“" + this.CustomerName + "”转换为客户吗?";
if (!this.isDrawer) { this.multipleSelection.push(this.CustomerId);
url = '/api/Customer/GetCustomerCluePage' }
} else { this.$confirm(tips, "提示", {
this.msg.StartTime = this.queryTime && this.queryTime.StartTime confirmButtonText: "确定",
this.msg.EndTime = this.queryTime && this.queryTime.EndTime cancelButtonText: "取消",
url = '/api/Customer/GetCustomerClueAllPage' type: "warning",
} })
this.apipost(url, this.msg, res => { .then(() => {
if (res.data.resultCode == 1) { let str = "";
this.tableData = res.data.data.pageData; this.multipleSelection.map((x, i) => {
this.total = res.data.data.count; str = str + x + ",";
this.loading = false; });
} let msg = {
}) CustomerIds: str.substring(0, str.length - 1),
if (this.msg.CustomerType == 1) { CustomerType: this.msg.CustomerType,
// 获取是否开启规则 };
this.GetCustomerAllotRule() this.apipost("/api/Customer/UpdateCustomerClue", msg, (res) => {
if (res.data.resultCode == 1) {
if (type === 1) {
}
{
this.isShowCustomerInfo = false;
this.isShowGuestInfo = false;
}
this.multipleSelection = [];
this.$message.success(res.data.message);
this.getList();
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
},
// 关注
CareforCustomer(scope) {
this.apipost(
"/api/Customer/CareforCustomer",
{
CustomerCreateId: scope.row.CustomerCreateId,
},
(res) => {
if (res.data.resultCode == 1) {
this.$message.success("操作成功");
this.getList();
}
}
);
},
// 转移
transfer(type) {
if (type !== 2) {
if (type === 3) {
this.multipleSelection.push(this.CustomerId);
}
if (this.ruleList.length == 0) {
this.transferVisible = true;
} else {
let tips = "系统已开启自动分配,无法指定推送,是否继续推送?";
this.$confirm(tips, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let ids;
if (this.CustomerId) {
ids = this.CustomerId;
} else {
ids = this.multipleSelection.join(",");
}
this.apipost(
"/api/Customer/AutoTransferCustomer",
{
IDs: ids,
},
(res) => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.getList();
}
} }
);
}, })
handleSelectionChange(val) { .catch(() => {
this.multipleSelection = val.map(x => this.$message({
x.CustomerId type: "info",
) message: "已取消",
});
});
}
} else {
if (this.transferMsg.EmpId === "") {
return this.$message.error("请选择变更负责人!");
}
let str = "";
this.multipleSelection.map((x, i) => {
str = str + x + ",";
});
this.transferMsg.CustomerIds = str.substring(0, str.length - 1);
this.apipost(
"/api/Customer/TransferCustomerClue",
this.transferMsg,
(res) => {
if (res.data.resultCode == 1) {
this.multipleSelection = [];
this.transferVisible = false;
if (type === 3) {
}
{
this.isShowCustomerInfo = false;
this.isShowGuestInfo = false;
}
this.$message.success(res.data.message);
this.getList();
this.transferMsg = {
CustomerIds: [],
EmpId: "",
};
} }
}
);
}
},
showMessageFromChild(list) {
this.mySelectCtrl = !this.mySelectCtrl;
if (list) {
this.queryType = list;
this.getList();
}
},
editCust(type) {
this.dialogTableVisibleName = "修改线索";
if (type === 1) {
this.dialogTableVisible = true;
} else {
this.guestDialogBoxShow = true;
}
},
openDetails(scope) {
this.CustomerId = scope.row.CustomerId;
if (this.msg.CustomerType == 0) {
this.CustomerName = scope.row.CustomerName;
} else if (this.msg.CustomerType == 1) {
this.CustomerName = scope.row.ClueName;
}
if (this.msg.CustomerType === 0) {
this.isShowCustomerInfo = true;
} else {
this.isShowGuestInfo = true;
}
},
// 获取是否开启规则
GetCustomerAllotRule() {
this.apipost("/api/Customer/GetCustomerAllotRule", {}, (res) => {
if (res.data.resultCode == 1) {
this.ruleList = res.data.data.EmpList;
} }
}; });
</script> },
\ No newline at end of file handleSizeChange(val) {
this.msg.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
handleClose(done) {
done();
},
getList: function(isclose) {
if (isclose && isclose == 1) {
this.isShowGuestInfo = false;
}
if (this.msg.CustomerType != 1) {
this.msg.CustomerName = this.CustomerTypeText;
this.msg.KeyWord = "";
} else {
this.msg.KeyWord = this.CustomerTypeText;
this.msg.CustomerName = "";
}
this.tableData = [];
this.loading = true;
let url;
if (!this.isDrawer) {
url = "/api/Customer/GetCustomerCluePage";
} else {
// this.msg.StartTime = this.queryTime && this.queryTime.StartTime;
// this.msg.EndTime = this.queryTime && this.queryTime.EndTime;
delete this.msg.ClueState;
delete this.msg.CustomerSourceType;
delete this.msg.OrderType;
this.msg = this.queryTime && Object.assign(this.msg, this.queryTime);
url = "/api/Customer/GetCustomerClueAllPage";
}
this.apipost(url, this.msg, (res) => {
if (res.data.resultCode == 1) {
this.tableData = res.data.data.pageData;
this.total = res.data.data.count;
this.loading = false;
}
});
if (this.msg.CustomerType == 1) {
// 获取是否开启规则
this.GetCustomerAllotRule();
}
},
handleSelectionChange(val) {
this.multipleSelection = val.map((x) => x.CustomerId);
},
},
};
</script>
<template>
<div style="display:flex;flex-direction:column;height:100vh">
<el-tabs v-model="activeName" class="hide-tabs-content" @tab-click="changeTypeHandler" style="margin-left:10px;padding-bottom:10px;" v-if="queryTime.queryType==0">
<el-tab-pane label="引流数据" name="xiansuo"></el-tab-pane>
<el-tab-pane label="订单数据" name="order"></el-tab-pane>
</el-tabs>
<div v-if="queryTime.queryType!=3" v-show="activeName=='xiansuo'" style="flex:1">
<clueComponent :isDrawer="true" :title="formatDrawTitle" :queryTime="queryTime"></clueComponent>
</div>
<div class="tools" v-if="queryTime.queryType==3||queryTime.queryType==0" v-show="activeName=='order'">
<div class="tools-item">
<el-tag class="f12" size="medium" style="margin-top:10px;margin-left:10px;">{{formatDrawTitle}}</el-tag>
</div>
</div>
<div style="flex:1;overflow-y:auto;" v-if="queryTime.queryType==3||queryTime.queryType==0" v-show="activeName=='order'">
<orderList :dataList="dataList" :loading="loading"></orderList>
</div>
<div v-show="activeName=='order'" v-if="queryTime.queryType==3||queryTime.queryType==0">
<el-pagination class="Mypagination" background @current-change="handleCurrentChange"
:page-sizes="[15, 30, 60, 90, 100]" :page-size="msg.pageSize" layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange" :total="total">
</el-pagination>
</div>
</div>
</template>
<script>
import clueComponent from "@/components/clueManagement/clueComponent";
import orderList from "../customerManage/orderList.vue";
export default {
inject: ["selfParams"],
data() {
return {
msg: {
pageIndex: 1,
pageSize: 15,
OrderId: "", //订单id
GuestName: "", //客人姓名
GuestId: "", //客人id
StartCityName: "", //出发城市
EndCityName: "", //到达城市
EnterID: "", //业务员id
CreateBy: "", //引流员id
TicketStatus: "0", //出票状态
VisaStatus: "0", //出签状态
OrderStatus: "0", //订单状态
Q_IsCollect: "0", //收款状态
StartTime: "", //订单开始时间
EndTime: "", //订单结束时间
OrderType: "", //订单类型
},
dataList: [],
MultipleChoiceList: [
//多选项目
{
Name: "机票",
Id: "1",
show: false,
},
{
Name: "签证",
Id: "2",
show: false,
},
{
Name: "地接",
Id: "3",
show: false,
},
{
Name: "套餐",
Id: "4",
show: false,
},
{
Name: "其他",
Id: "5",
show: false,
},
],
loading: true,
total: 0,
activeName: "xiansuo",
formatDrawTitle: "",
};
},
computed: {
queryTime() {
return this.selfParams.queryTime;
},
},
components: {
clueComponent,
orderList,
},
created() {
this.formatDrawTitle = this.formatTitleHandler(
this.queryTime.queryType,
this.queryTime.queryVal
);
if (this.queryTime.queryType == 3 || this.queryTime.queryType == 0) {
this.msg.StartTime = this.queryTime.StartTime;
this.msg.EndTime = this.queryTime.EndTime;
this.msg.OrderType = this.queryTime.OrderType;
this.getList();
this.activeName = this.queryTime.queryType == 3 ? "order" : "xiansuo";
}
},
mounted() {},
methods: {
changeTypeHandler() {
this.formatDrawTitle = this.formatTitleHandler(
this.activeName == "xiansuo" ? 0 : 3,
""
);
},
getList() {
this.loading = true;
this.apipost(
"/api/Order/GetGuestOrderStatisticsPageList",
this.msg,
(res) => {
if (res.data.resultCode == 1) {
let data = res.data.data.Data.pageData;
let addList = function(arr) {
arr.forEach((item) => {
item.More = "";
item.actuallyReceived = false;
item.cost = false;
item.selectedType = "";
item.checkList = [];
item.MultipleChoiceList = [];
item.MoreList = [
{
Name: "取消订单",
Id: "1",
show:
item.OrderStatus != 2 &&
item.OrderStatus != 5 &&
item.OrderStatus != 6
? true
: false,
},
{
Name: "订单转交",
Id: "2",
show: true,
},
{
Name: "修改订单金额",
Id: "3",
show:
item.OrderStatus != 2 &&
item.OrderStatus != 5 &&
item.OrderStatus != 6 &&
(item.TicketStatus == 1 || item.VisaStatus == 1)
? true
: false,
},
{
Name: "修改出票状态",
Id: "4",
show:
item.OrderStatus != 2 &&
item.OrderStatus != 5 &&
item.OrderStatus != 6 &&
item.TicketStatus < 3
? true
: false,
},
{
Name: "修改出签状态",
Id: "5",
show:
item.OrderStatus != 2 &&
item.OrderStatus != 5 &&
item.OrderStatus != 6 &&
item.VisaStatus == 1
? true
: false,
},
{
Name: "订单收损",
Id: "8",
show:
item.OrderStatus != 2 &&
item.OrderStatus != 5 &&
item.OrderStatus != 6
? true
: false,
},
{
Name: "收损完结",
Id: "9",
show:
(item.OrderStatus == 3 || item.OrderStatus == 4) &&
item.DueinMoney == 0 &&
item.OrderStatus != 2 &&
item.OrderStatus != 5 &&
item.OrderStatus != 6
? true
: false,
},
{
Name: "订单完结",
Id: "6",
show:
item.OrderStatus == 1 && item.DueinMoney == 0
? true
: false,
},
{
Name: "操作日志",
Id: "7",
show: true,
},
];
});
};
addList(data);
data.forEach((item) => {
if (item.OrderType) {
let list = item.OrderType && item.OrderType.split(",");
for (let j = 0; j < list.length; j++) {
for (let i = 0; i < this.MultipleChoiceList.length; i++) {
if (list[j] == this.MultipleChoiceList[i].Id) {
item.MultipleChoiceList.push(
JSON.parse(JSON.stringify(this.MultipleChoiceList[i]))
);
}
}
}
}
if (item.LossList.length > 0) {
for (let i = 0; i < item.LossList.length; i++) {
for (let j = 0; j < item.MultipleChoiceList.length; j++) {
if (
item.LossList[i].OrderType ==
item.MultipleChoiceList[j].Id
) {
item.MultipleChoiceList[j].show = true;
}
}
}
}
});
this.dataList = res.data.data.Data.pageData;
this.total = res.data.data.Data.count;
this.loading = false;
} else {
this.$message.error(res.data.message);
this.loading = false;
}
}
);
},
formatTitleHandler(type, val) {
let dateStr =
this.queryTime.StartTime != this.queryTime.EndTime
? this.queryTime.StartTime + " 至 " + this.queryTime.EndTime
: this.queryTime.StartTime;
if (type == 0) {
return `${dateStr} 全部引流信息`;
} else if (type == 1) {
return `${dateStr} ${
val == "0" ? "全部" : val == "1" ? "有效" : "无效"
}引流信息`;
} else if (type == 2) {
let typeStr = "";
switch (val) {
case "1":
typeStr = "社群聊天";
break;
case "2":
typeStr = "线下拜访";
break;
case "3":
typeStr = "直客介绍";
break;
case "4":
typeStr = "同行介绍";
break;
case "6":
typeStr = "其它";
break;
case "7":
typeStr = "小红书";
break;
case "8":
typeStr = "飞猪";
break;
case "9":
typeStr = "抖音";
break;
}
return `${dateStr} 来源于:${typeStr}引流信息`;
} else if (type == 3) {
let typeStr = "";
switch (val) {
case "1":
typeStr = "机票";
break;
case "2":
typeStr = "签证";
break;
case "3":
typeStr = "地接";
break;
case "4":
typeStr = "套餐";
break;
case "":
typeStr = "全部";
break;
}
return `${dateStr} 转化的${typeStr}类型订单`;
}
},
handleSizeChange(val) {
this.msg.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
},
};
</script>
<style>
</style>
...@@ -33,58 +33,118 @@ ...@@ -33,58 +33,118 @@
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="PushCount" label="引流总数"> <el-table-column label="引流总数">
<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-else>{{scope.row.PushCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="EffectiveCount" label="有效总数"> <el-table-column label="有效总数">
<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-else>{{scope.row.EffectiveCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="InvalidCount" label="无效总数"> <el-table-column label="无效总数">
<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-else>{{scope.row.InvalidCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="RedBookCount" label="小红书总数"> <el-table-column label="小红书总数">
<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-else>{{scope.row.RedBookCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="DouYinCount" label="抖音总数"> <el-table-column prop="DouYinCount" label="抖音总数">
<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-else>{{scope.row.DouYinCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="FlyingPigCount" label="飞猪总数"> <el-table-column label="飞猪总数">
<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-else>{{scope.row.FlyingPigCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="GroupChatCount" label="社群聊天总数"> <el-table-column label="社群聊天总数">
<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-else>{{scope.row.GroupChatCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="OfflineVisitCount" label="线下拜访总数"> <el-table-column label="线下拜访总数">
<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-else>{{scope.row.OfflineVisitCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="StraightCustomerCount" label="直客介绍总数"> <el-table-column label="直客介绍总数">
<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-else>{{scope.row.StraightCustomerCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="PeerCount" label="同业介绍总数"> <el-table-column label="同业介绍总数">
<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-else>{{scope.row.PeerCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="OtherCount" label="其他介绍总数"> <el-table-column label="其他介绍总数">
<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-else>{{scope.row.OtherCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="OrderCount" label="订单总数"> <el-table-column label="订单总数">
<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-else>{{scope.row.OrderCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="TicketOrderCount" label="机票订单总数"> <el-table-column label="机票订单总数">
<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-else>{{scope.row.TicketOrderCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="VisaOrderCount" label="签证订单总数"> <el-table-column label="签证订单总数">
<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-else>{{scope.row.VisaOrderCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="GroundOrderCount" label="地接订单总数"> <el-table-column label="地接订单总数">
<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-else>{{scope.row.GroundOrderCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="ComboOrderCount" label="套餐订单总数"> <el-table-column label="套餐订单总数">
<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-else>{{scope.row.ComboOrderCount}} </span>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<el-drawer :with-header="false" size='70%' :visible.sync="drawer" direction="rtl" :before-close="handleClose"> <el-drawer :with-header="false" size='80%' :visible.sync="drawer" direction="rtl" :before-close="handleClose">
<clueComponent :isDrawer="isDrawer" :queryTime="queryTime"></clueComponent> <rightDrawer v-if="drawer"></rightDrawer>
</el-drawer> </el-drawer>
</div> </div>
</template> </template>
<script> <script>
import clueComponent from "@/components/clueManagement/clueComponent"; import rightDrawer from "../../components/workStatistics/rightDrawer.vue";
export default { export default {
components: { components: {
clueComponent, rightDrawer,
}, },
data() { data() {
return { return {
queryTime: {
StartTime: "",
EndTime: "",
},
drawer: false, drawer: false,
isDrawer: true, isDrawer: true,
msg: { msg: {
...@@ -95,6 +155,14 @@ export default { ...@@ -95,6 +155,14 @@ export default {
total: 0, total: 0,
tableData: [], tableData: [],
loading: false, loading: false,
selfParams: {
queryTime: {},
},
};
},
provide() {
return {
selfParams: this.selfParams,
}; };
}, },
created() { created() {
...@@ -111,15 +179,30 @@ export default { ...@@ -111,15 +179,30 @@ export default {
done(); done();
}, },
// 查看详情 // 查看详情
seeDetails(row) { seeDetails(row, type = 0, val = "0") {
var d = new Date(); var d = new Date();
var currentY = this.msg.YearStr; var currentY = this.msg.YearStr;
var currentM = this.msg.MonthStr; var currentM = this.msg.MonthStr;
var MonthDayNum = new Date(currentY, currentM, 0).getDate(); //计算当月的天数 var MonthDayNum = new Date(currentY, currentM, 0).getDate(); //计算当月的天数
this.queryTime.StartTime = this.msg.YearStr + "-" + row.DateStr; this.selfParams.queryTime.StartTime =
this.queryTime.EndTime = this.msg.YearStr + "-" + row.DateStr; 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; this.drawer = true;
}, },
init() { init() {
if (this.loading) return; if (this.loading) return;
this.loading = true; this.loading = true;
......
...@@ -36,37 +36,101 @@ ...@@ -36,37 +36,101 @@
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="PushCount" label="引流总数"> <el-table-column label="引流总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,1,'0')">{{scope.row.PushCount}}</span>
<span v-else>{{scope.row.PushCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="EffectiveCount" label="有效总数"> <el-table-column label="有效总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,1,'1')">{{scope.row.EffectiveCount}}</span>
<span v-else>{{scope.row.EffectiveCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="InvalidCount" label="无效总数"> <el-table-column label="无效总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,1,'2')">{{scope.row.InvalidCount}}</span>
<span v-else>{{scope.row.InvalidCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="RedBookCount" label="小红书总数"> <el-table-column label="小红书总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'7')">{{scope.row.RedBookCount}}</span>
<span v-else>{{scope.row.RedBookCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="DouYinCount" label="抖音总数"> <el-table-column prop="DouYinCount" label="抖音总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'9')">{{scope.row.DouYinCount}}</span>
<span v-else>{{scope.row.DouYinCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="FlyingPigCount" label="飞猪总数"> <el-table-column label="飞猪总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'8')">{{scope.row.FlyingPigCount}}</span>
<span v-else>{{scope.row.FlyingPigCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="GroupChatCount" label="社群聊天总数"> <el-table-column label="社群聊天总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'1')">{{scope.row.GroupChatCount}}</span>
<span v-else>{{scope.row.GroupChatCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="OfflineVisitCount" label="线下拜访总数"> <el-table-column label="线下拜访总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'2')">{{scope.row.OfflineVisitCount}}</span>
<span v-else>{{scope.row.OfflineVisitCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="StraightCustomerCount" label="直客介绍总数"> <el-table-column label="直客介绍总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'3')">{{scope.row.StraightCustomerCount}}</span>
<span v-else>{{scope.row.StraightCustomerCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="PeerCount" label="同业介绍总数"> <el-table-column label="同业介绍总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'4')">{{scope.row.PeerCount}}</span>
<span v-else>{{scope.row.PeerCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="OtherCount" label="其他介绍总数"> <el-table-column label="其他介绍总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,2,'6')">{{scope.row.OtherCount}}</span>
<span v-else>{{scope.row.OtherCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="OrderCount" label="订单总数"> <el-table-column label="订单总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,3,'')">{{scope.row.OrderCount}}</span>
<span v-else>{{scope.row.OrderCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="TicketOrderCount" label="机票订单总数"> <el-table-column label="机票订单总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,3,'1')">{{scope.row.TicketOrderCount}}</span>
<span v-else>{{scope.row.TicketOrderCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="VisaOrderCount" label="签证订单总数"> <el-table-column label="签证订单总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,3,'2')">{{scope.row.VisaOrderCount}}</span>
<span v-else>{{scope.row.VisaOrderCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="GroundOrderCount" label="地接订单总数"> <el-table-column label="地接订单总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,3,'3')">{{scope.row.GroundOrderCount}}</span>
<span v-else>{{scope.row.GroundOrderCount}} </span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="ComboOrderCount" label="套餐订单总数"> <el-table-column label="套餐订单总数">
<template slot-scope="scope">
<span v-if="scope.row.MonthStr>0" class="pointer" @click="seeDetails(scope.row,3,'4')">{{scope.row.ComboOrderCount}}</span>
<span v-else>{{scope.row.ComboOrderCount}} </span>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
...@@ -108,196 +172,211 @@ ...@@ -108,196 +172,211 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-drawer :with-header="false" size='70%' :visible.sync="drawer" direction="rtl" :before-close="handleClose"> <el-drawer :with-header="false" size='80%' :visible.sync="drawer" direction="rtl" :before-close="handleClose">
<clueComponent :isDrawer="isDrawer" :queryTime="queryTime"></clueComponent> <rightDrawer v-if="drawer"></rightDrawer>
</el-drawer> </el-drawer>
</div> </div>
</template> </template>
<script> <script>
import clueComponent from "@/components/clueManagement/clueComponent"; import rightDrawer from "../../components/workStatistics/rightDrawer.vue";
export default { export default {
components: { components: {
clueComponent rightDrawer,
},
data() {
return {
drawer: false,
isDrawer: true,
msg: {
month: "",
YearStr: "",
},
total: 0,
tableData: [],
loading: false,
rateLoading: false,
activeName: "monthdata",
rateData: [],
selfParams: {
queryTime: {},
},
};
},
provide() {
return {
selfParams: this.selfParams,
};
},
created() {
let d = new Date();
this.msg.month = d;
this.msg.YearStr = d.getFullYear();
},
mounted() {
this.init();
this.initRate();
},
methods: {
handleClose(done) {
done();
}, },
data() { // 查看详情
return { seeDetails(row, type = 0, val = "0") {
queryTime: { var d = new Date();
StartTime: '', var currentY = this.msg.YearStr;
EndTime: '' var currentM = this.msg.month;
}, if (row.DateStr.length == 2) {
drawer: false, currentM = "0" + row.DateStr.slice(0, 1);
isDrawer: true, } else {
msg: { currentM = row.DateStr.slice(0, 2);
month: "", }
YearStr: "", var MonthDayNum = new Date(currentY, currentM, 0).getDate(); //计算当月的天数
this.selfParams.queryTime.StartTime =
this.msg.YearStr + "-" + currentM + "-01";
this.selfParams.queryTime.EndTime =
currentY + "-" + currentM + "-" + MonthDayNum;
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/GetClueMonth",
this.msg,
(res) => {
this.loading = false;
this.tableData = res.data.data;
}, },
total: 0, (e) => {
tableData: [], this.loading = false;
loading: false, }
rateLoading: false, );
activeName: "monthdata",
rateData: [],
};
}, },
created() { initRate() {
let d = new Date(); if (this.rateLoading) return;
this.msg.month = d; this.rateLoading = true;
this.msg.YearStr = d.getFullYear(); this.apipost(
"/api/ClueStatic/GetClueMonthRate",
this.msg,
(res) => {
this.rateLoading = false;
this.rateData = res.data.data;
},
(e) => {
this.rateLoading = false;
}
);
}, },
mounted() { tableRowClassName({ row }) {
this.init(); let cname = "font-size-12";
this.initRate(); if (row.DateStr == "平均") {
cname += " xiaoji-row";
} else if (row.DateStr == "总数") {
cname += " sum-row";
}
return cname;
}, },
methods: { tableCellClassName({ row, column }) {
handleClose(done) { if (
done(); row[column.property] &&
}, row[column.property].toString().indexOf("-") != -1 &&
// 查看详情 column.property != "DateStr"
seeDetails(row) { ) {
var d = new Date(); return "warning-col";
var currentY = this.msg.YearStr; } else if (column.property == "InvalidCount") {
var currentM = this.msg.month;
if (row.DateStr.length == 2) {
currentM = '0' + row.DateStr.slice(0, 1)
} else {
currentM = row.DateStr.slice(0, 2)
}
var MonthDayNum = new Date(currentY, currentM, 0).getDate(); //计算当月的天数
this.queryTime.StartTime = this.msg.YearStr + '-' + currentM + '-01'
this.queryTime.EndTime = currentY + '-' + currentM + '-' + MonthDayNum
this.drawer = true
},
init() {
if (this.loading) return;
this.loading = true;
this.apipost(
"/api/ClueStatic/GetClueMonth",
this.msg,
(res) => {
this.loading = false;
this.tableData = res.data.data;
},
(e) => {
this.loading = false;
}
);
},
initRate() {
if (this.rateLoading) return;
this.rateLoading = true;
this.apipost(
"/api/ClueStatic/GetClueMonthRate",
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
}) {
if ( if (
row[column.property] && row[column.property].toString().indexOf("-") != -1 && parseFloat(row[column.property]) / parseFloat(row.PushCount) >=
column.property != "DateStr" 0.2
) { ) {
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) { },
this.msg.YearStr = val.getFullYear(); changeMonthHandler(val) {
this.init(); this.msg.YearStr = val.getFullYear();
this.initRate(); this.init();
}, this.initRate();
formatter(row, column) { },
return row[column.property] + "%"; formatter(row, column) {
}, return row[column.property] + "%";
handleCommand(command) { },
if (command == "1") { handleCommand(command) {
if (this.activeName == "monthdata") { if (command == "1") {
this.downloadHandler( if (this.activeName == "monthdata") {
"/api/ClueStatic/DownLoadClueMonth", this.downloadHandler(
"月度引流数据" "/api/ClueStatic/DownLoadClueMonth",
); "月度引流数据"
} else { );
this.downloadHandler( } else {
"/api/ClueStatic/DownLoadClueMonthRate", this.downloadHandler(
"月度引流成长率" "/api/ClueStatic/DownLoadClueMonthRate",
); "月度引流成长率"
} );
} }
}, }
downloadHandler(url, name) { },
this.GetLocalFile(url, this.msg, `${name}.xls`, (res) => { downloadHandler(url, name) {
this.$message({ this.GetLocalFile(url, this.msg, `${name}.xls`, (res) => {
message: "导出成功", this.$message({
type: "success", message: "导出成功",
}); type: "success",
}); });
}, });
}, },
}; },
};
</script> </script>
<style> <style>
@import "../../assets/css/customerManage.css"; @import "../../assets/css/customerManage.css";
.el-table__fixed-body-wrapper table { .el-table__fixed-body-wrapper table {
padding-bottom: 8px !important; 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;
} }
.diy-eltabs .el-tabs__content { .diy-eltabs .el-tabs__content {
height: calc(100% - 40px); height: calc(100% - 40px);
} }
.diy-eltabs .data-box-item { .diy-eltabs .data-box-item {
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
} }
.pointer { .pointer {
cursor: pointer; cursor: pointer;
} }
.pointer:hover { .pointer:hover {
color: #00b0f0; color: #00b0f0;
} }
</style> </style>
\ No newline at end of file
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