|
|
|
@ -57,18 +57,18 @@ class SaleStore {
|
|
|
|
|
fetch(config.HT_HOST + url)
|
|
|
|
|
.then((response) => response.json())
|
|
|
|
|
.then((json) => {
|
|
|
|
|
result.push(...json.result1);
|
|
|
|
|
if (!comm.empty(json.result2) && !comm.empty(date_moment.start_date_cp)) {
|
|
|
|
|
let diff_days = date_moment.start_date.diff(date_moment.start_date_cp, "days");
|
|
|
|
|
for (let item of json.result2) {
|
|
|
|
|
result.push({
|
|
|
|
|
COLI_Date: moment(item.COLI_Date).add(diff_days, "days").format(config.DATE_FORMAT),
|
|
|
|
|
COLI_YJLY: item.COLI_YJLY,
|
|
|
|
|
groups: item.groups,
|
|
|
|
|
key: item.key,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
result.push(...json.result1, ...json.result2);
|
|
|
|
|
// if (!comm.empty(json.result2) && !comm.empty(date_moment.start_date_cp)) {
|
|
|
|
|
// let diff_days = date_moment.start_date.diff(date_moment.start_date_cp, "days");
|
|
|
|
|
// for (let item of json.result2) {
|
|
|
|
|
// result.push({
|
|
|
|
|
// COLI_Date: moment(item.COLI_Date).add(diff_days, "days").format(config.DATE_FORMAT),
|
|
|
|
|
// COLI_YJLY: item.COLI_YJLY,
|
|
|
|
|
// groups: item.groups,
|
|
|
|
|
// key: item.key,
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
runInAction(() => {
|
|
|
|
|
this.ml_data = result;
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -119,7 +119,7 @@ class SaleStore {
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "成行率",
|
|
|
|
|
children: [{ title: "", dataIndex: "COLI_CJrate" }],
|
|
|
|
|
children: [{ title: comm.formatPercent(json.result1.reduce((a, b) => a + b.COLI_CJCount, 0) / json.result1.reduce((a, b) => a + b.COLI_OrderCount, 0)), dataIndex: "COLI_CJrate" }],
|
|
|
|
|
sorter: (a, b) => parseInt(b.COLI_CJrate) - parseInt(a.COLI_CJrate),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -144,6 +144,64 @@ class SaleStore {
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
result.dataSource = json.result1;
|
|
|
|
|
} else if (this.active_tab_key == "ResponseRateByWL") {
|
|
|
|
|
result.columns = [
|
|
|
|
|
{
|
|
|
|
|
title: "",
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
title: "",
|
|
|
|
|
dataIndex: "OPI_Name",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "首次报价回复率",
|
|
|
|
|
children: [{ title: "", dataIndex: "FirstRspRate" }],
|
|
|
|
|
sorter: (a, b) => parseInt(b.FirstRspRate) - parseInt(a.FirstRspRate),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "报价次数",
|
|
|
|
|
children: [{ title: json.result1.reduce((a, b) => a + b.PriceTime, 0), dataIndex: "PriceTime" }],
|
|
|
|
|
sorter: (a, b) => b.PriceTime - a.PriceTime,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "邮件发送次数",
|
|
|
|
|
children: [{ title: json.result1.reduce((a, b) => a + b.mailSendTime, 0), dataIndex: "mailSendTime" }],
|
|
|
|
|
sorter: (a, b) => b.mailSendTime - a.mailSendTime,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "WhatsApp客人会话次数",
|
|
|
|
|
children: [{ title: json.result1.reduce((a, b) => a + b.WhatsAppGuestChatCount, 0), dataIndex: "WhatsAppGuestChatCount" }],
|
|
|
|
|
sorter: (a, b) => b.WhatsAppGuestChatCount - a.WhatsAppGuestChatCount,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "WhatsApp外联会话次数",
|
|
|
|
|
children: [{ title: json.result1.reduce((a, b) => a + b.WhatsAppWLChatCount, 0), dataIndex: "WhatsAppWLChatCount" }],
|
|
|
|
|
sorter: (a, b) => b.WhatsAppWLChatCount - a.WhatsAppWLChatCount,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "WhatsApp新增客户数",
|
|
|
|
|
children: [{ title: json.result1.reduce((a, b) => a + b.WhatsAppNewGuestCount, 0), dataIndex: "WhatsAppNewGuestCount" }],
|
|
|
|
|
sorter: (a, b) => b.WhatsAppNewGuestCount - a.WhatsAppNewGuestCount,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "微信客人会话次数",
|
|
|
|
|
children: [{ title: json.result1.reduce((a, b) => a + b.WXGuestChatCount, 0), dataIndex: "WXGuestChatCount" }],
|
|
|
|
|
sorter: (a, b) => b.WXGuestChatCount - a.WXGuestChatCount,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "微信外联会话次数",
|
|
|
|
|
children: [{ title: json.result1.reduce((a, b) => a + b.WXWLChatCount, 0), dataIndex: "WXWLChatCount" }],
|
|
|
|
|
sorter: (a, b) => b.WXWLChatCount - a.WXWLChatCount,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "微信新增客户数",
|
|
|
|
|
children: [{ title: json.result1.reduce((a, b) => a + b.WXNewGuestCount, 0), dataIndex: "WXNewGuestCount" }],
|
|
|
|
|
sorter: (a, b) => b.WXNewGuestCount - a.WXNewGuestCount,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
result.dataSource = json.result1;
|
|
|
|
|
} else {
|
|
|
|
|
//if (this.active_tab_key == "Country")
|
|
|
|
|
//获取类型的项目,去掉重复,作为列名
|
|
|
|
|