Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CRM
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
华国豪
CRM
Commits
a3eb851c
Commit
a3eb851c
authored
May 20, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交明细数据页面
parent
69cc4865
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1324 additions
and
758 deletions
+1324
-758
App.vue
src/App.vue
+16
-5
Home.vue
src/components/Home.vue
+1
-9
clueComponent.vue
src/components/clueManagement/clueComponent.vue
+607
-538
rightDrawer.vue
src/components/workStatistics/rightDrawer.vue
+332
-0
dayStatistics.vue
src/views/workstatistics/dayStatistics.vue
+109
-26
monthStatistics.vue
src/views/workstatistics/monthStatistics.vue
+259
-180
No files found.
src/App.vue
View file @
a3eb851c
...
...
@@ -70,10 +70,13 @@ export default {
@import
url("//at.alicdn.com/t/font_1627123_grz80mbm3sv.css")
;
/* @import './assets/css/common.css'; */
@font-face
{
font-family
:
'iconfont'
;
/* Project id 1627123 */
src
:
url('//at.alicdn.com/t/font_1627123_zynqp2as0d.woff2?t=1652257333900')
format
(
'woff2'
),
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'
);
font-family
:
"iconfont"
;
/* Project id 1627123 */
src
:
url("//at.alicdn.com/t/font_1627123_zynqp2as0d.woff2?t=1652257333900")
format
(
"woff2"
),
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"
;
body
,
...
...
@@ -92,7 +95,15 @@ html {
.el-scrollbar
{
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
{
overflow
:
auto
!important
;
width
:
100%
;
...
...
src/components/Home.vue
View file @
a3eb851c
...
...
@@ -1104,15 +1104,7 @@ export default {
.loudou-card
.el-card__header
{
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
{
position
:
relative
!important
;
}
...
...
src/components/clueManagement/clueComponent.vue
View file @
a3eb851c
<
style
>
@import
'../../assets/css/customerManage.css'
;
@import
"../../assets/css/customerManage.css"
;
.el-table__fixed-body-wrapper
table
{
padding-bottom
:
8px
!important
;
}
.el-table__fixed-body-wrapper
table
{
padding-bottom
:
8px
!important
;
}
.clueTitle
{
padding
:
20px
20px
0
20px
;
}
.clueTitle
{
padding
:
20px
20px
0
20px
;
}
</
style
>
<
template
>
<div
class=
"customerManage"
>
<div
class=
"customerManage"
style=
"display:flex;flex-direction:column;height:100%;"
>
<div
class=
"tools"
>
<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>
<template
v-if=
"!isDrawer"
>
<div
style=
"width: 340px;"
>
...
...
@@ -113,13 +114,13 @@
</ul>
</div>
</div>
<div
class=
"page-content"
>
<div
class=
"page-content"
style=
"flex:1;"
>
<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>
</el-table>
<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"
>
<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"
>
...
...
@@ -254,544 +255,612 @@
</div>
</template>
<
script
>
import
mySelect
from
"../dialogModel/select"
;
import
customerInfoBox
from
"./customerInfoBox"
;
import
customerDialogBox
from
"./customerDialogBox"
;
import
guestDialogBox
from
"./guestDialogBox"
;
import
guestInfoBox
from
"./guestInfoBox"
;
import
importDialogBox
from
"./importDialogBox"
;
export
default
{
props
:
{
isDrawer
:
{
type
:
Boolean
,
default
:
false
,
},
queryTime
:
{
type
:
Object
,
default
:
null
}
import
mySelect
from
"../dialogModel/select"
;
import
customerInfoBox
from
"./customerInfoBox"
;
import
customerDialogBox
from
"./customerDialogBox"
;
import
guestDialogBox
from
"./guestDialogBox"
;
import
guestInfoBox
from
"./guestInfoBox"
;
import
importDialogBox
from
"./importDialogBox"
;
export
default
{
props
:
{
isDrawer
:
{
type
:
Boolean
,
default
:
false
,
},
queryTime
:
{
type
:
Object
,
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
:
{
handler
(
val
,
oldVal
)
{
this
.
queryTime
=
val
;
this
.
getList
()
},
deep
:
true
,
}
{
label
:
"线索来源"
,
show
:
true
,
},
components
:
{
mySelect
,
customerInfoBox
,
customerDialogBox
,
guestDialogBox
,
guestInfoBox
,
importDialogBox
,
{
label
:
"来源细分"
,
show
:
true
,
},
data
()
{
return
{
receiptType
:
{
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
:[],
//是否是线索管理员
};
{
label
:
"需求"
,
show
:
true
,
},
mounted
()
{
this
.
userInfo
=
this
.
getLocalStorage
();
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
()
{
label
:
"客户级别"
,
show
:
true
,
},
beforeDestroy
()
{
this
.
MsgBus
.
$off
(
'sceneSave'
);
this
.
MsgBus
.
$off
(
'editScene'
);
{
label
:
"联系人"
,
show
:
true
,
},
methods
:
{
// 获取线索管理详情
GetConfigCuleAdmin
()
{
this
.
apipost
(
'/api/Customer/GetConfigCuleAdmin'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
IsSelectAdminList
=
res
.
data
.
data
.
Content
.
split
(
','
)
if
(
this
.
IsSelectAdminList
.
indexOf
(
this
.
userInfo
.
EmployeeId
.
toString
())
!=-
1
){
this
.
msg
.
IsSelectAdmin
=
1
this
.
selectionList
.
forEach
(
item
=>
{
if
(
item
.
name
==
'转移'
){
item
.
show
=
false
}
})
this
.
getList
()
}
else
{
this
.
getList
()
}
}
else
{
this
.
getList
()
this
.
$message
.
error
(
res
.
data
.
message
)
}
})
},
handleClose
(
done
)
{
done
();
},
// 查看详情
seeDetails
(
row
)
{
this
.
drawer
=
true
this
.
queryTime
=
this
.
msg
.
YearStr
+
'-'
+
row
.
DateStr
},
changeWhere
(
item
)
{
this
.
msg
.
ID
=
item
.
ID
this
.
sceneID
=
item
.
ID
this
.
msg
.
Data
=
item
.
WhereData
?
JSON
.
parse
(
item
.
WhereData
)
:
{}
this
.
msg
.
WhereType
=
item
.
WhereType
this
.
visible
=
false
this
.
getList
()
},
GetSceneEmployeeList
()
{
this
.
apipost
(
'/api/Scene/GetSceneEmployeeList'
,
{
LableType
:
4
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
SceneEmployeeList
=
res
.
data
.
data
}
})
},
deleteScene
(
index
)
{
this
.
sceneList
.
splice
(
index
,
1
)
let
obj
=
{}
this
.
sceneList
.
forEach
(
element
=>
{
obj
[
element
.
name
]
=
element
});
this
.
msg
.
Data
=
obj
this
.
getList
()
},
handleCommand
(
command
)
{
this
.
CustomerId
=
0
if
(
command
===
'1'
)
{
this
.
dialogTableVisibleName
=
'新建线索'
this
.
dialogTableVisible
=
true
}
else
if
(
command
===
'2'
)
{
this
.
guestDialogBoxShow
=
true
}
else
if
(
command
===
'3'
)
{
this
.
importType
=
1
;
this
.
isShowImport
=
true
;
}
else
if
(
command
===
'4'
)
{
this
.
importType
=
2
;
this
.
isShowImport
=
true
;
}
},
Employee
()
{
let
msg
=
{
RB_Group_id
:
this
.
userInfo
.
RB_Group_id
,
BranchId
:
-
1
,
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
},
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
:
'已取消'
});
});
},
//导出
export
()
{
},
//转换为客户
waters
(
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
+
','
})
let
msg
=
{
CustomerIds
:
str
.
substring
(
0
,
str
.
length
-
1
),
CustomerType
:
this
.
msg
.
CustomerType
}
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
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
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
()
}
{
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
()
{
this
.
userInfo
=
this
.
getLocalStorage
();
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"
);
this
.
MsgBus
.
$off
(
"editScene"
);
},
methods
:
{
// 获取线索管理详情
GetConfigCuleAdmin
()
{
this
.
apipost
(
"/api/Customer/GetConfigCuleAdmin"
,
{},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
IsSelectAdminList
=
res
.
data
.
data
.
Content
.
split
(
","
);
if
(
this
.
IsSelectAdminList
.
indexOf
(
this
.
userInfo
.
EmployeeId
.
toString
()
)
!=
-
1
)
{
this
.
msg
.
IsSelectAdmin
=
1
;
this
.
selectionList
.
forEach
((
item
)
=>
{
if
(
item
.
name
==
"转移"
)
{
item
.
show
=
false
;
}
});
this
.
getList
();
}
else
{
this
.
getList
();
}
}
else
{
this
.
getList
();
this
.
$message
.
error
(
res
.
data
.
message
);
}
});
},
handleClose
(
done
)
{
done
();
},
// 查看详情
seeDetails
(
row
)
{
this
.
drawer
=
true
;
this
.
queryTime
=
this
.
msg
.
YearStr
+
"-"
+
row
.
DateStr
;
},
changeWhere
(
item
)
{
this
.
msg
.
ID
=
item
.
ID
;
this
.
sceneID
=
item
.
ID
;
this
.
msg
.
Data
=
item
.
WhereData
?
JSON
.
parse
(
item
.
WhereData
)
:
{};
this
.
msg
.
WhereType
=
item
.
WhereType
;
this
.
visible
=
false
;
this
.
getList
();
},
GetSceneEmployeeList
()
{
this
.
apipost
(
"/api/Scene/GetSceneEmployeeList"
,
{
LableType
:
4
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
SceneEmployeeList
=
res
.
data
.
data
;
}
}
);
},
deleteScene
(
index
)
{
this
.
sceneList
.
splice
(
index
,
1
);
let
obj
=
{};
this
.
sceneList
.
forEach
((
element
)
=>
{
obj
[
element
.
name
]
=
element
;
});
this
.
msg
.
Data
=
obj
;
this
.
getList
();
},
handleCommand
(
command
)
{
this
.
CustomerId
=
0
;
if
(
command
===
"1"
)
{
this
.
dialogTableVisibleName
=
"新建线索"
;
this
.
dialogTableVisible
=
true
;
}
else
if
(
command
===
"2"
)
{
this
.
guestDialogBoxShow
=
true
;
}
else
if
(
command
===
"3"
)
{
this
.
importType
=
1
;
this
.
isShowImport
=
true
;
}
else
if
(
command
===
"4"
)
{
this
.
importType
=
2
;
this
.
isShowImport
=
true
;
}
},
Employee
()
{
let
msg
=
{
RB_Group_id
:
this
.
userInfo
.
RB_Group_id
,
BranchId
:
-
1
,
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
)
{
this
.
dialogTableVisibleName
=
'修改线索'
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
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
;
{
this
.
isShowCustomerInfo
=
false
;
this
.
isShowGuestInfo
=
false
;
}
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
}
})
},
handleSizeChange
(
val
)
{
this
.
msg
.
pageSize
=
val
this
.
getList
();
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
multipleSelection
=
[];
this
.
$message
.
success
(
res
.
data
.
message
);
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
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
()
}
}
);
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消"
,
});
});
},
//导出
export
()
{},
//转换为客户
waters
(
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
+
","
;
});
let
msg
=
{
CustomerIds
:
str
.
substring
(
0
,
str
.
length
-
1
),
CustomerType
:
this
.
msg
.
CustomerType
,
};
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
)
{
this
.
multipleSelection
=
val
.
map
(
x
=>
x
.
CustomerId
)
);
})
.
catch
(()
=>
{
this
.
$message
({
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
>
src/components/workStatistics/rightDrawer.vue
0 → 100644
View file @
a3eb851c
<
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
>
src/views/workstatistics/dayStatistics.vue
View file @
a3eb851c
...
...
@@ -33,58 +33,118 @@
</
template
>
</template>
</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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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>
</div>
<el-drawer
:with-header=
"false"
size=
'
7
0%'
:visible
.
sync=
"drawer"
direction=
"rtl"
:before-close=
"handleClose"
>
<
clueComponent
:isDrawer=
"isDrawer"
:queryTime=
"queryTime"
></clueComponent
>
<el-drawer
:with-header=
"false"
size=
'
8
0%'
:visible
.
sync=
"drawer"
direction=
"rtl"
:before-close=
"handleClose"
>
<
rightDrawer
v-if=
"drawer"
></rightDrawer
>
</el-drawer>
</div>
</template>
<
script
>
import
clueComponent
from
"@/components/clueManagement/clueComponent
"
;
import
rightDrawer
from
"../../components/workStatistics/rightDrawer.vue
"
;
export
default
{
components
:
{
clueComponent
,
rightDrawer
,
},
data
()
{
return
{
queryTime
:
{
StartTime
:
""
,
EndTime
:
""
,
},
drawer
:
false
,
isDrawer
:
true
,
msg
:
{
...
...
@@ -95,6 +155,14 @@ export default {
total
:
0
,
tableData
:
[],
loading
:
false
,
selfParams
:
{
queryTime
:
{},
},
};
},
provide
()
{
return
{
selfParams
:
this
.
selfParams
,
};
},
created
()
{
...
...
@@ -111,15 +179,30 @@ export default {
done
();
},
// 查看详情
seeDetails
(
row
)
{
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
.
queryTime
.
StartTime
=
this
.
msg
.
YearStr
+
"-"
+
row
.
DateStr
;
this
.
queryTime
.
EndTime
=
this
.
msg
.
YearStr
+
"-"
+
row
.
DateStr
;
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
;
...
...
src/views/workstatistics/monthStatistics.vue
View file @
a3eb851c
...
...
@@ -36,37 +36,101 @@
</
template
>
</template>
</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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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>
</div>
...
...
@@ -108,196 +172,211 @@
</div>
</el-tab-pane>
</el-tabs>
<el-drawer
:with-header=
"false"
size=
'
7
0%'
:visible
.
sync=
"drawer"
direction=
"rtl"
:before-close=
"handleClose"
>
<
clueComponent
:isDrawer=
"isDrawer"
:queryTime=
"queryTime"
></clueComponent
>
<el-drawer
:with-header=
"false"
size=
'
8
0%'
:visible
.
sync=
"drawer"
direction=
"rtl"
:before-close=
"handleClose"
>
<
rightDrawer
v-if=
"drawer"
></rightDrawer
>
</el-drawer>
</div>
</template>
<
script
>
import
clueComponent
from
"@/components/clueManagement/clueComponent"
;
export
default
{
components
:
{
clueComponent
import
rightDrawer
from
"../../components/workStatistics/rightDrawer.vue"
;
export
default
{
components
:
{
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
{
queryTime
:
{
StartTime
:
''
,
EndTime
:
''
},
drawer
:
false
,
isDrawer
:
true
,
msg
:
{
month
:
""
,
YearStr
:
""
,
// 查看详情
seeDetails
(
row
,
type
=
0
,
val
=
"0"
)
{
var
d
=
new
Date
();
var
currentY
=
this
.
msg
.
YearStr
;
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
.
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
,
tableData
:
[],
loading
:
false
,
rateLoading
:
false
,
activeName
:
"monthdata"
,
rateData
:
[],
};
(
e
)
=>
{
this
.
loading
=
false
;
}
);
},
created
()
{
let
d
=
new
Date
();
this
.
msg
.
month
=
d
;
this
.
msg
.
YearStr
=
d
.
getFullYear
();
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
;
}
);
},
mounted
()
{
this
.
init
();
this
.
initRate
();
tableRowClassName
({
row
})
{
let
cname
=
"font-size-12"
;
if
(
row
.
DateStr
==
"平均"
)
{
cname
+=
" xiaoji-row"
;
}
else
if
(
row
.
DateStr
==
"总数"
)
{
cname
+=
" sum-row"
;
}
return
cname
;
},
methods
:
{
handleClose
(
done
)
{
done
();
},
// 查看详情
seeDetails
(
row
)
{
var
d
=
new
Date
();
var
currentY
=
this
.
msg
.
YearStr
;
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
})
{
tableCellClassName
({
row
,
column
})
{
if
(
row
[
column
.
property
]
&&
row
[
column
.
property
].
toString
().
indexOf
(
"-"
)
!=
-
1
&&
column
.
property
!=
"DateStr"
)
{
return
"warning-col"
;
}
else
if
(
column
.
property
==
"InvalidCount"
)
{
if
(
row
[
column
.
property
]
&&
row
[
column
.
property
].
toString
().
indexOf
(
"-"
)
!=
-
1
&&
column
.
property
!=
"DateStr"
parseFloat
(
row
[
column
.
property
])
/
parseFloat
(
row
.
PushCount
)
>=
0.2
)
{
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
();
this
.
init
();
this
.
initRate
();
},
formatter
(
row
,
column
)
{
return
row
[
column
.
property
]
+
"%"
;
},
handleCommand
(
command
)
{
if
(
command
==
"1"
)
{
if
(
this
.
activeName
==
"monthdata
"
)
{
this
.
downloadHandler
(
"/api/ClueStatic/DownLoadClueMonth"
,
"月度引流数据"
);
}
else
{
this
.
downloadHandler
(
"/api/ClueStatic/DownLoadClueMonthRate"
,
"月度引流成长率"
);
}
}
},
changeMonthHandler
(
val
)
{
this
.
msg
.
YearStr
=
val
.
getFullYear
();
this
.
init
();
this
.
initRate
();
},
formatter
(
row
,
column
)
{
return
row
[
column
.
property
]
+
"%"
;
},
handleCommand
(
command
)
{
if
(
command
==
"1
"
)
{
if
(
this
.
activeName
==
"monthdata"
)
{
this
.
downloadHandler
(
"/api/ClueStatic/DownLoadClueMonth"
,
"月度引流数据"
);
}
else
{
this
.
downloadHandler
(
"/api/ClueStatic/DownLoadClueMonthRate"
,
"月度引流成长率"
);
}
}
,
downloadHandler
(
url
,
name
)
{
this
.
GetLocalFile
(
url
,
this
.
msg
,
`
${
name
}
.xls`
,
(
res
)
=>
{
this
.
$message
(
{
message
:
"导出成功"
,
type
:
"success
"
,
});
}
},
downloadHandler
(
url
,
name
)
{
this
.
GetLocalFile
(
url
,
this
.
msg
,
`
${
name
}
.xls`
,
(
res
)
=>
{
this
.
$message
({
message
:
"导出成功
"
,
type
:
"success"
,
});
}
,
}
);
},
};
},
};
</
script
>
<
style
>
@import
"../../assets/css/customerManage.css"
;
@import
"../../assets/css/customerManage.css"
;
.el-table__fixed-body-wrapper
table
{
padding-bottom
:
8px
!important
;
}
.el-table__fixed-body-wrapper
table
{
padding-bottom
:
8px
!important
;
}
.el-table
.xiaoji-row
{
background
:
#ffff00
;
}
.el-table
.xiaoji-row
{
background
:
#ffff00
;
}
.el-table
.sum-row
{
background
:
#00b0f0
;
}
.el-table
.sum-row
{
background
:
#00b0f0
;
}
.el-table
.warning-col
{
background
:
red
;
}
.el-table
.warning-col
{
background
:
red
;
}
.diy-eltabs
.el-tabs__content
{
height
:
calc
(
100%
-
40px
);
}
.diy-eltabs
.el-tabs__content
{
height
:
calc
(
100%
-
40px
);
}
.diy-eltabs
.data-box-item
{
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
}
.diy-eltabs
.data-box-item
{
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
}
.pointer
{
cursor
:
pointer
;
}
.pointer
{
cursor
:
pointer
;
}
.pointer
:hover
{
color
:
#00b0f0
;
}
</
style
>
\ No newline at end of file
.pointer
:hover
{
color
:
#00b0f0
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment