Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3bfcc0e9
authored
Dec 14, 2022
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
列表表头表单搜索统一
1 parent
a551b0ff
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
1347 additions
and
1275 deletions
linkwe-pc/src/components/common/BaiduMap.vue
linkwe-pc/src/views/application/groupFission/list.vue
linkwe-pc/src/views/application/taskGroup/list.vue
linkwe-pc/src/views/commodityCenter/commodityManage/list.vue
linkwe-pc/src/views/commodityCenter/orderManage/list.vue
linkwe-pc/src/views/communityOperating/keywords/list.vue
linkwe-pc/src/views/communityOperating/newCustomer/list.vue
linkwe-pc/src/views/communityOperating/oldCustomer/list.vue
linkwe-pc/src/views/conversation/content/customer.vue
linkwe-pc/src/views/conversation/content/global.vue
linkwe-pc/src/views/conversation/security/sensitiveList.vue
linkwe-pc/src/views/customerManage/customer.vue
linkwe-pc/src/views/customerManage/dimission/allocatedStaffDetail.vue
linkwe-pc/src/views/customerManage/dimission/allocatedStaffList.vue
linkwe-pc/src/views/customerManage/dimission/index.vue
linkwe-pc/src/views/customerManage/group.vue
linkwe-pc/src/views/customerManage/lossRemind.vue
linkwe-pc/src/views/drainageCode/group/customer.vue
linkwe-pc/src/views/drainageCode/group/list.vue
linkwe-pc/src/views/drainageCode/highSeas/index.vue
linkwe-pc/src/views/drainageCode/store/add.vue
linkwe-pc/src/views/drainageCode/welcome/components/Tab.vue
linkwe-pc/src/views/friendCircle/enterprise.vue
linkwe-pc/src/views/friendCircle/index.vue
linkwe-pc/src/views/redPacketTool/enterprisePacket.vue
linkwe-pc/src/views/redPacketTool/sendRecord/Customer.vue
linkwe-pc/src/views/redPacketTool/sendRecord/Group.vue
linkwe-pc/src/components/common/BaiduMap.vue
View file @
3bfcc0e
<
template
>
<div>
<el-form-item
label=
"详细地址"
prop=
"address"
>
<el-autocomplete
:disabled=
"isDetail"
@
change=
"setChange"
v-model=
"form.address"
style=
"width:500px;"
popper-class=
"autoAddressClass"
:fetch-suggestions=
"querySearchAsync"
:trigger-on-focus=
"false"
placeholder=
"详细地址"
clearable
@
select=
"handleSelect"
>
<el-autocomplete
:disabled=
"isDetail"
@
change=
"setChange"
v-model=
"form.address"
style=
"width: 500px;"
popper-class=
"autoAddressClass"
:fetch-suggestions=
"querySearchAsync"
:trigger-on-focus=
"false"
placeholder=
"详细地址"
clearable
@
select=
"handleSelect"
>
<template
slot-scope=
"
{ item }">
<i
class=
"el-icon-search fl mgr10"
/>
<div
style=
"overflow:hidden;"
>
<div
style=
"overflow:
hidden;"
>
<div
class=
"title"
>
{{
item
.
title
}}
</div>
<span
class=
"address ellipsis"
>
{{
item
.
address
}}
</span>
</div>
...
...
@@ -12,7 +23,7 @@
</el-autocomplete>
</el-form-item>
<el-form-item
label=
""
>
<div
id=
"map-container"
style=
"width:
500px;height:
300px;"
/>
<div
id=
"map-container"
style=
"width:
500px; height:
300px;"
/>
</el-form-item>
</div>
</template>
...
...
@@ -21,14 +32,15 @@
/* eslint-disable */
import
loadBMap
from
'@/utils/baiduMap.js'
export
default
{
data
()
{
data
()
{
return
{
form
:
{
province
:
''
,
city
:
''
,
area
:
''
,
address
:
''
,
// 详细地址
addrPoint
:
{
// 详细地址经纬度
addrPoint
:
{
// 详细地址经纬度
lng
:
0
,
lat
:
0
}
...
...
@@ -41,7 +53,7 @@
props
:
{
initData
:
{
type
:
Object
,
default
:
()
=>
{
}
default
:
()
=>
{}
},
isDetail
:
{
type
:
Boolean
,
...
...
@@ -50,34 +62,107 @@
},
watch
:
{
initData
:
{
handler
(
value
)
{
handler
(
value
)
{
if
(
this
.
initData
.
address
)
{
this
.
form
.
address
=
this
.
initData
.
address
this
.
form
.
addrPoint
.
lng
=
this
.
initData
.
longitude
this
.
form
.
addrPoint
.
lat
=
this
.
initData
.
latitude
if
(
this
.
initData
.
longitude
&&
this
.
initData
.
latitude
)
{
this
.
form
.
addrPoint
.
lng
=
this
.
initData
.
longitude
this
.
form
.
addrPoint
.
lat
=
this
.
initData
.
latitude
}
else
{
let
detailAddress
=
this
.
initData
.
area
+
this
.
initData
.
address
this
.
getPoint
(
detailAddress
)
}
this
.
initMap
()
}
},
immediate
:
true
,
immediate
:
true
}
},
async
mounted
()
{
async
mounted
()
{
// 百度地图AK: GeDsF2XGs01U0bUSpFIUCmvyNoYuGC3P
await
loadBMap
(
'GeDsF2XGs01U0bUSpFIUCmvyNoYuGC3P'
)
// 加载引入BMap
if
(
this
.
initData
.
address
)
{
this
.
form
.
address
=
this
.
initData
.
address
this
.
form
.
addrPoint
.
lng
=
this
.
initData
.
longitude
this
.
form
.
addrPoint
.
lat
=
this
.
initData
.
latitude
if
(
this
.
initData
.
longitude
&&
this
.
initData
.
latitude
)
{
this
.
form
.
addrPoint
.
lng
=
this
.
initData
.
longitude
this
.
form
.
addrPoint
.
lat
=
this
.
initData
.
latitude
}
else
{
let
detailAddress
=
this
.
initData
.
area
+
this
.
initData
.
address
this
.
getPoint
(
detailAddress
)
}
}
this
.
initMap
()
},
methods
:
{
getCity
(
str
)
{
if
(
str
)
{
let
area
=
{}
let
index11
=
0
let
index1
=
str
.
indexOf
(
'省'
)
if
(
index1
==
-
1
)
{
index11
=
str
.
indexOf
(
'自治区'
)
if
(
index11
!=
-
1
)
{
area
.
Province
=
str
.
substring
(
0
,
index11
+
3
)
}
else
{
area
.
Province
=
str
.
substring
(
0
,
0
)
}
}
else
{
area
.
Province
=
str
.
substring
(
0
,
index1
+
1
)
}
let
index2
=
str
.
indexOf
(
'市'
)
if
(
index11
==
-
1
)
{
area
.
City
=
str
.
substring
(
index11
+
1
,
index2
+
1
)
}
else
{
if
(
index11
==
0
)
{
area
.
City
=
str
.
substring
(
index1
+
1
,
index2
+
1
)
}
else
{
area
.
City
=
str
.
substring
(
index11
+
3
,
index2
+
1
)
}
}
let
index3
=
str
.
indexOf
(
'区'
)
if
(
index3
==
-
1
)
{
index3
=
str
.
indexOf
(
'县'
)
if
(
index3
==
-
1
)
{
index3
=
str
.
indexOf
(
'旗'
)
area
.
Country
=
str
.
substring
(
index2
+
1
,
index3
+
1
)
}
else
{
area
.
Country
=
str
.
substring
(
index2
+
1
,
index3
+
1
)
}
}
else
{
area
.
Country
=
str
.
substring
(
index2
+
1
,
index3
+
1
)
}
return
area
.
City
}
else
{
return
''
}
},
getPoint
(
str
)
{
var
that
=
this
var
myGeo
=
new
BMap
.
Geocoder
()
myGeo
.
getPoint
(
str
,
function
(
point
)
{
if
(
point
)
{
that
.
form
.
addrPoint
=
point
that
.
$emit
(
'point'
,
point
)
}
else
{
// alert('您选择的地址没有解析到结果!')
}
},
that
.
getCity
(
str
)
)
},
// 初始化地图
initMap
()
{
initMap
()
{
var
that
=
this
// 1、挂载地图
this
.
map
=
new
BMap
.
Map
(
'map-container'
,
{
enableMapClick
:
false
})
var
point
=
new
BMap
.
Point
(
this
.
form
.
addrPoint
.
lng
||
117.2334414073489
,
this
.
form
.
addrPoint
.
lat
||
31.826578293886
)
var
point
=
new
BMap
.
Point
(
this
.
form
.
addrPoint
.
lng
||
117.2334414073489
,
this
.
form
.
addrPoint
.
lat
||
31.826578293886
)
this
.
map
.
centerAndZoom
(
point
,
19
)
// 3、设置图像标注并绑定拖拽标注结束后事件
this
.
mk
=
new
BMap
.
Marker
(
point
,
{
enableDragging
:
true
})
...
...
@@ -86,7 +171,9 @@
that
.
getAddrByPoint
(
e
.
point
)
})
// 4、添加(右上角)平移缩放控件
this
.
map
.
addControl
(
new
BMap
.
NavigationControl
({
anchor
:
BMAP_ANCHOR_TOP_RIGHT
,
type
:
BMAP_NAVIGATION_CONTROL_SMALL
}))
this
.
map
.
addControl
(
new
BMap
.
NavigationControl
({
anchor
:
BMAP_ANCHOR_TOP_RIGHT
,
type
:
BMAP_NAVIGATION_CONTROL_SMALL
})
)
// 5、添加(左下角)定位控件
var
geolocationControl
=
new
BMap
.
GeolocationControl
({
anchor
:
BMAP_ANCHOR_BOTTOM_LEFT
})
geolocationControl
.
addEventListener
(
'locationSuccess'
,
function
(
e
)
{
...
...
@@ -104,32 +191,34 @@
})
},
// 获取两点间的距离
getDistancs
(
pointA
,
pointB
)
{
getDistancs
(
pointA
,
pointB
)
{
return
this
.
map
.
getDistance
(
pointA
,
pointB
).
toFixed
(
2
)
},
// 浏览器定位函数
geolocation
()
{
geolocation
()
{
if
(
!
this
.
isDetail
)
{
var
that
=
this
var
geolocation
=
new
BMap
.
Geolocation
()
geolocation
.
getCurrentPosition
(
function
(
res
)
{
if
(
this
.
getStatus
()
==
BMAP_STATUS_SUCCESS
)
{
that
.
getAddrByPoint
(
res
.
point
)
that
.
locationPoint
=
res
.
point
}
else
{
alert
(
'failed'
+
this
.
getStatus
())
that
.
locationPoint
=
new
BMap
.
Point
(
117.2334414073489
,
31.826578293886
)
}
},
{
enableHighAccuracy
:
true
})
geolocation
.
getCurrentPosition
(
function
(
res
)
{
if
(
this
.
getStatus
()
==
BMAP_STATUS_SUCCESS
)
{
that
.
getAddrByPoint
(
res
.
point
)
that
.
locationPoint
=
res
.
point
}
else
{
alert
(
'failed'
+
this
.
getStatus
())
that
.
locationPoint
=
new
BMap
.
Point
(
117.2334414073489
,
31.826578293886
)
}
},
{
enableHighAccuracy
:
true
}
)
}
},
// 2、逆地址解析函数
getAddrByPoint
(
point
)
{
getAddrByPoint
(
point
)
{
if
(
!
this
.
isDetail
)
{
var
that
=
this
var
geco
=
new
BMap
.
Geocoder
()
geco
.
getLocation
(
point
,
function
(
res
)
{
console
.
log
(
res
)
that
.
mk
.
setPosition
(
point
)
that
.
map
.
panTo
(
point
)
that
.
form
.
address
=
that
.
splitName
(
res
.
address
)
...
...
@@ -139,7 +228,7 @@
}
},
// 8-1、地址搜索
querySearchAsync
(
str
,
cb
)
{
querySearchAsync
(
str
,
cb
)
{
var
options
=
{
onSearchComplete
:
function
(
res
)
{
var
s
=
[]
...
...
@@ -156,13 +245,13 @@
var
local
=
new
BMap
.
LocalSearch
(
this
.
map
,
options
)
local
.
search
(
str
)
},
splitName
(
str
)
{
splitName
(
str
)
{
if
(
str
)
{
let
area
=
{}
let
index11
=
0
let
index1
=
str
.
indexOf
(
"省"
)
let
index1
=
str
.
indexOf
(
'省'
)
if
(
index1
==
-
1
)
{
index11
=
str
.
indexOf
(
"自治区"
)
index11
=
str
.
indexOf
(
'自治区'
)
if
(
index11
!=
-
1
)
{
area
.
Province
=
str
.
substring
(
0
,
index11
+
3
)
}
else
{
...
...
@@ -171,8 +260,8 @@
}
else
{
area
.
Province
=
str
.
substring
(
0
,
index1
+
1
)
}
let
index2
=
str
.
indexOf
(
"市"
)
let
index2
=
str
.
indexOf
(
'市'
)
if
(
index11
==
-
1
)
{
area
.
City
=
str
.
substring
(
index11
+
1
,
index2
+
1
)
}
else
{
...
...
@@ -182,10 +271,10 @@
area
.
City
=
str
.
substring
(
index11
+
3
,
index2
+
1
)
}
}
let
index3
=
str
.
indexOf
(
"区"
)
let
index3
=
str
.
indexOf
(
'区'
)
if
(
index3
==
-
1
)
{
index3
=
str
.
indexOf
(
"县"
)
index3
=
str
.
indexOf
(
'县'
)
if
(
index3
==
-
1
)
{
index3
=
str
.
indexOf
(
'旗'
)
area
.
Country
=
str
.
substring
(
index2
+
1
,
index3
+
1
)
...
...
@@ -197,9 +286,9 @@
}
let
data
=
area
.
Province
+
area
.
City
+
area
.
Country
if
(
area
.
Province
)
{
this
.
form
.
province
=
area
.
Province
this
.
form
.
province
=
area
.
Province
}
if
(
area
.
c
ity
)
{
if
(
area
.
C
ity
)
{
this
.
form
.
city
=
area
.
City
}
this
.
form
.
area
=
area
.
Country
...
...
@@ -209,7 +298,7 @@
}
},
// 8-2、选择地址
handleSelect
(
item
)
{
handleSelect
(
item
)
{
this
.
form
.
province
=
item
.
province
this
.
form
.
city
=
item
.
city
this
.
form
.
address
=
this
.
splitName
(
item
.
address
)
+
item
.
title
...
...
@@ -220,7 +309,7 @@
this
.
map
.
panTo
(
item
.
point
)
this
.
onSubmit
()
},
setChange
(
data
)
{
setChange
(
data
)
{
if
(
!
data
)
{
this
.
form
=
{
address
:
''
,
...
...
@@ -232,7 +321,7 @@
this
.
onSubmit
()
}
},
onSubmit
()
{
onSubmit
()
{
this
.
$emit
(
'update'
,
this
.
form
)
}
}
...
...
@@ -260,4 +349,4 @@
}
}
}
</
style
>
\ No newline at end of file
</
style
>
linkwe-pc/src/views/application/groupFission/list.vue
View file @
3bfcc0e
...
...
@@ -84,10 +84,11 @@
<div
class=
"app-container"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
class=
"top-search"
size=
"small"
>
<el-form-item
label=
"裂变名"
prop=
"taskName"
>
<el-input
v-model=
"query.taskName"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.taskName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"添加日期"
>
<el-date-picker
clearable
v-model=
"dateRange"
@
change=
"setChange"
type=
"daterange"
...
...
linkwe-pc/src/views/application/taskGroup/list.vue
View file @
3bfcc0e
...
...
@@ -3,7 +3,7 @@
export
default
{
name
:
'Group'
,
data
()
{
data
()
{
return
{
query
:
{
pageNum
:
1
,
...
...
@@ -11,15 +11,15 @@
taskName
:
''
,
startTime
:
''
,
overTime
:
''
,
fissionType
:
1
,
fissionType
:
1
},
dateRange
:
[],
tableData
:
[],
total
:
0
,
loading
:
false
,
loading
:
false
}
},
created
()
{
created
()
{
this
.
getList
()
this
.
$store
.
dispatch
(
...
...
@@ -30,7 +30,7 @@
)
},
methods
:
{
setChange
(
e
)
{
setChange
(
e
)
{
if
(
e
)
{
this
.
query
.
startTime
=
e
[
0
]
this
.
query
.
overTime
=
e
[
1
]
...
...
@@ -39,19 +39,19 @@
this
.
query
.
overTime
=
''
}
},
resetFn
()
{
resetFn
()
{
this
.
query
=
{
pageNum
:
1
,
pageSize
:
10
,
taskName
:
''
,
startTime
:
''
,
overTime
:
''
,
fissionType
:
1
,
fissionType
:
1
}
this
.
dateRange
=
[]
this
.
getList
()
},
getList
(
data
)
{
getList
(
data
)
{
this
.
loading
=
true
let
params
=
Object
.
assign
({},
this
.
query
,
data
)
api
.
getList
(
params
).
then
(({
rows
,
total
})
=>
{
...
...
@@ -60,23 +60,23 @@
this
.
loading
=
false
})
},
resetForm
()
{
},
toDetail
(
row
)
{
resetForm
()
{
},
toDetail
(
row
)
{
this
.
$router
.
push
({
path
:
`detail?id=
${
row
.
id
}
`
,
path
:
`detail?id=
${
row
.
id
}
`
})
},
newAdd
()
{
newAdd
()
{
this
.
$router
.
push
({
path
:
'add'
,
path
:
'add'
})
},
toEdit
(
row
)
{
toEdit
(
row
)
{
this
.
$router
.
push
({
path
:
`add?id=
${
row
.
id
}
`
,
path
:
`add?id=
${
row
.
id
}
`
})
}
,
}
,
}
}
}
</
script
>
...
...
@@ -84,16 +84,37 @@
<div
class=
"app-container"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
class=
"top-search"
size=
"small"
>
<el-form-item
label=
"任务名"
prop=
"taskName"
>
<el-input
v-model=
"query.taskName"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.taskName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"添加日期"
>
<el-date-picker
v-model=
"dateRange"
@
change=
"setChange"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
align=
"right"
></el-date-picker>
<el-date-picker
clearable
v-model=
"dateRange"
@
change=
"setChange"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
align=
"right"
></el-date-picker>
</el-form-item>
<el-form-item
label=
" "
>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
:loading=
"loading"
@
click=
"getList(
{ pageNum: 1 })">查询
</el-button>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
:loading=
"loading"
@
click=
"getList(
{ pageNum: 1 })"
>查询
</el-button
>
<el-button
@
click=
"resetFn"
type=
"success"
>
清空
</el-button>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
@
click=
"newAdd()"
style=
"background: #fa7216; color: #ffffff; border-color: #fa7216"
>
新增任务
</el-button>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
@
click=
"newAdd()"
style=
"background: #fa7216; color: #ffffff; border-color: #fa7216;"
>
新增任务
</el-button
>
</el-form-item>
</el-form>
<el-table
:data=
"tableData"
>
...
...
@@ -103,7 +124,15 @@
<template
slot-scope=
"scope"
>
<!-- -1-发送失败 0-待发送 1-进行中 2-已结束 -->
<p>
{{
scope
.
row
.
fissStatus
===
1
?
'进行中'
:
scope
.
row
.
fissStatus
===
-
1
?
'发送失败'
:
scope
.
row
.
fissStatus
===
0
?
'待发送'
:
'已结束'
}}
{{
scope
.
row
.
fissStatus
===
1
?
'进行中'
:
scope
.
row
.
fissStatus
===
-
1
?
'发送失败'
:
scope
.
row
.
fissStatus
===
0
?
'待发送'
:
'已结束'
}}
</p>
</
template
>
</el-table-column>
...
...
@@ -114,7 +143,13 @@
</el-table-column>
<el-table-column
prop=
"operation"
label=
"操作"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"toDetail(scope.row)"
v-hasPermi=
"['enterpriseWechat:view']"
size=
"medium"
type=
"text"
icon=
"el-icon-view"
></el-button>
<el-button
@
click=
"toDetail(scope.row)"
v-hasPermi=
"['enterpriseWechat:view']"
size=
"medium"
type=
"text"
icon=
"el-icon-view"
></el-button>
<!--
<el-button
v-if=
"scope.row.fissStatus != 2"
@
click=
"toEdit(scope.row)"
...
...
@@ -127,7 +162,13 @@
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
</div>
</template>
...
...
linkwe-pc/src/views/commodityCenter/commodityManage/list.vue
View file @
3bfcc0e
...
...
@@ -154,7 +154,7 @@
<div
class=
"g-card g-pad20"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"110px"
class=
"top-search"
>
<el-form-item
label=
"商品名称或描述"
prop=
"name"
>
<el-input
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
" "
>
<el-button
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
...
...
linkwe-pc/src/views/commodityCenter/orderManage/list.vue
View file @
3bfcc0e
...
...
@@ -2,13 +2,13 @@
<div
class=
"g-card g-pad20"
>
<el-form
:inline=
"true"
label-width=
"110px"
class=
"top-search"
>
<el-form-item
label=
"商品名称或描述"
prop=
"productName"
>
<el-input
v-model=
"query.productName"
placeholder=
"请输入商品名称或描述"
></el-input>
<el-input
clearable
v-model=
"query.productName"
placeholder=
"请输入商品名称或描述"
></el-input>
</el-form-item>
<el-form-item
label=
"客户名称"
prop=
"externalName"
>
<el-input
v-model=
"query.externalName"
placeholder=
"请输入客户名称"
></el-input>
<el-input
clearable
v-model=
"query.externalName"
placeholder=
"请输入客户名称"
></el-input>
</el-form-item>
<el-form-item
label=
"收款员工"
prop=
"name"
>
<el-input
:value=
"qrUserName"
readonly
@
focus=
"dialogVisibleSelect = true"
placeholder=
"请选择员工"
/>
<el-input
clearable
:value=
"qrUserName"
readonly
@
focus=
"dialogVisibleSelect = true"
placeholder=
"请选择员工"
/>
</el-form-item>
<el-form-item
label=
"交易状态"
prop=
"name"
>
<el-select
v-model=
"query.orderState"
:popper-append-to-body=
"false"
>
...
...
@@ -32,6 +32,7 @@
</el-form-item>
<el-form-item
label=
"交易时间"
prop=
"name"
>
<el-date-picker
clearable
v-model=
"dateRange"
type=
"daterange"
value-format=
"yyyy-MM-dd"
...
...
linkwe-pc/src/views/communityOperating/keywords/list.vue
View file @
3bfcc0e
...
...
@@ -151,16 +151,17 @@
<div>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
<el-form-item
label=
"活码名称"
prop=
"taskName"
>
<el-input
v-model=
"query.taskName"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.taskName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"创建人"
prop=
"createBy"
>
<el-input
v-model=
"query.createBy"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.createBy"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"关键词"
prop=
"keywords"
>
<el-input
v-model=
"query.keywords"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.keywords"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-date-picker
clearable
v-model=
"dateRange"
value-format=
"yyyy-MM-dd"
type=
"daterange"
...
...
linkwe-pc/src/views/communityOperating/newCustomer/list.vue
View file @
3bfcc0e
<
script
>
import
{
getList
,
remove
,
download
,
downloadBatch
}
from
'@/api/communityOperating/newCustomer'
import
{
getList
,
remove
,
download
,
downloadBatch
}
from
'@/api/communityOperating/newCustomer'
export
default
{
components
:
{},
props
:
{},
data
()
{
return
{
query
:
{
pageNum
:
1
,
pageSize
:
10
,
emplCodeName
:
''
,
// 活码名称
createBy
:
''
,
// 创建人
beginTime
:
''
,
// 开始日期
endTime
:
''
// 结束日期
},
dateRange
:
[],
// 添加日期
total
:
0
,
// 数据总量
form
:
{},
list
:
[],
dialogVisible
:
false
,
disabled
:
false
,
loading
:
false
,
status
:
[
'正常'
,
'停用'
],
pushType
:
{
0
:
'发给客户'
,
1
:
'发给客户群'
},
queryUser
:
[],
// 搜索框选择的添加人
ids
:
[]
}
},
computed
:
{},
watch
:
{
// 日期选择器数据同步至查询参数
dateRange
(
dateRange
)
{
if
(
!
dateRange
||
dateRange
.
length
!==
2
)
{
this
.
query
.
beginTime
=
''
this
.
query
.
endTime
=
''
}
else
{
;[
this
.
query
.
beginTime
,
this
.
query
.
endTime
]
=
dateRange
export
default
{
components
:
{},
props
:
{},
data
()
{
return
{
query
:
{
pageNum
:
1
,
pageSize
:
10
,
emplCodeName
:
''
,
// 活码名称
createBy
:
''
,
// 创建人
beginTime
:
''
,
// 开始日期
endTime
:
''
// 结束日期
},
dateRange
:
[],
// 添加日期
total
:
0
,
// 数据总量
form
:
{},
list
:
[],
dialogVisible
:
false
,
disabled
:
false
,
loading
:
false
,
status
:
[
'正常'
,
'停用'
],
pushType
:
{
0
:
'发给客户'
,
1
:
'发给客户群'
},
queryUser
:
[],
// 搜索框选择的添加人
ids
:
[]
}
}
},
created
()
{
this
.
getList
()
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
},
computed
:
{},
watch
:
{
// 日期选择器数据同步至查询参数
dateRange
(
dateRange
)
{
if
(
!
dateRange
||
dateRange
.
length
!==
2
)
{
this
.
query
.
beginTime
=
''
this
.
query
.
endTime
=
''
}
else
{
;[
this
.
query
.
beginTime
,
this
.
query
.
endTime
]
=
dateRange
}
}
},
created
()
{
this
.
getList
()
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
<div>指在客户通过员工活码加为好友后,员工自动推送入群引导语和群活码,客户可通过群活码扫码入群。</div>
`
)
},
mounted
()
{
// new clipboard(".copy-btn");
},
methods
:
{
// 获取新客数据
getList
(
page
)
{
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
getList
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
+
total
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
// 新建/编辑新客数据
goRoute
(
id
)
{
this
.
$router
.
push
({
path
:
'newCustomerAev'
,
query
:
{
id
}
})
)
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
id
)
mounted
()
{
// new clipboard(".copy-btn");
},
/** 删除按钮操作 */
remove
(
id
)
{
const
ids
=
id
||
this
.
ids
this
.
$confirm
(
'是否确认删除?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
function
()
{
return
remove
(
ids
)
})
.
then
(()
=>
{
this
.
getList
()
this
.
msgSuccess
(
'删除成功'
)
methods
:
{
// 获取新客数据
getList
(
page
)
{
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
getList
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
+
total
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
// 新建/编辑新客数据
goRoute
(
id
)
{
this
.
$router
.
push
({
path
:
'newCustomerAev'
,
query
:
{
id
}
})
.
catch
(
function
()
{})
},
// 下载
download
(
data
)
{
let
name
=
data
.
codeName
+
'.png'
download
(
data
.
id
).
then
((
res
)
=>
{
if
(
res
!=
null
)
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/zip'
})
let
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
// 创建a标签
link
.
href
=
url
link
.
download
=
name
// 重命名文件
link
.
click
()
URL
.
revokeObjectURL
(
url
)
// 释放内存
}
})
},
// 批量下载
downloadBatch
()
{
this
.
$confirm
(
'是否确认下载所有活码图片吗?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
return
downloadBatch
(
this
.
ids
+
''
)
// window.open(downloadBatch(this.ids))
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
id
)
},
/** 删除按钮操作 */
remove
(
id
)
{
const
ids
=
id
||
this
.
ids
this
.
$confirm
(
'是否确认删除?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
((
res
)
=>
{
.
then
(
function
()
{
return
remove
(
ids
)
})
.
then
(()
=>
{
this
.
getList
()
this
.
msgSuccess
(
'删除成功'
)
})
.
catch
(
function
()
{})
},
// 下载
download
(
data
)
{
let
name
=
data
.
codeName
+
'.png'
download
(
data
.
id
).
then
((
res
)
=>
{
if
(
res
!=
null
)
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/zip'
})
let
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
// 创建a标签
link
.
href
=
url
link
.
download
=
'批量员工活码.zip'
// 重命名文件
link
.
download
=
name
// 重命名文件
link
.
click
()
URL
.
revokeObjectURL
(
url
)
// 释放内存
}
})
.
catch
(
function
()
{})
},
// 重置查询参数
resetQuery
()
{
this
.
dateRange
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
},
// 批量下载
downloadBatch
()
{
this
.
$confirm
(
'是否确认下载所有活码图片吗?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
return
downloadBatch
(
this
.
ids
+
''
)
// window.open(downloadBatch(this.ids))
})
.
then
((
res
)
=>
{
if
(
res
!=
null
)
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/zip'
})
let
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
// 创建a标签
link
.
href
=
url
link
.
download
=
'批量员工活码.zip'
// 重命名文件
link
.
click
()
URL
.
revokeObjectURL
(
url
)
// 释放内存
}
})
.
catch
(
function
()
{})
},
// 重置查询参数
resetQuery
()
{
this
.
dateRange
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
$nextTick
(()
=>
{
this
.
getList
(
1
)
})
this
.
$nextTick
(()
=>
{
this
.
getList
(
1
)
})
}
}
}
}
</
script
>
<
template
>
<div>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
<el-form-item
label=
"活码名称"
prop=
"emplCodeName"
>
<el-input
v-model=
"query.emplCodeName"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.emplCodeName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"创建人"
prop=
"createBy"
>
<el-input
v-model=
"query.createBy"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.createBy"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-date-picker
clearable
v-model=
"dateRange"
value-format=
"yyyy-MM-dd"
type=
"daterange"
...
...
@@ -179,14 +173,8 @@ export default {
></el-date-picker>
</el-form-item>
<el-form-item
label=
" "
>
<el-button
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button
>
<el-button
type=
"success"
@
click=
"resetQuery()"
>
重置
</el-button
>
<el-button
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<el-button
type=
"success"
@
click=
"resetQuery()"
>
重置
</el-button>
</el-form-item>
</el-form>
...
...
@@ -195,15 +183,8 @@ export default {
<el-button
type=
"primary"
@
click=
"goRoute()"
>
新建活码
</el-button>
</div>
<div>
<el-button
type=
"primary"
:disabled=
"!ids.length"
@
click=
"downloadBatch()"
>
批量下载
</el-button
>
<el-button
:disabled=
"!ids.length"
type=
"cyan"
@
click=
"remove()"
>
批量删除
</el-button
>
<el-button
type=
"primary"
:disabled=
"!ids.length"
@
click=
"downloadBatch()"
>
批量下载
</el-button>
<el-button
:disabled=
"!ids.length"
type=
"cyan"
@
click=
"remove()"
>
批量删除
</el-button>
</div>
</div>
...
...
@@ -247,20 +228,12 @@ export default {
<div
v-if=
"row.actualGroupName"
slot-scope=
"{ row }"
>
<el-popover
placement=
"bottom"
trigger=
"hover"
:disabled=
"row.tagList.length < 3"
>
<div>
<el-tag
type=
"primary"
v-for=
"(unit, unique) in row.actualGroupName.split(',')"
:key=
"unique"
>
<el-tag
type=
"primary"
v-for=
"(unit, unique) in row.actualGroupName.split(',')"
:key=
"unique"
>
{{ unit }}
</el-tag>
</div>
<div
slot=
"reference"
>
<el-tag
type=
"primary"
v-for=
"(unit, unique) in row.actualGroupName.split(',').slice(0, 2)"
:key=
"unique"
>
<el-tag
type=
"primary"
v-for=
"(unit, unique) in row.actualGroupName.split(',').slice(0, 2)"
:key=
"unique"
>
{{ unit }}
</el-tag>
<el-tag
type=
"primary"
key=
"a"
v-if=
"row.tagList.length > 2"
>
...
</el-tag>
...
...
@@ -269,35 +242,14 @@ export default {
</div>
<span
v-else
>
无群聊
</span>
</el-table-column>
<el-table-column
label=
"添加好友数"
align=
"center"
prop=
"cusNumber"
width=
"100"
></el-table-column>
<el-table-column
label=
"添加好友数"
align=
"center"
prop=
"cusNumber"
width=
"100"
></el-table-column>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
></el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"160"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"180"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"160"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"180"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"{ row }"
>
<el-button
type=
"text"
@
click=
"goRoute(row.id)"
>
编辑
</el-button
>
<el-button
type=
"text"
@
click=
"download(row)"
>
下载
</el-button
>
<el-button
type=
"text"
@
click=
"remove(row.id)"
>
删除
</el-button
>
<el-button
type=
"text"
@
click=
"goRoute(row.id)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"download(row)"
>
下载
</el-button>
<el-button
type=
"text"
@
click=
"remove(row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -313,13 +265,13 @@ export default {
</template>
<
style
scoped
lang=
"scss"
>
.code-image
{
width
:
200px
;
height
:
200px
;
}
.code-image
{
width
:
200px
;
height
:
200px
;
}
.code-image--small
{
width
:
50px
;
height
:
50px
;
}
.code-image--small
{
width
:
50px
;
height
:
50px
;
}
</
style
>
linkwe-pc/src/views/communityOperating/oldCustomer/list.vue
View file @
3bfcc0e
...
...
@@ -216,7 +216,7 @@
<div
class=
"top-search"
>
<el-form
inline
label-position=
"right"
:model=
"query"
label-width=
"100px"
ref=
"queryForm"
>
<el-form-item
label=
"任务名称"
prop=
"taskName"
>
<el-input
v-model=
"query.taskName"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.taskName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<!--
<el-form-item
label=
"发送方式"
prop=
"sendType"
>
<el-select
v-model=
"query.sendType"
placeholder=
"请选择"
size=
"small"
>
...
...
@@ -229,10 +229,11 @@
</el-select>
</el-form-item>
-->
<el-form-item
label=
"创建人"
prop=
"createBy"
>
<el-input
v-model=
"query.createBy"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.createBy"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-date-picker
clearable
v-model=
"dateRange"
value-format=
"yyyy-MM-dd"
type=
"daterange"
...
...
linkwe-pc/src/views/conversation/content/customer.vue
View file @
3bfcc0e
...
...
@@ -7,6 +7,7 @@
<el-input
class=
"mb10"
placeholder=
"搜索客户"
clearable
prefix-icon=
"el-icon-search"
v-model=
"customerQuery.name"
@
keyup
.
enter
.
native=
"getCustomerList(1)"
...
...
linkwe-pc/src/views/conversation/content/global.vue
View file @
3bfcc0e
...
...
@@ -12,6 +12,7 @@
</el-form-item>
<el-form-item
label=
"时间范围"
>
<el-date-picker
clearable
v-model=
"dateRange"
type=
"daterange"
format=
"yyyy-MM-dd"
...
...
linkwe-pc/src/views/conversation/security/sensitiveList.vue
View file @
3bfcc0e
...
...
@@ -6,14 +6,12 @@
<div
class=
"tag-input"
@
click=
"dialogVisibleSelectUser = true"
>
<span
class=
"tag-place"
v-if=
"!queryUser.length"
>
请选择
</span>
<template
v-else
>
<el-tag
type=
"info"
v-for=
"(unit, unique) in queryUser"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag>
<el-tag
type=
"info"
v-for=
"(unit, unique) in queryUser"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag>
</
template
>
</div>
</el-form-item>
<el-form-item>
<el-input
v-model=
"form.keyword"
placeholder=
"搜索关键词"
style=
"width: 240px
"
>
</el-input>
<el-input
clearable
v-model=
"form.keyword"
placeholder=
"搜索关键词"
style=
"width: 240px;
"
>
</el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"getSensitiveList"
>
查询
</el-button>
...
...
@@ -24,7 +22,7 @@
<el-col
:span=
"8"
>
<div
class=
"left-title"
>
触发记录
</div>
</el-col>
<el-col
:span=
"16"
style=
"text-align: right"
>
<el-col
:span=
"16"
style=
"text-align: right
;
"
>
<el-radio-group
v-model=
"selectDate"
size=
"small"
>
<el-radio-button
label=
"昨日"
></el-radio-button>
<el-radio-button
label=
"7日"
></el-radio-button>
...
...
@@ -42,12 +40,7 @@
</el-col>
</el-row>
</div>
<el-table
:data=
"tableData"
stripe
style=
"width: 100%"
:header-cell-style=
"{ background: '#fff' }"
>
<el-table
:data=
"tableData"
stripe
style=
"width: 100%;"
:header-cell-style=
"{ background: '#fff' }"
>
<el-table-column
prop=
"patternWords"
label=
"敏感词"
>
</el-table-column>
<el-table-column
prop=
"content"
label=
"内容"
>
<
template
slot-scope=
"{ row }"
>
...
...
@@ -87,118 +80,118 @@
</div>
</template>
<
script
>
import
*
as
sensitiveApis
from
'@/api/conversation/security'
import
SelectUser
from
'@/components/SelectUser'
import
ChatContent
from
'@/components/ChatContent'
import
*
as
sensitiveApis
from
'@/api/conversation/security'
import
SelectUser
from
'@/components/SelectUser'
import
ChatContent
from
'@/components/ChatContent'
export
default
{
components
:
{
SelectUser
,
ChatContent
},
data
()
{
return
{
form
:
{
pageSize
:
10
,
pageNum
:
1
,
scopeType
:
''
,
auditScopeId
:
''
,
keyword
:
''
// 关键词
},
selectDate
:
''
,
dateRangeValue
:
''
,
// 时间选择
tableData
:
[],
queryUser
:
[],
// 搜索框选择的添加人
query
:
{
pageNum
:
1
,
pageSize
:
10
},
total
:
0
,
dialogVisibleSelectUser
:
false
,
// 选择添加人弹窗显隐
floorRange
:
'全部'
,
displayOptions
:
[
{
value
:
'0'
,
label
:
'全部'
},
{
value
:
'1'
,
label
:
'已发送'
export
default
{
components
:
{
SelectUser
,
ChatContent
},
data
()
{
return
{
form
:
{
pageSize
:
10
,
pageNum
:
1
,
scopeType
:
''
,
auditScopeId
:
''
,
keyword
:
''
// 关键词
},
{
value
:
'2'
,
label
:
'已撤回'
selectDate
:
''
,
dateRangeValue
:
''
,
// 时间选择
tableData
:
[],
queryUser
:
[],
// 搜索框选择的添加人
query
:
{
pageNum
:
1
,
pageSize
:
10
},
{
value
:
'3'
,
label
:
'已删除'
}
]
}
},
created
()
{
this
.
getSensitiveList
()
},
methods
:
{
getSensitiveList
()
{
this
.
form
.
pageSize
=
this
.
query
.
pageSize
this
.
form
.
pageNum
=
this
.
query
.
pageNum
sensitiveApis
.
getSecurityList
(
this
.
form
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
tableData
=
res
.
rows
this
.
total
=
Number
(
res
.
total
)
}
})
},
chechName
(
e
)
{
if
(
e
==
0
)
{
this
.
floorRange
=
'全部'
}
else
if
(
e
==
1
)
{
this
.
floorRange
=
'已发送'
}
else
if
(
e
==
2
)
{
this
.
floorRange
=
'已撤回'
}
else
{
this
.
floorRange
=
'切回企业日志'
total
:
0
,
dialogVisibleSelectUser
:
false
,
// 选择添加人弹窗显隐
floorRange
:
'全部'
,
displayOptions
:
[
{
value
:
'0'
,
label
:
'全部'
},
{
value
:
'1'
,
label
:
'已发送'
},
{
value
:
'2'
,
label
:
'已撤回'
},
{
value
:
'3'
,
label
:
'已删除'
}
]
}
},
selectedUser
(
list
)
{
// console.log(list)
this
.
queryUser
=
list
this
.
form
.
scopeType
=
2
//list.map((d) => d.department) + ''
console
.
log
(
list
,
'scopeType'
)
this
.
form
.
auditScopeId
=
list
.
map
((
d
)
=>
d
.
userId
)
+
''
created
()
{
this
.
getSensitiveList
()
},
methods
:
{
getSensitiveList
()
{
this
.
form
.
pageSize
=
this
.
query
.
pageSize
this
.
form
.
pageNum
=
this
.
query
.
pageNum
sensitiveApis
.
getSecurityList
(
this
.
form
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
tableData
=
res
.
rows
this
.
total
=
Number
(
res
.
total
)
}
})
},
chechName
(
e
)
{
if
(
e
==
0
)
{
this
.
floorRange
=
'全部'
}
else
if
(
e
==
1
)
{
this
.
floorRange
=
'已发送'
}
else
if
(
e
==
2
)
{
this
.
floorRange
=
'已撤回'
}
else
{
this
.
floorRange
=
'切回企业日志'
}
},
selectedUser
(
list
)
{
// console.log(list)
this
.
queryUser
=
list
this
.
form
.
scopeType
=
2
//list.map((d) => d.department) + ''
console
.
log
(
list
,
'scopeType'
)
this
.
form
.
auditScopeId
=
list
.
map
((
d
)
=>
d
.
userId
)
+
''
this
.
getSensitiveList
()
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.demo-form-inline
{
background
:
#efefef
;
padding
:
18px
10px
0
10px
;
}
.demo-form-inline
{
background
:
#efefef
;
padding
:
18px
10px
0
10px
;
}
.search-content
{
height
:
40px
;
margin-top
:
15px
;
padding
:
10px
;
.left-title
{
.search-content
{
height
:
40px
;
line-height
:
40px
;
margin-top
:
15px
;
padding
:
10px
;
.left-title
{
height
:
40px
;
line-height
:
40px
;
}
.date-range
{
margin-left
:
10px
;
width
:
300px
;
}
}
.date-range
{
margin-left
:
10px
;
width
:
300px
;
.noborder
{
::v-deep
.el-input--mini
.el-input__inner
{
width
:
2px
;
border
:
none
;
}
}
}
.noborder
{
::v-deep
.el-input--mini
.el-input__inner
{
width
:
2px
;
border
:
none
;
.content
{
margin-top
:
15px
;
padding
:
10px
;
}
}
.content
{
margin-top
:
15px
;
padding
:
10px
;
}
</
style
>
linkwe-pc/src/views/customerManage/customer.vue
View file @
3bfcc0e
<
script
>
import
*
as
api
from
'@/api/customer'
import
{
getList
as
getListTag
}
from
'@/api/customer/tag'
import
AddTag
from
'@/components/AddTag'
import
SelectTag
from
'@/components/SelectTag'
import
{
dictAddType
,
dictTrackState
}
from
'@/utils/dictionary'
import
*
as
api
from
'@/api/customer'
import
{
getList
as
getListTag
}
from
'@/api/customer/tag'
import
AddTag
from
'@/components/AddTag'
import
SelectTag
from
'@/components/SelectTag'
import
{
dictAddType
,
dictTrackState
}
from
'@/utils/dictionary'
export
default
{
name
:
'Customer'
,
components
:
{
AddTag
,
SelectTag
},
props
:
{},
data
()
{
return
{
query
:
{
pageNum
:
1
,
pageSize
:
10
,
name
:
''
,
// "客户名称",
userIds
:
''
,
// "添加人id",
tagIds
:
''
,
// "标签id,多个标签,id使用逗号隔开",
beginTime
:
''
,
// "开始时间",
endTime
:
''
,
// "结束时间"
customerType
:
''
,
//客户类型 1:微信客户;2:企业客户
trackState
:
''
,
//跟进状态 1:待跟进;2:跟进中;3:已成交;4:无意向;5:已流失
addMethod
:
''
,
//添加方式 0:未知来源;1:扫描二维码;2:搜索手机号;3:名片分享;4:群聊;5:手机通讯录;6:微信联系人;7:来自微信好友的添加申请;8:安装第三方应用时自动添加的客服人员;9:搜索邮箱;10:视频号主页添加;11:员工活码;12:新客拉群;13:活动裂变;201:内部成员共享;202:管理员/负责人分配
gender
:
''
,
//0-未知 1-男性 2-女性
},
queryTag
:
[],
// 搜索框选择的标签
queryUser
:
[],
// 搜索框选择的添加人
dateRange
:
[],
// 添加日期
loading
:
false
,
total
:
0
,
lastSyncTime
:
''
,
noRepeatCustomerTotal
:
0
,
// 添加标签表单
form
:
{
gourpName
:
''
,
weTags
:
[],
},
list
:
[],
// 客户列表
staffList
:
[],
// 所有员工列表
multipleSelection
:
[],
// 多选数组
dialogVisible
:
false
,
// 选择标签弹窗显隐
dialogVisibleSelectUser
:
false
,
// 选择添加人弹窗显隐
dialogVisibleAddTag
:
false
,
// 添加标签弹窗显隐
dialogVisibleExtend
:
false
,
// 在职继承弹窗显隐
extendStaff
:
''
,
// 在职继承选择的员工
currentEidt
:
''
,
// 当前编辑项
selectedTag
:
[],
// 选择的标签
tagDialogType
:
{
title
:
''
,
// 选择标签弹窗标题
type
:
''
,
// 弹窗类型
},
dictCustomerType
:
Object
.
freeze
({
1
:
'微信客户'
,
2
:
'企业客户'
}),
dictAddType
,
dictTrackState
,
}
},
watch
:
{},
computed
:
{},
created
()
{
this
.
getList
()
this
.
getListTag
()
export
default
{
name
:
'Customer'
,
components
:
{
AddTag
,
SelectTag
},
props
:
{},
data
()
{
return
{
query
:
{
pageNum
:
1
,
pageSize
:
10
,
name
:
''
,
// "客户名称",
userIds
:
''
,
// "添加人id",
tagIds
:
''
,
// "标签id,多个标签,id使用逗号隔开",
beginTime
:
''
,
// "开始时间",
endTime
:
''
,
// "结束时间"
customerType
:
''
,
//客户类型 1:微信客户;2:企业客户
trackState
:
''
,
//跟进状态 1:待跟进;2:跟进中;3:已成交;4:无意向;5:已流失
addMethod
:
''
,
//添加方式 0:未知来源;1:扫描二维码;2:搜索手机号;3:名片分享;4:群聊;5:手机通讯录;6:微信联系人;7:来自微信好友的添加申请;8:安装第三方应用时自动添加的客服人员;9:搜索邮箱;10:视频号主页添加;11:员工活码;12:新客拉群;13:活动裂变;201:内部成员共享;202:管理员/负责人分配
gender
:
''
//0-未知 1-男性 2-女性
},
queryTag
:
[],
// 搜索框选择的标签
queryUser
:
[],
// 搜索框选择的添加人
dateRange
:
[],
// 添加日期
loading
:
false
,
total
:
0
,
lastSyncTime
:
''
,
noRepeatCustomerTotal
:
0
,
// 添加标签表单
form
:
{
gourpName
:
''
,
weTags
:
[]
},
list
:
[],
// 客户列表
staffList
:
[],
// 所有员工列表
multipleSelection
:
[],
// 多选数组
dialogVisible
:
false
,
// 选择标签弹窗显隐
dialogVisibleSelectUser
:
false
,
// 选择添加人弹窗显隐
dialogVisibleAddTag
:
false
,
// 添加标签弹窗显隐
dialogVisibleExtend
:
false
,
// 在职继承弹窗显隐
extendStaff
:
''
,
// 在职继承选择的员工
currentEidt
:
''
,
// 当前编辑项
selectedTag
:
[],
// 选择的标签
tagDialogType
:
{
title
:
''
,
// 选择标签弹窗标题
type
:
''
// 弹窗类型
},
dictCustomerType
:
Object
.
freeze
({
1
:
'微信客户'
,
2
:
'企业客户'
}),
dictAddType
,
dictTrackState
}
},
watch
:
{},
computed
:
{},
created
()
{
this
.
getList
()
this
.
getListTag
()
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
<div>用于查看当前企业所有的客户列表及详细信息,支持对客户进行打标签。</div>
`
)
},
mounted
()
{},
methods
:
{
getList
(
page
)
{
// console.log(this.dateRange);
if
(
this
.
dateRange
)
{
this
.
query
.
beginTime
=
this
.
dateRange
[
0
]
this
.
query
.
endTime
=
this
.
dateRange
[
1
]
}
else
{
this
.
query
.
beginTime
=
''
this
.
query
.
endTime
=
''
}
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
query
.
tagIds
=
this
.
queryTag
.
map
((
d
)
=>
d
.
tagId
)
+
''
this
.
query
.
userIds
=
this
.
queryUser
.
map
((
d
)
=>
d
.
userId
)
+
''
this
.
loading
=
true
api
.
getListNew
(
this
.
query
)
.
then
(({
rows
,
total
,
lastSyncTime
,
noRepeatCustomerTotal
})
=>
{
rows
.
forEach
((
element
)
=>
{
if
(
element
.
tagIds
&&
element
.
tagNames
)
{
element
.
tagIds
=
element
.
tagIds
.
split
(
','
)
element
.
tagNames
=
element
.
tagNames
.
split
(
','
)
element
.
tags
=
[]
element
.
tagIds
.
forEach
((
unit
,
index
)
=>
{
element
.
tags
.
push
({
tagId
:
unit
,
tagName
:
element
.
tagNames
[
index
],
)
},
mounted
()
{},
methods
:
{
getList
(
page
)
{
// console.log(this.dateRange);
if
(
this
.
dateRange
)
{
this
.
query
.
beginTime
=
this
.
dateRange
[
0
]
this
.
query
.
endTime
=
this
.
dateRange
[
1
]
}
else
{
this
.
query
.
beginTime
=
''
this
.
query
.
endTime
=
''
}
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
query
.
tagIds
=
this
.
queryTag
.
map
((
d
)
=>
d
.
tagId
)
+
''
this
.
query
.
userIds
=
this
.
queryUser
.
map
((
d
)
=>
d
.
userId
)
+
''
this
.
loading
=
true
api
.
getListNew
(
this
.
query
)
.
then
(({
rows
,
total
,
lastSyncTime
,
noRepeatCustomerTotal
})
=>
{
rows
.
forEach
((
element
)
=>
{
if
(
element
.
tagIds
&&
element
.
tagNames
)
{
element
.
tagIds
=
element
.
tagIds
.
split
(
','
)
element
.
tagNames
=
element
.
tagNames
.
split
(
','
)
element
.
tags
=
[]
element
.
tagIds
.
forEach
((
unit
,
index
)
=>
{
element
.
tags
.
push
({
tagId
:
unit
,
tagName
:
element
.
tagNames
[
index
]
})
})
})
}
}
})
this
.
list
=
rows
this
.
total
=
+
total
this
.
lastSyncTime
=
lastSyncTime
this
.
noRepeatCustomerTotal
=
+
noRepeatCustomerTotal
this
.
loading
=
false
this
.
multipleSelection
=
[]
})
this
.
list
=
rows
this
.
total
=
+
total
this
.
lastSyncTime
=
lastSyncTime
this
.
noRepeatCustomerTotal
=
+
noRepeatCustomerTotal
this
.
loading
=
false
this
.
multipleSelection
=
[]
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
getListTag
(
refresh
)
{
getListTag
().
then
(({
rows
})
=>
{
this
.
listTagOneArray
=
[]
rows
.
forEach
((
element
)
=>
{
element
.
weTags
.
forEach
((
d
)
=>
{
this
.
listTagOneArray
.
push
(
d
)
.
catch
(()
=>
{
this
.
loading
=
false
})
})
if
(
refresh
)
{
this
.
$refs
.
selectTag
.
getList
()
this
.
form
=
{
gourpName
:
''
,
weTags
:
[],
},
getListTag
(
refresh
)
{
getListTag
().
then
(({
rows
})
=>
{
this
.
listTagOneArray
=
[]
rows
.
forEach
((
element
)
=>
{
element
.
weTags
.
forEach
((
d
)
=>
{
this
.
listTagOneArray
.
push
(
d
)
})
})
if
(
refresh
)
{
this
.
$refs
.
selectTag
.
getList
()
this
.
form
=
{
gourpName
:
''
,
weTags
:
[]
}
}
})
},
showTagDialog
()
{
this
.
selectedTag
=
this
.
queryTag
this
.
tagDialogType
=
{
title
:
'选择标签'
,
type
:
'query'
}
})
},
showTagDialog
()
{
this
.
selectedTag
=
this
.
queryTag
this
.
tagDialogType
=
{
title
:
'选择标签'
,
type
:
'query'
,
}
this
.
dialogVisible
=
true
// this.$refs.selectTag.$forceUpdate()
},
makeTag
(
row
)
{
this
.
currentEidt
=
row
// if (!this.multipleSelection.length) {
// this.msgInfo('请选择一位客户')
// return
// }
// if (this.multipleSelection.length > 1) {
// this.msgInfo('同时只能选择一位客户')
// return
// }
this
.
selectedTag
=
[]
let
hasErrorTag
=
[]
let
repeat
=
[]
row
.
tags
&&
row
.
tags
.
forEach
((
unit
)
=>
{
// 判断是否有重复标签
let
isRepeat
=
this
.
selectedTag
.
some
((
d
)
=>
{
return
d
.
tagId
===
unit
.
tagId
this
.
dialogVisible
=
true
// this.$refs.selectTag.$forceUpdate()
},
makeTag
(
row
)
{
this
.
currentEidt
=
row
// if (!this.multipleSelection.length) {
// this.msgInfo('请选择一位客户')
// return
// }
// if (this.multipleSelection.length > 1) {
// this.msgInfo('同时只能选择一位客户')
// return
// }
this
.
selectedTag
=
[]
let
hasErrorTag
=
[]
let
repeat
=
[]
row
.
tags
&&
row
.
tags
.
forEach
((
unit
)
=>
{
// 判断是否有重复标签
let
isRepeat
=
this
.
selectedTag
.
some
((
d
)
=>
{
return
d
.
tagId
===
unit
.
tagId
})
// 去重
if
(
isRepeat
)
{
repeat
.
push
(
unit
.
tagName
)
return
}
let
filter
=
this
.
listTagOneArray
.
find
((
d
)
=>
{
return
d
.
tagId
===
unit
.
tagId
})
// 如果没有匹配到,则说明该便签处于异常状态,可能已被删除或破坏
if
(
!
filter
)
{
hasErrorTag
.
push
(
unit
.
tagName
)
return
}
this
.
selectedTag
.
push
(
filter
)
})
// 去重
if
(
isRepeat
)
{
repeat
.
push
(
unit
.
tagName
)
return
}
let
filter
=
this
.
listTagOneArray
.
find
((
d
)
=>
{
return
d
.
tagId
===
unit
.
tagId
// this.multipleSelection.forEach((element) => {
// })
if
(
hasErrorTag
.
length
>
0
)
{
this
.
$notify
({
// title: '标题名称',
message
:
this
.
$createElement
(
'i'
,
{
style
:
'color: red'
},
'已有标签['
+
hasErrorTag
+
']不在标签库中,已被删除或存在异常'
),
type
:
'warning'
,
customClass
:
'mzindex'
})
// 如果没有匹配到,则说明该便签处于异常状态,可能已被删除或破坏
if
(
!
filter
)
{
hasErrorTag
.
push
(
unit
.
tagName
)
return
}
this
.
selectedTag
.
push
(
filter
)
})
// this.multipleSelection.forEach((element) => {
// })
if
(
hasErrorTag
.
length
>
0
)
{
this
.
$notify
({
// title: '标题名称',
message
:
this
.
$createElement
(
'i'
,
{
style
:
'color: red'
},
'已有标签['
+
hasErrorTag
+
']不在标签库中,已被删除或存在异常'
),
type
:
'warning'
,
customClass
:
'mzindex'
,
})
// this.msgError('已有标签[' + hasErrorTag + ']不在标签库中,已被删除或存在异常')
}
// this.msgError('已有标签[' + hasErrorTag + ']不在标签库中,已被删除或存在异常')
}
this
.
tagDialogType
=
{
title
:
'标签设置'
+
(
repeat
.
length
?
'(重复的标签已去重显示)'
:
''
),
}
this
.
dialogVisible
=
true
// this.$refs.selectTag.$forceUpdate()
},
sync
()
{
// const loading = this.$loading({
// lock: true,
// text: 'Loading',
// spinner: 'el-icon-loading',
// background: 'rgba(0, 0, 0, 0.7)',
// })
api
.
sync
()
.
then
(()
=>
{
// loading.close()
this
.
getList
(
1
)
this
.
msgSuccess
(
'后台开始同步数据,请稍后关注进度'
)
})
.
catch
((
fail
)
=>
{
// loading.close()
console
.
log
(
fail
)
})
},
// /** 导出按钮操作 */
// exportCustomer() {
// const queryParams = this.query
// this.$confirm('是否确认导出所有客户数据项?', '警告', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(function() {
// return api.exportCustomer(queryParams)
// })
// .then((response) => {
// this.download(response.msg)
// })
// .catch(function() {})
// },
selectedUser
(
list
)
{
this
.
queryUser
=
list
},
submitSelectTag
(
selected
)
{
if
(
this
.
tagDialogType
.
type
===
'query'
)
{
this
.
queryTag
=
selected
this
.
dialogVisible
=
false
}
else
{
let
data
=
{
externalUserid
:
this
.
currentEidt
.
externalUserid
,
addTag
:
selected
,
userId
:
this
.
currentEidt
.
firstUserId
,
this
.
tagDialogType
=
{
title
:
'标签设置'
+
(
repeat
.
length
?
'(重复的标签已去重显示)'
:
''
)
}
// let apiType = {
// add: 'makeLabel',
// remove: 'removeLabel'
// }
this
.
loading
=
true
this
.
dialogVisible
=
true
// this.$refs.selectTag.$forceUpdate()
},
sync
()
{
// const loading = this.$loading({
// lock: true,
// text: 'Loading',
// spinner: 'el-icon-loading',
// background: 'rgba(0, 0, 0, 0.7)',
// })
api
.
makeLabel
(
data
)
.
sync
(
)
.
then
(()
=>
{
this
.
msgSuccess
(
'操作成功'
)
this
.
dialogVisible
=
false
this
.
getList
()
this
.
loading
=
false
// loading.close()
this
.
getList
(
1
)
this
.
msgSuccess
(
'后台开始同步数据,请稍后关注进度'
)
})
.
catch
(()
=>
{
this
.
loading
=
false
.
catch
((
fail
)
=>
{
// loading.close()
console
.
log
(
fail
)
})
}
},
resetForm
(
formName
)
{
this
.
dateRange
=
[]
this
.
queryTag
=
[]
this
.
queryUser
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
getList
(
1
)
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
multipleSelection
=
selection
},
// 用于多选变单选
handleSelection
(
selection
,
row
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
table
.
clearSelection
()
this
.
$refs
.
table
.
toggleRowSelection
(
row
)
})
},
goRoute
(
row
)
{
let
{
externalUserid
,
firstUserId
:
userId
}
=
row
this
.
$router
.
push
({
path
:
'customerDetail'
,
query
:
{
externalUserid
,
userId
},
})
},
},
// /** 导出按钮操作 */
// exportCustomer() {
// const queryParams = this.query
// this.$confirm('是否确认导出所有客户数据项?', '警告', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(function() {
// return api.exportCustomer(queryParams)
// })
// .then((response) => {
// this.download(response.msg)
// })
// .catch(function() {})
// },
selectedUser
(
list
)
{
this
.
queryUser
=
list
},
submitSelectTag
(
selected
)
{
if
(
this
.
tagDialogType
.
type
===
'query'
)
{
this
.
queryTag
=
selected
this
.
dialogVisible
=
false
}
else
{
let
data
=
{
externalUserid
:
this
.
currentEidt
.
externalUserid
,
addTag
:
selected
,
userId
:
this
.
currentEidt
.
firstUserId
}
// let apiType = {
// add: 'makeLabel',
// remove: 'removeLabel'
// }
this
.
loading
=
true
api
.
makeLabel
(
data
)
.
then
(()
=>
{
this
.
msgSuccess
(
'操作成功'
)
this
.
dialogVisible
=
false
this
.
getList
()
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
}
},
resetForm
(
formName
)
{
this
.
dateRange
=
[]
this
.
queryTag
=
[]
this
.
queryUser
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
getList
(
1
)
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
multipleSelection
=
selection
},
// 用于多选变单选
handleSelection
(
selection
,
row
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
table
.
clearSelection
()
this
.
$refs
.
table
.
toggleRowSelection
(
row
)
})
},
goRoute
(
row
)
{
let
{
externalUserid
,
firstUserId
:
userId
}
=
row
this
.
$router
.
push
({
path
:
'customerDetail'
,
query
:
{
externalUserid
,
userId
}
})
},
// 在职继承
async
transfer
(
row
)
{
await
this
.
$refs
[
'SelectStaffForm'
].
validate
()
// if (!this.extendStaff) {
// this.msgError('请选择员工')
// return
// }
let
data
=
{
handoverUserId
:
this
.
currentEidt
.
firstUserId
,
//移交人
takeoverUserId
:
this
.
extendStaff
,
//接受人
externalUserid
:
this
.
currentEidt
.
externalUserid
,
//客户id,多个客户使用逗号隔开
// 在职继承
async
transfer
(
row
)
{
await
this
.
$refs
[
'SelectStaffForm'
].
validate
()
// if (!this.extendStaff) {
// this.msgError('请选择员工')
// return
// }
let
data
=
{
handoverUserId
:
this
.
currentEidt
.
firstUserId
,
//移交人
takeoverUserId
:
this
.
extendStaff
,
//接受人
externalUserid
:
this
.
currentEidt
.
externalUserid
//客户id,多个客户使用逗号隔开
}
api
.
jobExtends
(
data
).
then
((
res
)
=>
{
this
.
msgSuccess
(
'操作成功'
)
this
.
dialogVisibleExtend
=
false
this
.
getList
()
})
}
api
.
jobExtends
(
data
).
then
((
res
)
=>
{
this
.
msgSuccess
(
'操作成功'
)
this
.
dialogVisibleExtend
=
false
this
.
getList
()
})
},
},
}
}
}
</
script
>
<
template
>
<div
v-loading=
"loading"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
<el-form-item
label=
"客户名称"
prop=
"name"
>
<el-input
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"客户类型"
prop=
"customerType"
>
<el-select
v-model=
"query.customerType"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, index) in dictCustomerType"
:key=
"index"
:label=
"item"
:value=
"index"
></el-option>
<el-select
clearable
v-model=
"query.customerType"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, index) in dictCustomerType"
:key=
"index"
:label=
"item"
:value=
"index"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"客户标签"
prop=
"customerType"
>
...
...
@@ -347,27 +335,18 @@ export default {
</div>
</el-form-item>
<el-form-item
label=
"跟进状态"
prop=
"trackState"
>
<el-select
v-model=
"query.trackState"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, index) in dictTrackState"
:key=
"index"
:label=
"item.name"
:value=
"index"
></el-option>
<el-select
clearable
v-model=
"query.trackState"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, index) in dictTrackState"
:key=
"index"
:label=
"item.name"
:value=
"index"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"添加方式"
prop=
"addMethod"
>
<el-select
v-model=
"query.addMethod"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, index) in dictAddType"
:key=
"index"
:label=
"item"
:value=
"index"
></el-option>
<el-select
clearable
v-model=
"query.addMethod"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, index) in dictAddType"
:key=
"index"
:label=
"item"
:value=
"index"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"添加日期"
>
<el-date-picker
clearable
v-model=
"dateRange"
value-format=
"yyyy-MM-dd"
type=
"daterange"
...
...
@@ -412,11 +391,7 @@ export default {
<el-table-column
label=
"客户"
prop=
"customerName"
header-align=
"center"
align=
""
width=
"180"
>
<
template
slot-scope=
"{ row }"
>
<div
class=
"cp flex aic"
@
click=
"goRoute(row)"
>
<el-image
style=
"width: 50px; height: 50px; flex: none"
:src=
"row.avatar"
fit=
"fit"
></el-image>
<el-image
style=
"width: 50px; height: 50px; flex: none;"
:src=
"row.avatar"
fit=
"fit"
></el-image>
<div
class=
"ml10"
>
<p>
{{
row
.
customerName
}}
</p>
<i
:class=
"['el-icon-s-custom',
{ 1: 'man', 2: 'woman' }[row.gender]]">
</i>
...
...
@@ -497,11 +472,7 @@ export default {
</SelectTag>
<!-- 选择添加人弹窗 -->
<SelectWeUser
:visible.sync="
dialogVisibleSelectUser
"
title="
选择添加人
"
@success="
selectedUser
"
></SelectWeUser>
<SelectWeUser :visible.sync="
dialogVisibleSelectUser
" title="
选择添加人
" @success="
selectedUser
"></SelectWeUser>
<!-- 添加标签弹窗 -->
<AddTag :visible.sync="
dialogVisibleAddTag
" :form="
form
" @success="
getListTag
(
true
)
" />
...
...
@@ -518,23 +489,23 @@ export default {
</template>
<style lang="
scss
"
scoped
>
.
el
-
icon
-
s
-
custom
{
font
-
size
:
16
px
;
// margin-left: 4px;
color
:
#
999
;
&
.
man
{
color
:
#
13
a2e8
;
.
el
-
icon
-
s
-
custom
{
font
-
size
:
16
px
;
// margin-left: 4px;
color
:
#
999
;
&
.
man
{
color
:
#
13
a2e8
;
}
&
.
woman
{
color
:
#
f753b2
;
}
}
&
.
woman
{
color
:
#
f753b2
;
.
bfc
-
d
+
.
bfc
-
d
.
el
-
checkbox
:
first
-
child
{
margin
-
left
:
10
px
;
}
}
.
bfc
-
d
+
.
bfc
-
d
.
el
-
checkbox
:
first
-
child
{
margin
-
left
:
10
px
;
}
<
/style
>
<
style
>
.
mzindex
{
z
-
index
:
5000
!
important
;
}
.
mzindex
{
z
-
index
:
5000
!
important
;
}
<
/style
>
linkwe-pc/src/views/customerManage/dimission/allocatedStaffDetail.vue
View file @
3bfcc0e
<
script
>
import
AllocatedStaffDetailList
from
'./allocatedStaffDetailList'
import
AllocatedStaffDetailList
from
'./allocatedStaffDetailList'
export
default
{
name
:
'AllocatedStaffDetail'
,
components
:
{
AllocatedStaffDetailList
},
props
:
{},
data
()
{
return
{
active
:
'customer'
,
dateRange
:
[]
// 离职日期
}
},
watch
:
{},
computed
:
{},
created
()
{},
mounted
()
{},
methods
:
{
getList
()
{
this
.
$refs
[
this
.
active
].
getList
(
1
)
export
default
{
name
:
'AllocatedStaffDetail'
,
components
:
{
AllocatedStaffDetailList
},
props
:
{},
data
()
{
return
{
active
:
'customer'
,
dateRange
:
[]
// 离职日期
}
},
resetForm
(
formName
)
{
this
.
dateRange
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
getList
()
watch
:
{},
computed
:
{},
created
()
{},
mounted
()
{},
methods
:
{
getList
()
{
this
.
$refs
[
this
.
active
].
getList
(
1
)
},
resetForm
(
formName
)
{
this
.
dateRange
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
getList
()
}
}
}
}
</
script
>
<
template
>
<div
class=
"page"
>
<el-form
ref=
"queryForm"
:inline=
"true"
label-width=
"70px"
class=
"top-search"
>
<el-form
ref=
"queryForm"
:inline=
"true"
label-width=
"70px"
class=
"top-search"
>
<el-form-item
label=
"离职日期"
>
<el-date-picker
clearable
v-model=
"dateRange"
type=
"daterange"
value-format=
"yyyy-MM-dd"
...
...
@@ -49,16 +45,8 @@ export default {
></el-date-picker>
</el-form-item>
<el-form-item
label
>
<el-button
v-hasPermi=
"['customerManage:dimission:query']"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button
>
<el-button
v-hasPermi=
"['customerManage:dimission:query']"
type=
"info"
@
click=
"resetForm('queryForm')"
<el-button
v-hasPermi=
"['customerManage:dimission:query']"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<el-button
v-hasPermi=
"['customerManage:dimission:query']"
type=
"info"
@
click=
"resetForm('queryForm')"
>
重置
</el-button
>
</el-form-item>
...
...
@@ -66,17 +54,10 @@ export default {
<el-tabs
v-model=
"active"
>
<el-tab-pane
label=
"已分配客户"
name=
"customer"
>
<AllocatedStaffDetailList
ref=
"customer"
:dateRange=
"dateRange"
></AllocatedStaffDetailList>
<AllocatedStaffDetailList
ref=
"customer"
:dateRange=
"dateRange"
></AllocatedStaffDetailList>
</el-tab-pane>
<el-tab-pane
label=
"已分配群聊"
name=
"group"
>
<AllocatedStaffDetailList
ref=
"group"
:dateRange=
"dateRange"
type=
"group"
></AllocatedStaffDetailList>
<AllocatedStaffDetailList
ref=
"group"
:dateRange=
"dateRange"
type=
"group"
></AllocatedStaffDetailList>
</el-tab-pane>
</el-tabs>
</div>
...
...
linkwe-pc/src/views/customerManage/dimission/allocatedStaffList.vue
View file @
3bfcc0e
<
script
>
import
{
getList
}
from
'@/api/customer/dimission'
import
{
getList
}
from
'@/api/customer/dimission'
export
default
{
name
:
'AllocatedStaffList'
,
components
:
{},
props
:
{},
data
()
{
return
{
// 查询参数
query
:
{
pageNum
:
1
,
pageSize
:
10
,
userName
:
undefined
,
beginTime
:
undefined
,
endTime
:
undefined
},
loading
:
false
,
total
:
0
,
list
:
[],
dialogVisibleSelectUser
:
false
,
dateRange
:
[]
// 离职日期
}
},
watch
:
{},
computed
:
{},
created
()
{
this
.
getList
()
},
mounted
()
{},
methods
:
{
/** 查询 */
getList
(
page
)
{
if
(
this
.
dateRange
)
{
this
.
query
.
beginTime
=
this
.
dateRange
[
0
]
this
.
query
.
endTime
=
this
.
dateRange
[
1
]
}
else
{
this
.
query
.
beginTime
=
''
this
.
query
.
endTime
=
''
export
default
{
name
:
'AllocatedStaffList'
,
components
:
{},
props
:
{},
data
()
{
return
{
// 查询参数
query
:
{
pageNum
:
1
,
pageSize
:
10
,
userName
:
undefined
,
beginTime
:
undefined
,
endTime
:
undefined
},
loading
:
false
,
total
:
0
,
list
:
[],
dialogVisibleSelectUser
:
false
,
dateRange
:
[]
// 离职日期
}
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
getList
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
+
total
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
resetForm
()
{
this
.
dateRange
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
getList
(
1
)
watch
:
{},
computed
:
{},
created
()
{
this
.
getList
()
},
mounted
()
{},
methods
:
{
/** 查询 */
getList
(
page
)
{
if
(
this
.
dateRange
)
{
this
.
query
.
beginTime
=
this
.
dateRange
[
0
]
this
.
query
.
endTime
=
this
.
dateRange
[
1
]
}
else
{
this
.
query
.
beginTime
=
''
this
.
query
.
endTime
=
''
}
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
getList
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
+
total
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
resetForm
()
{
this
.
dateRange
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
getList
(
1
)
}
}
}
}
</
script
>
<
template
>
<div
class=
"page"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
>
<el-form-item
label=
"已离职员工"
prop=
"userName"
>
<el-input
v-model=
"query.userName"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.userName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"离职日期"
>
<el-date-picker
clearable
v-model=
"dateRange"
value-format=
"yyyy-MM-dd"
type=
"daterange"
...
...
@@ -79,35 +80,19 @@ export default {
></el-date-picker>
</el-form-item>
<el-form-item
label
>
<el-button
v-hasPermi=
"['customerManage:dimission:query']"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button
>
<el-button
v-hasPermi=
"['customerManage:dimission:query']"
type=
"success"
@
click=
"resetForm('queryForm')"
<el-button
v-hasPermi=
"['customerManage:dimission:query']"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<el-button
v-hasPermi=
"['customerManage:dimission:query']"
type=
"success"
@
click=
"resetForm('queryForm')"
>
重置
</el-button
>
</el-form-item>
</el-form>
<el-table
ref=
"multipleTable"
:data=
"list"
tooltip-effect=
"dark"
style=
"width: 100%"
>
<el-table
ref=
"multipleTable"
:data=
"list"
tooltip-effect=
"dark"
style=
"width: 100%
;
"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"55"
></el-table-column>
<el-table-column
prop=
"userName"
label=
"已离职员工"
></el-table-column>
<el-table-column
prop=
"department"
label=
"所属部门"
></el-table-column>
<el-table-column
prop=
"allocateCustomerNum"
label=
"已分配客户数"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop=
"allocateGroupNum"
label=
"已分配群聊数"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop=
"allocateCustomerNum"
label=
"已分配客户数"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop=
"allocateGroupNum"
label=
"已分配群聊数"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop=
"dimissionTime"
label=
"离职时间"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
dimissionTime
}}
</
template
>
</el-table-column>
...
...
linkwe-pc/src/views/customerManage/dimission/index.vue
View file @
3bfcc0e
...
...
@@ -118,10 +118,11 @@
<div
class=
"page"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
>
<el-form-item
label=
"已离职员工"
prop=
"userName"
>
<el-input
v-model=
"query.userName"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.userName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"离职日期"
>
<el-date-picker
clearable
v-model=
"dateRange"
type=
"daterange"
value-format=
"yyyy-MM-dd"
...
...
linkwe-pc/src/views/customerManage/group.vue
View file @
3bfcc0e
...
...
@@ -6,7 +6,7 @@
export
default
{
name
:
'Group'
,
components
:
{
SelectTag
},
data
()
{
data
()
{
return
{
// 查询参数
query
:
{
...
...
@@ -42,12 +42,12 @@
}
},
computed
:
{},
created
()
{
created
()
{
this
.
getList
()
},
methods
:
{
/** 查询 */
getList
(
page
)
{
getList
(
page
)
{
if
(
this
.
dateRange
)
{
this
.
query
.
beginTime
=
this
.
dateRange
[
0
]
this
.
query
.
endTime
=
this
.
dateRange
[
1
]
...
...
@@ -79,7 +79,7 @@
this
.
loading
=
false
})
},
showTagDialog
()
{
showTagDialog
()
{
this
.
selectedTag
=
this
.
queryTag
this
.
tagDialogType
=
{
title
:
'选择标签'
,
...
...
@@ -88,7 +88,7 @@
this
.
dialogVisible
=
true
// this.$refs.selectTag.$forceUpdate()
},
makeTag
(
data
)
{
makeTag
(
data
)
{
this
.
makeLabelCustomerList
=
data
||
this
.
ids
this
.
tagDialogType
.
type
=
''
let
curTags
=
[]
...
...
@@ -102,7 +102,7 @@
this
.
selectedTag
=
curTags
this
.
dialogVisible
=
true
},
submitSelectTag
(
selected
)
{
submitSelectTag
(
selected
)
{
if
(
this
.
tagDialogType
.
type
===
'query'
)
{
this
.
queryTag
=
selected
this
.
dialogVisible
=
false
...
...
@@ -130,14 +130,14 @@
}
},
/** 重置按钮操作 */
resetQuery
()
{
resetQuery
()
{
this
.
dateRange
=
[]
this
.
queryTag
=
[]
this
.
queryUser
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
getList
(
1
)
},
sync
()
{
sync
()
{
// const loading = this.$loading({
// lock: true,
// text: 'Loading',
...
...
@@ -151,7 +151,7 @@
})
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
id
)
this
.
multiple
=
!
selection
.
length
}
...
...
@@ -179,10 +179,10 @@
<div
class=
""
>
<el-form
:model=
"query"
ref=
"queryForm"
:inline=
"true"
class=
"top-search"
label-width=
"80px"
>
<el-form-item
label=
"群名"
prop=
"groupName"
>
<el-input
v-model=
"query.groupName"
placeholder=
"请输入群名"
clearable
/>
<el-input
clearable
v-model=
"query.groupName"
placeholder=
"请输入群名"
clearable
/>
</el-form-item>
<el-form-item
label=
"群主"
prop=
"groupLeaderName"
>
<el-input
v-model=
"query.groupLeaderName"
placeholder=
"请输入群主"
clearable
/>
<el-input
clearable
v-model=
"query.groupLeaderName"
placeholder=
"请输入群主"
clearable
/>
</el-form-item>
<el-form-item
label=
"群标签"
>
<div
class=
"tag-input"
@
click=
"showTagDialog"
>
...
...
@@ -193,7 +193,16 @@
</div>
</el-form-item>
<el-form-item
label=
"创建日期"
>
<el-date-picker
v-model=
"dateRange"
value-format=
"yyyy-MM-dd"
type=
"daterange"
:picker-options=
"pickerOptions"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
<el-date-picker
clearable
v-model=
"dateRange"
value-format=
"yyyy-MM-dd"
type=
"daterange"
:picker-options=
"pickerOptions"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
<el-form-item
label=
" "
>
<!-- v-hasPermi="['customerManage:group:query']" -->
...
...
@@ -252,12 +261,16 @@
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"
<el-button
type=
"text"
@
click=
"
$router.push(
{
path: 'groupDetail',
query: { chatId: scope.row.chatId }
})
">查看详情
</el-button>
"
>查看详情
</el-button
>
<!-- v-hasPermi="['customerManage:group:view']" -->
<el-button
type=
"text"
@
click=
"makeTag(scope.row)"
>
标签管理
</el-button>
<!-- v-hasPermi="['customerManage/customer:makeTag']" -->
...
...
@@ -265,10 +278,23 @@
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
<!-- 选择标签弹窗 -->
<SelectTag
ref=
"selectTag"
:visible
.
sync=
"dialogVisible"
type=
"2"
:title=
"tagDialogType.title"
:defaultValues=
"selectedTag"
@
success=
"submitSelectTag"
>
<SelectTag
ref=
"selectTag"
:visible
.
sync=
"dialogVisible"
type=
"2"
:title=
"tagDialogType.title"
:defaultValues=
"selectedTag"
@
success=
"submitSelectTag"
>
</SelectTag>
</div>
</template>
...
...
linkwe-pc/src/views/customerManage/lossRemind.vue
View file @
3bfcc0e
<
script
>
import
{
getListNew
,
exportCustomer
,
lossRemind
,
getLossRemindStatus
}
from
'@/api/customer'
// import { getList as getListTag } from '@/api/customer/tag'
// import { getList as getListOrganization } from '@/api/organization'
import
SelectUser
from
'@/components/SelectUser'
import
SelectTag
from
'@/components/SelectTag'
import
{
getListNew
,
exportCustomer
,
lossRemind
,
getLossRemindStatus
}
from
'@/api/customer'
// import { getList as getListTag } from '@/api/customer/tag'
// import { getList as getListOrganization } from '@/api/organization'
import
SelectUser
from
'@/components/SelectUser'
import
SelectTag
from
'@/components/SelectTag'
export
default
{
name
:
'LossRemind'
,
components
:
{
SelectUser
,
SelectTag
},
props
:
{},
data
()
{
return
{
query
:
{
pageNum
:
1
,
pageSize
:
10
,
name
:
''
,
// "客户名称",
userIds
:
''
,
// "添加人id",
tagIds
:
''
,
// "标签id,多个标签,id使用逗号隔开",
beginTime
:
''
,
// "开始时间",
endTime
:
''
,
// "结束时间"
trackState
:
5
},
queryTag
:
[],
// 搜索框选择的标签
queryUser
:
[],
// 搜索框选择的添加人
dateRange
:
[],
// 添加日期
loading
:
false
,
isMoreFilter
:
false
,
total
:
0
,
// 添加标签表单
form
:
{
gourpName
:
''
,
weTags
:
[]
},
list
:
[],
// 客户列表
listOrganization
:
[],
// 组织架构列表
multipleSelection
:
[],
// 多选数组
dialogVisible
:
false
,
// 选择标签弹窗显隐
dialogVisibleSelectUser
:
false
,
// 选择添加人弹窗显隐
selectedGroup
:
''
,
// 选择的标签分组
selectedTag
:
[],
// 选择的标签
removeTag
:
[],
// 可移除的标签
tagDialogType
:
{
title
:
''
,
// 选择标签弹窗标题
type
:
''
// 弹窗类型
},
isNotice
:
'0'
}
},
watch
:
{},
computed
:
{},
created
()
{
this
.
getList
()
// this.getListTag()
// this.getListOrganization()
this
.
getLossRemindStatus
()
export
default
{
name
:
'LossRemind'
,
components
:
{
SelectUser
,
SelectTag
},
props
:
{},
data
()
{
return
{
query
:
{
pageNum
:
1
,
pageSize
:
10
,
name
:
''
,
// "客户名称",
userIds
:
''
,
// "添加人id",
tagIds
:
''
,
// "标签id,多个标签,id使用逗号隔开",
beginTime
:
''
,
// "开始时间",
endTime
:
''
,
// "结束时间"
trackState
:
5
},
queryTag
:
[],
// 搜索框选择的标签
queryUser
:
[],
// 搜索框选择的添加人
dateRange
:
[],
// 添加日期
loading
:
false
,
isMoreFilter
:
false
,
total
:
0
,
// 添加标签表单
form
:
{
gourpName
:
''
,
weTags
:
[]
},
list
:
[],
// 客户列表
listOrganization
:
[],
// 组织架构列表
multipleSelection
:
[],
// 多选数组
dialogVisible
:
false
,
// 选择标签弹窗显隐
dialogVisibleSelectUser
:
false
,
// 选择添加人弹窗显隐
selectedGroup
:
''
,
// 选择的标签分组
selectedTag
:
[],
// 选择的标签
removeTag
:
[],
// 可移除的标签
tagDialogType
:
{
title
:
''
,
// 选择标签弹窗标题
type
:
''
// 弹窗类型
},
isNotice
:
'0'
}
},
watch
:
{},
computed
:
{},
created
()
{
this
.
getList
()
// this.getListTag()
// this.getListOrganization()
this
.
getLossRemindStatus
()
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
<div>当企业成员被客户删除时,会在流失列表中产生一条记录,开启删除通知后,被删除的成员会收到一条推送</div>
`
)
},
mounted
()
{},
methods
:
{
getList
(
page
)
{
// console.log(this.dateRange);
if
(
this
.
dateRange
)
{
this
.
query
.
beginTime
=
this
.
dateRange
[
0
]
this
.
query
.
endTime
=
this
.
dateRange
[
1
]
}
else
{
this
.
query
.
beginTime
=
''
this
.
query
.
endTime
=
''
}
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
getListNew
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
+
total
this
.
loading
=
false
this
.
multipleSelection
=
[]
)
},
mounted
()
{},
methods
:
{
getList
(
page
)
{
// console.log(this.dateRange);
if
(
this
.
dateRange
)
{
this
.
query
.
beginTime
=
this
.
dateRange
[
0
]
this
.
query
.
endTime
=
this
.
dateRange
[
1
]
}
else
{
this
.
query
.
beginTime
=
''
this
.
query
.
endTime
=
''
}
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
getListNew
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
+
total
this
.
loading
=
false
this
.
multipleSelection
=
[]
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
// getListTag() {
// getListTag().then(({ rows }) => {
// this.listTagOneArray = []
// rows.forEach((element) => {
// element.weTags.forEach((d) => {
// this.listTagOneArray.push(d)
// })
// })
// })
// },
// getListOrganization() {
// getListOrganization().then(({ rows }) => {
// this.listOrganization = Object.freeze(rows)
// })
// },
getLossRemindStatus
()
{
getLossRemindStatus
().
then
(({
data
})
=>
{
this
.
isNotice
=
data
})
.
catch
(()
=>
{
this
.
loading
=
false
},
showTagDialog
()
{
this
.
selectedTag
=
this
.
queryTag
this
.
tagDialogType
=
{
title
:
'选择标签'
,
type
:
'1'
}
this
.
dialogVisible
=
true
},
// /** 导出按钮操作 */
// exportCustomer() {
// const queryParams = this.query
// this.$confirm('是否确认导出所有客户数据项?', '警告', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(function() {
// return exportCustomer(queryParams)
// })
// .then((response) => {
// this.download(response.msg)
// })
// .catch(function() {})
// },
selectedUser
(
list
)
{
this
.
queryUser
=
list
this
.
query
.
userIds
=
list
.
map
((
d
)
=>
d
.
userId
)
+
''
},
submitSelectTag
(
selected
)
{
if
(
this
.
tagDialogType
.
type
===
'1'
)
{
this
.
query
.
tagIds
=
selected
.
map
((
d
)
=>
d
.
tagId
)
+
''
// debugger;
this
.
queryTag
=
selected
this
.
dialogVisible
=
false
}
},
resetForm
()
{
this
.
dateRange
=
[]
this
.
queryTag
=
[]
this
.
queryUser
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
getList
(
1
)
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
multipleSelection
=
selection
},
// 流失提醒开关事件
remindSwitch
(
val
)
{
lossRemind
(
val
).
then
(()
=>
{
this
.
msgSuccess
(
'操作成功'
)
})
},
// getListTag() {
// getListTag().then(({ rows }) => {
// this.listTagOneArray = []
// rows.forEach((element) => {
// element.weTags.forEach((d) => {
// this.listTagOneArray.push(d)
// })
// })
// })
// },
// getListOrganization() {
// getListOrganization().then(({ rows }) => {
// this.listOrganization = Object.freeze(rows)
// })
// },
getLossRemindStatus
()
{
getLossRemindStatus
().
then
(({
data
})
=>
{
this
.
isNotice
=
data
})
},
showTagDialog
()
{
this
.
selectedTag
=
this
.
queryTag
this
.
tagDialogType
=
{
title
:
'选择标签'
,
type
:
'1'
}
this
.
dialogVisible
=
true
},
// /** 导出按钮操作 */
// exportCustomer() {
// const queryParams = this.query
// this.$confirm('是否确认导出所有客户数据项?', '警告', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(function() {
// return exportCustomer(queryParams)
// })
// .then((response) => {
// this.download(response.msg)
// })
// .catch(function() {})
// },
selectedUser
(
list
)
{
this
.
queryUser
=
list
this
.
query
.
userIds
=
list
.
map
((
d
)
=>
d
.
userId
)
+
''
},
submitSelectTag
(
selected
)
{
if
(
this
.
tagDialogType
.
type
===
'1'
)
{
this
.
query
.
tagIds
=
selected
.
map
((
d
)
=>
d
.
tagId
)
+
''
// debugger;
this
.
queryTag
=
selected
this
.
dialogVisible
=
false
}
},
resetForm
()
{
this
.
dateRange
=
[]
this
.
queryTag
=
[]
this
.
queryUser
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
getList
(
1
)
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
multipleSelection
=
selection
},
// 流失提醒开关事件
remindSwitch
(
val
)
{
lossRemind
(
val
).
then
(()
=>
{
this
.
msgSuccess
(
'操作成功'
)
})
}
}
}
</
script
>
<
template
>
<div>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
<el-form-item
label=
"客户名称"
prop=
"name"
>
<el-input
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"添加人"
>
<div
class=
"tag-input"
@
click=
"dialogVisibleSelectUser = true"
>
<span
class=
"tag-place"
v-if=
"!queryUser.length"
>
请选择
</span>
<template
v-else
>
<el-tag
type=
"info"
v-for=
"(unit, unique) in queryUser"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag>
<el-tag
type=
"info"
v-for=
"(unit, unique) in queryUser"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag>
</
template
>
</div>
</el-form-item>
<el-form-item
label=
"添加日期"
>
<el-date-picker
clearable
v-model=
"dateRange"
type=
"daterange"
value-format=
"yyyy-MM-dd"
...
...
@@ -202,23 +194,15 @@ export default {
<div
class=
"tag-input"
@
click=
"showTagDialog"
>
<span
class=
"tag-place"
v-if=
"!queryTag.length"
>
请选择
</span>
<
template
v-else
>
<el-tag
type=
"info"
v-for=
"(unit, unique) in queryTag"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag>
<el-tag
type=
"info"
v-for=
"(unit, unique) in queryTag"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag>
</
template
>
</div>
</el-form-item>
<el-form-item
label=
" "
>
<!-- v-hasPermi="['customerManage:customer:query']" -->
<el-button
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button
>
<!-- v-hasPermi="['customerManage:customer:query']" -->
<el-button
type=
"success"
@
click=
"resetForm()"
>
重置
</el-button
>
<el-button
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<!-- v-hasPermi="['customerManage:customer:query']" -->
<el-button
type=
"success"
@
click=
"resetForm()"
>
重置
</el-button>
<!-- <el-button
v-hasPermi="['customerManage:customer:export']"
type="info"
...
...
@@ -241,8 +225,7 @@ export default {
@
change=
"remindSwitch"
></el-switch>
</div>
<!-- v-hasPermi="['customerManage/customer:makeTag']" -->
<!-- v-hasPermi="['customerManage/customer:makeTag']" -->
</div>
<el-table
...
...
@@ -250,7 +233,7 @@ export default {
ref=
"multipleTable"
:data=
"list"
tooltip-effect=
"dark"
style=
"width: 100%"
style=
"width: 100%
;
"
@
selection-change=
"handleSelectionChange"
>
<!-- <el-table-column type="selection" align="center" width="55"></el-table-column> -->
...
...
@@ -272,9 +255,7 @@ export default {
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"address"
label
=
"标签"
align
=
"center"
>
<
template
slot
-
scope
=
"
{
row
}
" v-if="
row
.
tagNames
">
<el-tag type="
info
" v-for="
(
unit
,
unique
)
in
row
.
tagNames
.
split
(
','
)
" :key="
unique
"
>
{{
unit
}}
<
/el-tag
>
<el-tag type="
info
" v-for="
(
unit
,
unique
)
in
row
.
tagNames
.
split
(
','
)
" :key="
unique
"
>
{{
unit
}}
<
/el-tag
>
<!--
<
div
v
-
for
=
"(item, index) in row.weFlowerCustomerRels"
:
key
=
"index"
>
<
el
-
tag
type
=
"info"
v
-
for
=
"(unit, unique) in item.weFlowerCustomerTagRels"
:
key
=
"unique"
>
{{
...
...
@@ -285,7 +266,7 @@ export default {
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
width
=
"100"
>
<
template
slot
-
scope
=
"
{
row
}
">
<!-- v-hasPermi="
[
'customerManage:customer:view'
]
" -->
<!-- v-hasPermi="
[
'customerManage:customer:view'
]
" -->
<el-button
@click="
...
...
@@ -293,7 +274,7 @@ export default {
path
:
'customerDetail'
,
query
:
{
externalUserid
:
row
.
externalUserid
,
userId
:
row
.
firstUserId
,
userId
:
row
.
firstUserId
}
}
)
"
...
...
@@ -325,27 +306,23 @@ export default {
</SelectTag>
<!-- 选择添加人弹窗 -->
<SelectUser
:visible.sync="
dialogVisibleSelectUser
"
title="
选择添加人
"
@success="
selectedUser
"
></SelectUser>
<SelectUser :visible.sync="
dialogVisibleSelectUser
" title="
选择添加人
" @success="
selectedUser
"></SelectUser>
</div>
</template>
<style lang="
scss
"
scoped
>
.
el
-
icon
-
s
-
custom
{
font
-
size
:
16
px
;
margin
-
left
:
4
px
;
color
:
#
999
;
&
.
man
{
color
:
#
13
a2e8
;
.
el
-
icon
-
s
-
custom
{
font
-
size
:
16
px
;
margin
-
left
:
4
px
;
color
:
#
999
;
&
.
man
{
color
:
#
13
a2e8
;
}
&
.
woman
{
color
:
#
f753b2
;
}
}
&
.
woman
{
color
:
#
f753b2
;
.
bfc
-
d
+
.
bfc
-
d
.
el
-
checkbox
:
first
-
child
{
margin
-
left
:
10
px
;
}
}
.
bfc
-
d
+
.
bfc
-
d
.
el
-
checkbox
:
first
-
child
{
margin
-
left
:
10
px
;
}
<
/style
>
linkwe-pc/src/views/drainageCode/group/customer.vue
View file @
3bfcc0e
<
script
>
import
{
getList
}
from
'@/api/customer/group'
import
{
getList
}
from
'@/api/customer/group'
export
default
{
props
:
{
customerGroupId
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
query
:
{
groupLeader
:
''
,
groupName
:
''
,
beginTime
:
''
,
endTime
:
''
,
pageNum
:
1
,
pageSize
:
10
},
searchDate
:
''
,
// 查询日期
loading
:
false
,
// 加载状态
total
:
0
,
// 总数据量
customerGroups
:
[],
// 客户群数据
currentRow
:
null
,
// 当前选中行
}
},
watch
:
{
searchDate
(
dateRange
)
{
if
(
!
dateRange
||
dateRange
.
length
!==
2
)
{
this
.
query
.
beginTime
=
''
this
.
query
.
endTime
=
''
}
else
{
;[
this
.
query
.
beginTime
,
this
.
query
.
endTime
]
=
dateRange
export
default
{
props
:
{
customerGroupId
:
{
type
:
String
,
default
:
''
}
}
},
created
()
{
this
.
getList
()
},
methods
:
{
// 获取客户群数据
getList
()
{
const
params
=
Object
.
assign
({},
this
.
query
)
this
.
loading
=
true
getList
(
params
)
.
then
((
res
)
=>
{
this
.
customerGroups
=
res
.
rows
this
.
total
=
parseInt
(
res
.
total
)
for
(
let
group
of
this
.
customerGroups
)
{
if
(
group
.
chatId
===
this
.
customerGroupId
)
this
.
currentRow
=
group
}
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
// 单选变更
handleSelectionChange
(
val
)
{
this
.
currentRow
=
val
data
()
{
return
{
query
:
{
groupLeader
:
''
,
groupName
:
''
,
beginTime
:
''
,
endTime
:
''
,
pageNum
:
1
,
pageSize
:
10
},
searchDate
:
''
,
// 查询日期
loading
:
false
,
// 加载状态
total
:
0
,
// 总数据量
customerGroups
:
[],
// 客户群数据
currentRow
:
null
// 当前选中行
}
},
resetQuery
()
{
this
.
searchDate
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
$nextTick
(()
=>
{
this
.
getList
()
})
watch
:
{
searchDate
(
dateRange
)
{
if
(
!
dateRange
||
dateRange
.
length
!==
2
)
{
this
.
query
.
beginTime
=
''
this
.
query
.
endTime
=
''
}
else
{
;[
this
.
query
.
beginTime
,
this
.
query
.
endTime
]
=
dateRange
}
}
},
created
()
{
this
.
getList
()
},
submit
()
{
this
.
$emit
(
'callback'
,
this
.
currentRow
)
methods
:
{
// 获取客户群数据
getList
()
{
const
params
=
Object
.
assign
({},
this
.
query
)
this
.
loading
=
true
getList
(
params
)
.
then
((
res
)
=>
{
this
.
customerGroups
=
res
.
rows
this
.
total
=
parseInt
(
res
.
total
)
for
(
let
group
of
this
.
customerGroups
)
{
if
(
group
.
chatId
===
this
.
customerGroupId
)
this
.
currentRow
=
group
}
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
// 单选变更
handleSelectionChange
(
val
)
{
this
.
currentRow
=
val
},
resetQuery
()
{
this
.
searchDate
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
$nextTick
(()
=>
{
this
.
getList
()
})
},
submit
()
{
this
.
$emit
(
'callback'
,
this
.
currentRow
)
}
}
}
}
</
script
>
<
template
>
<div>
<el-form
ref=
"queryForm"
:model=
"query"
:inline=
"true"
class=
"top-search"
label-width=
"100px"
>
<el-form
ref=
"queryForm"
:model=
"query"
:inline=
"true"
class=
"top-search"
label-width=
"100px"
>
<el-form-item
label=
"群名"
prop=
"groupName"
>
<el-input
v-model=
"query.groupName"
placeholder=
"请输入群名"
></el-input>
<el-input
clearable
v-model=
"query.groupName"
placeholder=
"请输入群名"
></el-input>
</el-form-item>
<el-form-item
label=
"群主"
prop=
"groupLeader"
>
<el-input
v-model=
"query.groupLeader"
placeholder=
"请输入群主"
></el-input>
<el-input
clearable
v-model=
"query.groupLeader"
placeholder=
"请输入群主"
></el-input>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-date-picker
clearable
v-model=
"searchDate"
format=
"yyyy-MM-dd"
value-format=
"yyyyMMdd"
...
...
@@ -109,40 +104,16 @@ export default {
</el-form-item>
</el-form>
<el-table
:data=
"customerGroups"
v-loading=
"loading"
highlight-current-row
@
current-change=
"handleSelectionChange"
>
<el-table-column
width=
"55"
align=
"center"
>
<el-table
:data=
"customerGroups"
v-loading=
"loading"
highlight-current-row
@
current-change=
"handleSelectionChange"
>
<el-table-column
width=
"55"
align=
"center"
>
<template
#
default=
"
{ row }">
<el-checkbox
:value=
"currentRow && row.chatId === currentRow.chatId"
></el-checkbox>
</
template
>
</el-table-column>
<el-table-column
prop=
"groupName"
label=
"群名"
align=
"center"
></el-table-column>
<el-table-column
prop=
"memberNum"
label=
"群人数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"groupLeaderName"
label=
"群主"
align=
"center"
></el-table-column>
<el-table-column
prop=
"createTime"
label=
"创建时间"
align=
"center"
></el-table-column>
<el-table-column
prop=
"groupName"
label=
"群名"
align=
"center"
></el-table-column>
<el-table-column
prop=
"memberNum"
label=
"群人数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"groupLeaderName"
label=
"群主"
align=
"center"
></el-table-column>
<el-table-column
prop=
"createTime"
label=
"创建时间"
align=
"center"
></el-table-column>
</el-table>
<pagination
...
...
linkwe-pc/src/views/drainageCode/group/list.vue
View file @
3bfcc0e
...
...
@@ -3,7 +3,7 @@
<div
class=
"g-card g-pad20"
>
<el-form
ref=
"queryForm"
:model=
"query"
inline
class=
"top-search"
label-position=
"left"
label-width=
"80px"
>
<el-form-item
label=
"活码名称"
prop=
"activityName"
>
<el-input
v-model=
"query.activityName"
placeholder=
"请输入活码名称"
></el-input>
<el-input
clearable
v-model=
"query.activityName"
placeholder=
"请输入活码名称"
></el-input>
</el-form-item>
<el-form-item
label=
"客群标签"
prop=
"tagIds"
>
<el-input
:value=
"tagNames"
readonly
@
focus=
"showSelectTag = true"
placeholder=
"请选择客群标签"
/>
...
...
linkwe-pc/src/views/drainageCode/highSeas/index.vue
View file @
3bfcc0e
...
...
@@ -30,7 +30,7 @@
@
keyup
.
enter
.
native=
"getList(1)"
/>
</el-form-item>
<el-form-item
label=
"添加状态"
prop=
"addState"
>
<el-select
v-model=
"query.addState"
>
<el-select
clearable
v-model=
"query.addState"
>
<el-option
label=
"待添加"
:value=
"0"
></el-option>
<el-option
label=
"已添加"
:value=
"1"
></el-option>
<!--
<el-option
label=
"待通过"
:value=
"3"
>
...
...
linkwe-pc/src/views/drainageCode/store/add.vue
View file @
3bfcc0e
...
...
@@ -2,24 +2,44 @@
<div>
<el-form
label-width=
"120px"
label-position=
"right"
ref=
"form"
:rules=
"rule"
:model=
"form"
>
<div
class=
"g-card g-pad20"
>
<div
class=
"card-title"
style=
"display:inline-block;"
>
基础信息
</div>
<div
style=
"float:right;"
v-if=
"isDetail"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"
$router.push(
{
path: 'add',
query: {
id: $route.query.id,
obj: encodeURIComponent(JSON.stringify(form)),
},
})">编辑
</el-button>
<div
class=
"card-title"
style=
"display: inline-block;"
>
基础信息
</div>
<div
style=
"float: right;"
v-if=
"isDetail"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"
$router.push(
{
path: 'add',
query: {
id: $route.query.id,
obj: encodeURIComponent(JSON.stringify(form))
}
})
"
>编辑
</el-button
>
</div>
<el-form-item
label=
"门店名称"
prop=
"storeName"
>
<el-input
:disabled=
"isDetail"
v-model=
"form.storeName"
placeholder=
"请输入门店名称"
style=
"width: 400px;"
show-word-limit
maxlength=
"30"
/>
<el-input
:disabled=
"isDetail"
v-model=
"form.storeName"
placeholder=
"请输入门店名称"
style=
"width: 400px;"
show-word-limit
maxlength=
"30"
/>
</el-form-item>
<el-form-item
label=
"所属地区"
prop=
"area"
>
<el-cascader
:disabled=
"isDetail"
v-model=
"areaArray"
:props=
"props"
:options=
"cityTree"
ref=
"tree"
@
change=
"handleTree"
></el-cascader>
<el-cascader
:disabled=
"isDetail"
v-model=
"areaArray"
:props=
"props"
:options=
"cityTree"
ref=
"tree"
@
change=
"handleTree"
></el-cascader>
</el-form-item>
<baidu-map
@
update=
"handleChange"
:isDetail=
"isDetail"
:initData=
"form"
></baidu-map>
<baidu-map
@
update=
"handleChange"
@
point=
"getPoint"
:isDetail=
"isDetail"
:initData=
"form"
></baidu-map>
</div>
<div
class=
"g-card g-pad20"
>
<div
class=
"card-title"
>
...
...
@@ -29,25 +49,51 @@
<div
v-if=
"selectedUserList.length > 0"
>
<el-tag
size=
"medium"
v-for=
"(item, index) in selectedUserList"
:key=
"index"
>
{{
item
.
name
}}
</el-tag>
</div>
<el-button
v-if=
"!isDetail"
icon=
"el-icon-plus"
type=
"primary"
plain
size=
"mini"
@
click=
"onSelectUser"
>
{{
selectedUserList
.
length
?
'编辑'
:
'选择'
}}
导购
</el-button>
<el-button
v-if=
"!isDetail"
icon=
"el-icon-plus"
type=
"primary"
plain
size=
"mini"
@
click=
"onSelectUser"
>
{{
selectedUserList
.
length
?
'编辑'
:
'选择'
}}
导购
</el-button
>
</el-form-item>
<el-form-item
label=
"门店群活码"
>
<template>
<div
v-if=
"form.groupCodeUrl"
>
<div>
{{
form
.
groupCodeName
}}
</div>
<img
style=
"height: 80px;
width: 80px;
margin-top: 5px;"
:src=
"form.groupCodeUrl"
/>
<div>
{{
form
.
groupCodeName
}}
</div>
<img
style=
"height: 80px;
width: 80px;
margin-top: 5px;"
:src=
"form.groupCodeUrl"
/>
</div>
</
template
>
<
template
>
<el-button
v-if=
"!isDetail"
icon=
"el-icon-plus"
type=
"primary"
plain
size=
"mini"
@
click=
"dialogVisibleSelectQrCode = true"
>
{{
form
.
groupCodeUrl
?
'编辑'
:
'选择'
}}
群活码
</el-button>
<el-button
v-if=
"!isDetail"
icon=
"el-icon-plus"
type=
"primary"
plain
size=
"mini"
@
click=
"dialogVisibleSelectQrCode = true"
>
{{
form
.
groupCodeUrl
?
'编辑'
:
'选择'
}}
群活码
</el-button
>
</
template
>
</el-form-item>
<el-form-item
label=
"门店状态"
>
<
template
v-if=
"!isDetail"
>
<el-switch
size=
"mini"
:disabled=
"!form.groupCodeUrl && !form.shopGuideId"
v-model=
"form.storeState"
active-text=
"启用"
inactive-text=
'停用'
:active-value=
0
:inactive-value=
1
></el-switch>
<el-switch
size=
"mini"
:disabled=
"!form.groupCodeUrl && !form.shopGuideId"
v-model=
"form.storeState"
active-text=
"启用"
inactive-text=
"停用"
:active-value=
"0"
:inactive-value=
"1"
></el-switch>
</
template
>
<
template
v-else
>
<el-switch
size=
"mini"
disabled
v-model=
"form.storeState"
active-text=
"启用"
inactive-text=
'停用'
:active-value=
0
:inactive-value=
1
></el-switch>
<el-switch
size=
"mini"
disabled
v-model=
"form.storeState"
active-text=
"启用"
inactive-text=
"停用"
:active-value=
"0"
:inactive-value=
"1"
></el-switch>
</
template
>
</el-form-item>
</div>
...
...
@@ -56,10 +102,20 @@
<el-button
type=
"primary"
@
click=
"submitFn"
:loading=
"submitLoading"
:disabled=
"submitLoading"
>
确定
</el-button>
</el-form-item>
</el-form>
<SelectWeUser
key=
"123"
:visible
.
sync=
"dialogVisibleSelectUser"
title=
"选择导购"
:isOnlyLeaf=
"true"
:defaultValues=
"selectedUserList"
@
success=
"selectedUser"
></SelectWeUser>
<SelectQrCode
:visible
.
sync=
"dialogVisibleSelectQrCode"
@
success=
"selectedQrCode"
:selected=
"selectedCodeList"
></SelectQrCode>
<SelectWeUser
key=
"123"
:visible
.
sync=
"dialogVisibleSelectUser"
title=
"选择导购"
:isOnlyLeaf=
"true"
:defaultValues=
"selectedUserList"
@
success=
"selectedUser"
></SelectWeUser>
<SelectQrCode
:visible
.
sync=
"dialogVisibleSelectQrCode"
@
success=
"selectedQrCode"
:selected=
"selectedCodeList"
></SelectQrCode>
</div>
</template>
<
script
>
import
BaiduMap
from
'@/components/common/BaiduMap'
...
...
@@ -67,10 +123,10 @@
import
SelectWeUser
from
'@/components/SelectWeUser'
import
{
getProCityList
}
from
'@/api/common'
import
{
addOrUpdateStore
,
storeDetail
}
from
"@/api/drainageCode/store"
import
{
addOrUpdateStore
,
storeDetail
}
from
'@/api/drainageCode/store'
export
default
{
name
:
'store-add'
,
data
()
{
data
()
{
return
{
areaArray
:
[],
current
:
{
...
...
@@ -105,15 +161,9 @@
value
:
'name'
},
rule
:
{
storeName
:
[
{
required
:
true
,
message
:
'请输入门店名称'
,
trigger
:
'blur'
}
],
area
:
[
{
required
:
true
,
message
:
'请选择所属地区'
,
trigger
:
'blur'
}
],
address
:
[
{
required
:
true
,
message
:
'请选择详细地址'
,
trigger
:
'blur'
}
]
storeName
:
[{
required
:
true
,
message
:
'请输入门店名称'
,
trigger
:
'blur'
}],
area
:
[{
required
:
true
,
message
:
'请选择所属地区'
,
trigger
:
'blur'
}],
address
:
[{
required
:
true
,
message
:
'请选择详细地址'
,
trigger
:
'blur'
}]
}
}
},
...
...
@@ -129,35 +179,39 @@
SelectWeUser
},
methods
:
{
handleChange
(
data
)
{
getPoint
(
addrPoint
)
{
this
.
form
.
longitude
=
addrPoint
.
lng
.
toString
()
this
.
form
.
latitude
=
addrPoint
.
lat
.
toString
()
},
handleChange
(
data
)
{
if
(
data
.
address
)
{
this
.
form
.
address
=
data
.
address
this
.
form
.
area
=
data
.
province
+
data
.
city
+
data
.
area
if
(
data
.
province
)
{
this
.
areaArray
=
[
data
.
province
,
data
.
city
,
data
.
area
]
this
.
areaArray
=
[
data
.
province
,
data
.
city
,
data
.
area
]
}
this
.
form
.
longitude
=
data
.
addrPoint
.
lng
.
toString
()
this
.
form
.
latitude
=
data
.
addrPoint
.
lat
.
toString
()
}
},
handleTree
(
data
)
{
handleTree
(
data
)
{
this
.
form
.
area
=
this
.
areaArray
.
join
(
''
)
},
selectedUser
(
data
)
{
selectedUser
(
data
)
{
this
.
selectedUserList
=
data
let
ids
=
[]
let
names
=
[]
data
.
forEach
(
dd
=>
{
data
.
forEach
(
(
dd
)
=>
{
ids
.
push
(
dd
.
userId
)
names
.
push
(
dd
.
name
)
})
this
.
form
.
shopGuideId
=
ids
.
join
(
','
)
this
.
form
.
shopGuideName
=
names
.
join
(
','
)
},
onSelectUser
()
{
onSelectUser
()
{
this
.
dialogVisibleSelectUser
=
true
},
selectedQrCode
(
data
)
{
selectedQrCode
(
data
)
{
if
(
data
)
{
this
.
selectedCodeList
[
0
]
=
data
this
.
form
.
groupCodeUrl
=
data
.
codeUrl
...
...
@@ -165,11 +219,11 @@
this
.
form
.
groupCodeId
=
data
.
id
}
},
submitFn
()
{
submitFn
()
{
this
.
$refs
[
'form'
].
validate
((
valitate
)
=>
{
if
(
valitate
)
{
this
.
submitLoading
=
true
addOrUpdateStore
(
this
.
form
).
then
(
res
=>
{
addOrUpdateStore
(
this
.
form
).
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
msgSuccess
(
'操作成功'
)
this
.
$router
.
back
()
...
...
@@ -182,23 +236,23 @@
}
})
},
cancelFn
()
{
this
.
$confirm
(
`是否确认取消
${
this
.
$route
.
query
.
id
?
'编辑'
:
'新建'
}
?取消后不可恢复,请谨慎操作。`
,
'提示'
,
{
cancelFn
()
{
this
.
$confirm
(
`是否确认取消
${
this
.
$route
.
query
.
id
?
'编辑'
:
'新建'
}
?取消后不可恢复,请谨慎操作。`
,
'提示'
,
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
$router
.
back
()
})
.
catch
(
function
()
{
})
.
catch
(
function
()
{})
},
setDetail
()
{
setDetail
()
{
if
(
this
.
form
.
groupCodeId
)
{
this
.
selectedCodeList
[
0
]
=
{
id
:
this
.
form
.
groupCodeId
}
}
if
(
this
.
form
.
area
)
{
let
reg
=
/.+
?(
省|市|自治区|自治州|县|区|旗
)
/g
;
let
reg
=
/.+
?(
省|市|自治区|自治州|县|区|旗
)
/g
let
arr
=
this
.
form
.
area
.
match
(
reg
)
this
.
areaArray
=
arr
}
...
...
@@ -215,21 +269,21 @@
}
}
},
created
()
{
getProCityList
().
then
(
res
=>
{
created
()
{
getProCityList
().
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
cityTree
=
res
.
data
}
})
if
(
this
.
$route
.
query
.
id
)
{
storeDetail
(
this
.
$route
.
query
.
id
).
then
(
res
=>
{
storeDetail
(
this
.
$route
.
query
.
id
).
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
form
=
res
.
data
this
.
setDetail
()
}
})
}
}
,
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -240,4 +294,4 @@
color
:
#333333
;
margin-bottom
:
20px
;
}
</
style
>
\ No newline at end of file
</
style
>
linkwe-pc/src/views/drainageCode/welcome/components/Tab.vue
View file @
3bfcc0e
...
...
@@ -5,7 +5,7 @@
<el-form
label-position=
"left"
inline
label-width=
"80px"
>
<el-form-item
label=
"欢迎语"
>
<el-input
placeholder=
"请输入欢迎语"
v-model=
"query.welcomeMsg"
style=
"width: 260px;"
></el-input>
<el-input
clearable
placeholder=
"请输入欢迎语"
v-model=
"query.welcomeMsg"
style=
"width: 260px;"
></el-input>
</el-form-item>
<el-form-item
label-width=
"0"
>
<!--
<el-button
v-hasPermi=
"['wecom:code:list']"
type=
"cyan"
@
click=
"getList(1)"
>
查询
</el-button>
-->
...
...
linkwe-pc/src/views/friendCircle/enterprise.vue
View file @
3bfcc0e
...
...
@@ -14,6 +14,7 @@
</el-form-item>
-->
<el-form-item
label=
"时间范围"
>
<el-date-picker
clearable
v-model=
"value1"
format=
"yyyy-MM-dd"
@
change=
"setTimeChange"
...
...
linkwe-pc/src/views/friendCircle/index.vue
View file @
3bfcc0e
...
...
@@ -14,6 +14,7 @@
</el-form-item>
<el-form-item
label=
"时间范围"
>
<el-date-picker
clearable
v-model=
"value1"
format=
"yyyy-MM-dd"
@
change=
"setTimeChange"
...
...
linkwe-pc/src/views/redPacketTool/enterprisePacket.vue
View file @
3bfcc0e
...
...
@@ -3,7 +3,7 @@
<div
class=
"top-search"
>
<el-form
inline
label-position=
"right"
:model=
"query"
label-width=
"100px"
ref=
"queryForm"
>
<el-form-item
label=
"红包状态"
prop=
"status"
>
<el-select
v-model=
"query.status"
placeholder=
"请选择"
>
<el-select
clearable
v-model=
"query.status"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, key) in dictStatusType"
:key=
"key"
...
...
@@ -13,7 +13,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"发送场景"
prop=
"sceneType"
>
<el-select
v-model=
"query.sceneType"
placeholder=
"请选择"
size=
"small"
>
<el-select
clearable
v-model=
"query.sceneType"
placeholder=
"请选择"
size=
"small"
>
<el-option
v-for=
"(item, key) in dictSendSence"
:key=
"key"
...
...
linkwe-pc/src/views/redPacketTool/sendRecord/Customer.vue
View file @
3bfcc0e
...
...
@@ -109,13 +109,13 @@
</div>
</el-form-item>
<el-form-item
label=
"领取客户"
prop=
"customerName"
>
<el-input
v-model=
"query.customerName"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.customerName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"发放时间"
>
<el-date-picker
v-model=
"dateRange"
value-format=
"yyyy-MM-dd"
type=
"daterange"
:picker-options=
"pickerOptions"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
align=
"right"
></el-date-picker>
<el-date-picker
clearable
v-model=
"dateRange"
value-format=
"yyyy-MM-dd"
type=
"daterange"
:picker-options=
"pickerOptions"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
align=
"right"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"全部类型"
prop=
"sendState"
>
<el-select
v-model=
"query.sendState"
placeholder=
"请选择"
>
<el-select
clearable
v-model=
"query.sendState"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, key) in dictStatusType"
:key=
"key"
:label=
"item"
:value=
"key"
></el-option>
</el-select>
</el-form-item>
...
...
linkwe-pc/src/views/redPacketTool/sendRecord/Group.vue
View file @
3bfcc0e
...
...
@@ -4,7 +4,7 @@
export
default
{
components
:
{
CardGroupIndex
},
data
()
{
data
()
{
return
{
query
:
{
pageNum
:
1
,
...
...
@@ -13,7 +13,7 @@
groupName
:
''
,
// 客户群名
redEnvelopeType
:
''
,
// 1: 普通红包2:拼手气红包
beginTime
:
''
,
// 创建开始时间
endTime
:
''
,
// 创建结束时间
endTime
:
''
// 创建结束时间
},
dateRange
:
[],
// 添加日期
total
:
0
,
//
...
...
@@ -23,7 +23,7 @@
dictStatusType
:
Object
.
freeze
({
0
:
'全部类型'
,
1
:
'普通红包'
,
2
:
'拼手气红包'
,
2
:
'拼手气红包'
}),
dialogVisible
:
false
,
...
...
@@ -32,23 +32,23 @@
query
:
{
pageNum
:
1
,
pageSize
:
10
,
chatId
:
''
,
// 群id
chatId
:
''
// 群id
},
loading
:
false
,
total
:
0
,
//
list
:
[]
,
//
list
:
[]
//
},
dialogVisibleSelectUser
:
false
,
// 选择添加人弹窗显隐
queryUser
:
[]
,
// 搜索框选择的添加人
queryUser
:
[]
// 搜索框选择的添加人
}
},
watch
:
{},
created
()
{
created
()
{
this
.
getList
()
},
methods
:
{
getList
(
page
)
{
getList
(
page
)
{
if
(
this
.
dateRange
)
{
;[
this
.
query
.
beginTime
,
this
.
query
.
endTime
]
=
this
.
dateRange
}
else
{
...
...
@@ -68,17 +68,17 @@
})
},
// 重置查询参数
resetQuery
()
{
resetQuery
()
{
this
.
dateRange
=
[]
this
.
queryUser
=
[]
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
getList
(
1
)
},
exportData
()
{
exportData
()
{
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
loading
=
true
...
...
@@ -95,26 +95,26 @@
})
},
// 处理多选
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
this
.
multiSelect
=
val
},
view
(
row
)
{
view
(
row
)
{
let
cardData
=
[
{
title
:
'群主'
,
value
:
row
.
groupLeaderName
,
noArrow
:
true
,
noArrow
:
true
},
{
title
:
'领取人数'
,
value
:
row
.
receiveNum
,
noArrow
:
true
,
noArrow
:
true
},
{
title
:
'剩余红包个数'
,
value
:
row
.
surplusNum
,
noArrow
:
true
,
}
,
noArrow
:
true
}
]
this
.
cardData
=
cardData
this
.
dialogVisible
=
true
...
...
@@ -123,7 +123,7 @@
this
.
getListGroupUser
(
1
)
},
// 获取领取详情
getListGroupUser
(
page
)
{
getListGroupUser
(
page
)
{
page
&&
(
this
.
dialog
.
query
.
pageNum
=
page
)
this
.
dialog
.
loading
=
true
getListGroupUser
(
this
.
dialog
.
query
)
...
...
@@ -135,8 +135,8 @@
.
catch
(()
=>
{
this
.
dialog
.
loading
=
false
})
}
,
}
,
}
}
}
</
script
>
...
...
@@ -153,15 +153,25 @@
</div>
</el-form-item>
<el-form-item
label=
"领取客户群"
prop=
"groupName"
>
<el-input
v-model=
"query.groupName"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.groupName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"全部类型"
prop=
"redEnvelopeType"
>
<el-select
v-model=
"query.redEnvelopeType"
placeholder=
"请选择"
>
<el-select
clearable
v-model=
"query.redEnvelopeType"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, key) in dictStatusType"
:key=
"key"
:label=
"item"
:value=
"key"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"发放时间"
>
<el-date-picker
v-model=
"dateRange"
value-format=
"yyyy-MM-dd"
type=
"daterange"
:picker-options=
"pickerOptions"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
align=
"right"
></el-date-picker>
<el-date-picker
clearable
v-model=
"dateRange"
value-format=
"yyyy-MM-dd"
type=
"daterange"
:picker-options=
"pickerOptions"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
align=
"right"
></el-date-picker>
</el-form-item>
<el-form-item
label=
" "
>
<!-- v-hasPermi="['customerManage:customer:query']" -->
...
...
@@ -172,14 +182,13 @@
<el-button
type=
"success"
@
click=
"resetQuery()"
>
重置
</el-button>
</el-form-item>
<el-form-item
style=
"float:right;"
>
<el-form-item
style=
"float:
right;"
>
<el-button
type=
"primary"
@
click=
"exportData()"
>
导出Excel
</el-button>
</el-form-item>
</el-form>
</div>
<div
class=
"mid-action"
>
<div>
<!-- <el-button
v-hasPermi="['customerManage:customer:export']"
...
...
@@ -194,8 +203,7 @@
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<!-- <el-table-column type="selection" width="50" align="center"></el-table-column> -->
<el-table-column
label=
"发放员工"
align=
"center"
prop=
"userName"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"领取客户群"
align=
"center"
prop=
"groupName"
width=
"120"
>
</el-table-column>
<el-table-column
label=
"领取客户群"
align=
"center"
prop=
"groupName"
width=
"120"
>
</el-table-column>
<el-table-column
label=
"红包类型"
align=
"center"
prop=
"redEnvelopeType"
>
<
template
slot-scope=
"{ row }"
>
...
...
@@ -216,29 +224,44 @@
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
<!-- 选择使用员工弹窗 -->
<SelectUser
:visible
.
sync=
"dialogVisibleSelectUser"
title=
"选择添加人"
:defaultValues=
"queryUser"
@
success=
"
<SelectUser
:visible
.
sync=
"dialogVisibleSelectUser"
title=
"选择添加人"
:defaultValues=
"queryUser"
@
success=
"
(list) => {
queryUser = list
query.userId = list.map((i) => i.userId).join()
}
"
></SelectUser>
"
></SelectUser>
<el-dialog
title=
"领取详情"
:visible
.
sync=
"dialogVisible"
width=
"width"
>
<div>
<CardGroupIndex
:data=
"cardData"
></CardGroupIndex>
<el-table
v-loading=
"dialog.loading"
:data=
"dialog.list"
>
<el-table-column
label=
"领取客户"
align=
"center"
width=
"120"
prop=
"customerName"
>
</el-table-column>
<el-table-column
label=
"领取客户"
align=
"center"
width=
"120"
prop=
"customerName"
>
</el-table-column>
<el-table-column
label=
"领取金额(元)"
align=
"center"
prop=
"redEnvelopeMoney"
></el-table-column>
<el-table-column
label=
"领取时间"
align=
"center"
prop=
"createTime"
></el-table-column>
<el-table-column
label=
"交易订单号"
align=
"center"
prop=
"orderNo"
></el-table-column>
</el-table>
<pagination
:total=
"dialog.total"
:page
.
sync=
"dialog.query.pageNum"
:limit
.
sync=
"dialog.query.pageSize"
@
pagination=
"getListGroupUser()"
/>
<pagination
:total=
"dialog.total"
:page
.
sync=
"dialog.query.pageNum"
:limit
.
sync=
"dialog.query.pageSize"
@
pagination=
"getListGroupUser()"
/>
</div>
<div
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment