Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
office
haoban-3
Commits
130f1a41
Commit
130f1a41
authored
Jul 13, 2022
by
huaying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 活码列表
parent
d885cff3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
436 additions
and
236 deletions
+436
-236
actCode.js
src/api/actCode.js
+2
-5
act-code-table.vue
...leads/actCodeManage/staffActCode/views/act-code-table.vue
+54
-59
batchAddCode.vue
...esleads/actCodeManage/staffActCode/views/batchAddCode.vue
+15
-7
group-list.vue
...alesleads/actCodeManage/staffActCode/views/group-list.vue
+26
-23
setActCode.vue
...alesleads/actCodeManage/staffActCode/views/setActCode.vue
+51
-51
ActCodeSet.vue
src/views/salesleads/components/ActCodeSet.vue
+94
-89
dataDetail.vue
src/views/salesleads/components/dataDetail.vue
+4
-2
welcomesItem.vue
src/views/salesleads/components/welcomesItem.vue
+190
-0
No files found.
src/api/actCode.js
View file @
130f1a41
import
{
postRequest
,
getRequest
}
from
'@/api/api'
;
// 活码分组查询
export
const
findActCodeGroupListApi
=
params
=>
postRequest
(
'/hm/group/list'
,
params
);
import
{
postRequest
,
getRequest
,
postJsonRequest
}
from
'@/api/api'
;
// 新增活码分组
export
const
addActCodeGroupApi
=
params
=>
postRequest
(
'/haoban-manage3-web/hm/group/save'
,
params
);
...
...
@@ -13,7 +10,7 @@ export const editActCodeGroupApi = params => postRequest('/haoban-manage3-web/hm
export
const
delActCodeGroupApi
=
params
=>
postRequest
(
'/haoban-manage3-web/hm/group/delete'
,
params
);
// 活码列表
export
const
actCodeListApi
=
params
=>
postRequest
(
'/haoban-manage3-web/hm/qrcode/list'
,
params
);
export
const
actCodeListApi
=
params
=>
post
Json
Request
(
'/haoban-manage3-web/hm/qrcode/list'
,
params
);
// 落地页模板列表
export
const
guidePageList
=
params
=>
getRequest
(
'/haoban-manage3-web/hm/guide/page/list'
,
params
);
...
...
src/views/salesleads/actCodeManage/staffActCode/views/act-code-table.vue
View file @
130f1a41
This diff is collapsed.
Click to expand it.
src/views/salesleads/actCodeManage/staffActCode/views/batchAddCode.vue
View file @
130f1a41
<
template
>
<div>
<setActCode>
<setActCode
@
submit=
"onSubmit"
>
<template
#
typeCode
>
<el-form-item
label=
"活码类型"
prop=
"hmType
"
>
<el-form-item
label=
"活码类型"
:rules=
"[
{ required: true, message: '请选择活码类型', trigger: 'blur' }]
">
<el-radio-group
v-model=
"form.hmType"
>
<el-radio
:label=
"1"
>
单人活码
</el-radio>
</el-radio-group>
...
...
@@ -15,8 +15,7 @@
<el-radio
:label=
"2"
>
部分成员
</el-radio>
</el-radio-group>
<br
/>
<!--
<el-button
plain
class=
"ylbtn"
v-if=
"form.memberType == 2"
><i
class=
"iconfont-components3 icon-cp-PlusOutlined addPic"
></i>
添加成员
</el-button>
-->
<select-clerk
v-if=
"form.memberType == 2"
@
change=
"onChange"
></select-clerk>
<select-clerk
v-if=
"form.memberType == 2"
:multiple=
"false"
:data=
"data"
@
change=
"onChange"
></select-clerk>
</el-form-item>
</
template
>
</setActCode>
...
...
@@ -32,14 +31,23 @@ export default {
return
{
form
:
{
hmType
:
1
,
clerkIdList
:
1
,
clerkIdList
:
[]
,
memberType
:
1
}
},
data
:
[]
};
},
methods
:
{
onChange
(
data
)
{
console
.
log
(
data
);
this
.
data
=
data
;
this
.
form
.
clerkIdList
=
data
;
},
onSubmit
(
event
)
{
let
obj
=
{
...
event
,
...
this
.
form
};
console
.
log
(
obj
,
'父组件,整体表单数据'
);
}
}
};
...
...
src/views/salesleads/actCodeManage/staffActCode/views/group-list.vue
View file @
130f1a41
<
template
>
<section>
<div
class=
"mb-10 mt-20 pl-16 pr-15"
>
<!-- @keyup.native="value => searchGroup(value)" -->
<el-input
placeholder=
"请输入分组名称"
maxlength=
"50"
v-model=
"searchGroupInput"
@
change=
"searchGroup"
>
<el-input
placeholder=
"请输入分组名称"
maxlength=
"50"
v-model=
"pageP.groupName"
clearable
@
change=
"onSearch"
>
<i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i>
</el-input>
</div>
...
...
@@ -25,9 +24,9 @@
<
/div
>
<
/li
>
<
/ul
>
<
p
v
-
if
=
"searchTip"
class
=
"searchTip"
>
没有找到和“
{{
searchGroupInput
}}
”相关的内容
<
/p
>
<
p
v
-
if
=
"searchTip"
class
=
"searchTip"
>
没有找到和“
{{
pageP
.
groupName
}}
”相关的内容
<
/p
>
<
/div
>
<
div
class
=
"add-category"
v
-
if
=
"
searchGroupInput == ''
"
>
<
div
class
=
"add-category"
v
-
if
=
"
groupList.length > 1
"
>
<
el
-
button
type
=
"primary"
class
=
"ghost-btn add-group"
@
click
=
"addGroup"
>
新增分组
<
/el-button
>
<
/div
>
<!--
新增
/
编辑分组
-->
...
...
@@ -56,14 +55,7 @@ export default {
searchTip
:
false
,
groupLoading
:
false
,
currentListItemUuid
:
1
,
searchGroupInput
:
''
,
groupList
:
[
{
groupName
:
'全部分组'
,
referNum
:
''
,
groupId
:
null
}
],
groupList
:
[],
scrollLoad
:
false
,
title
:
'新增分组'
,
addOrEditGroupDialog
:
false
,
...
...
@@ -76,9 +68,7 @@ export default {
}
,
isEditGroup
:
false
,
// 分页相关
pageNum
:
1
,
allPageNum
:
1
,
pageSize
:
20
,
pageP
:
{
groupName
:
''
,
pageNum
:
1
,
...
...
@@ -90,12 +80,16 @@ export default {
this
.
searchGroup
();
}
,
methods
:
{
onSearch
()
{
this
.
pageP
.
pageNum
=
1
;
this
.
searchGroup
();
}
,
load
()
{
if
(
this
.
allPageNum
>
this
.
pageP
.
p
ageNum
)
{
if
(
this
.
pageP
.
pageNum
<
this
.
allP
ageNum
)
{
this
.
pageP
.
pageNum
++
;
this
.
searchGroup
();
}
else
{
this
.
scrollLoad
=
true
;
//
this.scrollLoad = true;
}
}
,
clickGroupListItem
(
listItem
)
{
...
...
@@ -146,6 +140,7 @@ export default {
message
:
'删除成功!'
}
);
// this.groupList.splice(listItemIndex, 1);
this
.
pageP
.
pageNum
=
1
;
this
.
searchGroup
();
}
}
);
...
...
@@ -181,9 +176,11 @@ export default {
const
groupListItem
=
this
.
groupList
.
find
(({
groupId
}
)
=>
groupId
==
this
.
groupListForm
.
groupId
);
groupListItem
.
groupName
=
this
.
groupListForm
.
groupName
;
}
else
{
this
.
pageP
.
pageNum
=
1
;
this
.
searchGroup
();
//
this.pageP.pageNum = 1;
//
this.searchGroup();
}
this
.
pageP
.
pageNum
=
1
;
this
.
searchGroup
();
this
.
addOrEditGroupDialog
=
false
;
}
else
{
this
.
$message
({
...
...
@@ -198,22 +195,28 @@ export default {
this
.
groupLoading
=
true
;
const
countNum
=
await
getRequest
(
'/haoban-manage3-web/hm/group/refer/count'
,
{
}
);
if
(
this
.
pageP
.
pageNum
==
1
)
{
this
.
groupList
=
[
{
groupName
:
'全部分组'
,
referNum
:
''
,
groupId
:
null
}
];
this
.
groupList
[
0
].
referNum
=
countNum
.
data
.
result
;
}
// this.pageP.pageNum < this.allPageNum && this.pageP.pageNum++;
if
(
String
(
this
.
searchGroupInput
))
{
if
(
String
(
this
.
pageP
.
groupName
))
{
this
.
pageP
.
pageNum
=
1
;
this
.
pageP
.
groupName
=
this
.
searchGroupInput
;
this
.
groupList
=
[];
}
await
getRequest
(
'/haoban-manage3-web/hm/group/list'
,
this
.
pageP
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
const
{
result
,
pages
}
=
res
.
data
.
result
||
{
}
;
this
.
groupList
=
this
.
groupList
.
concat
(
result
);
if
(
this
.
searchGroupInput
==
''
)
{
if
(
this
.
pageP
.
groupName
==
''
)
{
this
.
searchTip
=
false
;
}
else
if
(
this
.
searchGroupInput
!=
''
)
{
this
.
groupList
.
splice
(
0
,
1
);
}
else
if
(
this
.
pageP
.
groupName
!=
''
)
{
//
this.groupList.splice(0, 1);
if
(
this
.
groupList
.
length
<=
0
)
{
this
.
searchTip
=
true
;
}
...
...
src/views/salesleads/actCodeManage/staffActCode/views/setActCode.vue
View file @
130f1a41
<
template
>
<div>
<setActCode
@
submit=
"
submit
"
>
<setActCode
@
submit=
"
onSubmit"
:actCodeData=
"detailCode
"
>
<template
#
typeCode
>
<el-form-item
label=
"活码类型"
prop=
"hmType
"
>
<el-form-item
label=
"活码类型"
:rules=
"[
{ required: true, message: '请选择活码类型', trigger: 'blur' }]
">
<el-radio-group
v-model=
"form.hmType"
@
change=
"changeEvent"
>
<el-radio
:label=
"1"
>
单人活码
</el-radio>
<el-radio
:label=
"2"
>
多人活码
</el-radio>
...
...
@@ -10,12 +10,12 @@
</el-form-item>
</
template
>
<
template
#
codeName
>
<el-form-item
label=
"活码名称"
prop=
"name
"
>
<el-form-item
label=
"活码名称"
:rules=
"[
{ required: true, message: '请输入活码名称', trigger: 'blur' }]
">
<el-input
class=
"w340"
v-model=
"form.name"
placeholder=
"请输入活码名称,默认使用成员名称"
maxlength=
"20"
show-word-limit
></el-input>
</el-form-item>
</
template
>
<
template
#
member
>
<el-form-item
label=
"使用成员"
prop=
"clerkIdList
"
>
<el-form-item
label=
"使用成员"
:rules=
"[
{ required: true, message: '请选择使用成员', trigger: 'blur' }]
">
<p
class=
"tabs"
v-if=
"form.hmType == 1"
>
单人活码仅可选择一名成员
</p>
<p
class=
"tabs"
v-if=
"form.hmType == 2"
>
若选择多名成员,则随机分配企微员工
</p>
<!--
<el-button
plain
class=
"ylbtn"
><i
class=
"iconfont-components3 icon-cp-PlusOutlined addPic"
></i>
添加成员
</el-button>
-->
...
...
@@ -29,8 +29,7 @@
<
script
>
import
setActCode
from
'@/views/salesleads/components/actCodeSet.vue'
;
import
SelectClerk
from
'../../components/select-clerk/index.vue'
;
import
{
getRequest
}
from
'@/api/api'
;
import
errMsg
from
'@/common/js/error'
;
import
{
getRequest
,
postRequest
}
from
'@/api/api'
;
export
default
{
components
:
{
setActCode
,
SelectClerk
},
data
()
{
...
...
@@ -39,9 +38,13 @@ export default {
form
:
{
hmType
:
1
,
name
:
''
,
clerkIdList
:
[]
clerkIdList
:
[],
hmUserNum
:
null
//多人活码人数
},
multiple
:
false
multiple
:
false
,
data
:
[],
dataArr
:
[],
detailCode
:
[]
};
},
created
()
{
...
...
@@ -50,64 +53,61 @@ export default {
}
},
methods
:
{
changeEvent
(
e
)
{
this
.
data
=
[];
this
.
dataArr
=
[];
if
(
e
==
2
)
{
this
.
multiple
=
true
;
}
else
if
(
e
==
1
)
{
this
.
multiple
=
false
;
}
},
onChange
(
data
)
{
console
.
log
(
data
);
this
.
data
=
data
.
map
(
item
=>
{
this
.
data
=
data
;
this
.
form
.
clerkIdList
=
data
.
map
(
item
=>
{
return
item
.
clerkId
;
});
this
.
dataArr
=
data
.
map
(
item
=>
{
return
item
.
clerkName
;
});
if
(
this
.
form
.
name
==
''
)
{
this
.
form
.
name
=
this
.
data
.
toString
();
this
.
form
.
name
=
this
.
data
Arr
.
toString
();
}
console
.
log
(
this
.
data
,
909
);
},
async
getActCodeInfo
()
{
const
that
=
this
;
if
(
this
.
$route
.
query
.
hmId
)
return
;
that
.
loading
=
true
;
await
getRequest
(
'/hm/qrcode/detail'
,
{
hmId
:
this
.
$route
.
query
.
hmId
}).
then
(
res
=>
{
console
.
log
(
res
,
'detail'
);
// let res = {
// data: {
// errorCode: 1,
// result: {
// name: '测试活码好的可以',
// hmId: '727363646474849483332',
// statusFlag: 1,
// overFlag: 1,
// hmType: 2,
// creatorName: '少见多怪',
// createTime: 182736347383,
// passFlag: 0,
// welcomeId: 'b680a2cf18b742cc9f4560f6195c9ec6',
// enterpriseId: '5bd929fd3b2c49deaa1184bcb0d669b3'
// }
// }
// };
let
resData
=
res
.
data
;
this
.
detailCode
=
res
.
data
;
console
.
log
(
this
.
detailCode
,
'detailcode'
);
that
.
loading
=
false
;
// if (resData.errorCode == 1) {
// that.statusIndex = resData.result.statusFlag == 1 && resData.result.overFlag == 1 ? 4 : resData.result.statusFlag;
// that.codeInfo = resData.result;
// return;
// }
errMsg
.
errorMsg
(
resData
);
// })
// .catch(function(error) {
// that.$message.error({
// duration: 1000,
// message: error.message
// });
});
},
submit
(
a
)
{
console
.
log
(
a
);
},
changeEvent
(
e
)
{
if
(
e
==
2
)
{
this
.
multiple
=
true
;
}
else
if
(
e
==
1
)
{
this
.
multiple
=
false
;
onSubmit
(
event
)
{
let
obj
=
{
...
event
,
...
this
.
form
};
console
.
log
(
obj
,
'父组件,整体表单数据'
);
if
(
this
.
$route
.
query
.
id
)
{
obj
=
{
...
obj
,
hm_id
:
this
.
detailCode
.
hmId
};
// 编辑
postRequest
(
'/hm/qrcode/update'
,
obj
);
}
else
{
// 新增
postRequest
(
'/hm/qrcode/add'
,
obj
);
}
this
.
$refs
.
form
.
clearValidate
();
this
.
form
=
{
hmType
:
1
,
name
:
''
,
clerkIdList
:
[],
hmUserNum
:
null
//多人活码人数
};
}
}
};
...
...
src/views/salesleads/components/ActCodeSet.vue
View file @
130f1a41
This diff is collapsed.
Click to expand it.
src/views/salesleads/components/dataDetail.vue
View file @
130f1a41
...
...
@@ -83,7 +83,8 @@ export default {
storeSearch
:
''
,
clerkSearch
:
''
,
pageNum
:
1
,
pageSize
:
20
pageSize
:
20
,
orderByField
:
''
},
dateDefault
:
[],
totalCount
:
0
,
...
...
@@ -197,8 +198,9 @@ export default {
// 排序
sortChange
(
column
,
prop
,
order
)
{
const
that
=
this
;
that
.
sortColumn
=
column
.
prop
;
that
.
sortColumn
=
column
.
prop
erty
;
that
.
sortType
=
column
.
order
==
'ascending'
?
'asc'
:
'desc'
;
that
.
pageParam
.
orderByField
=
[
that
.
sortColumn
,
that
.
sortType
];
that
.
getTableList
();
},
// 列表数据
...
...
src/views/salesleads/components/welcomesItem.vue
0 → 100644
View file @
130f1a41
<
template
>
<div>
<el-row>
<el-col
:span=
"17"
>
<el-form-item
label=
"活码类型"
>
<el-radio-group
v-model=
"welcomesType"
>
<el-radio
:label=
"1"
>
活码欢迎语
</el-radio>
<el-radio
:label=
"2"
>
不发送欢迎语
</el-radio>
</el-radio-group>
<ul
class=
"tabs"
v-if=
"welcomesType == 1"
>
<li>
1.下方的欢迎语取自【设置-欢迎语设置】中的“特殊欢迎语”;
</li>
<li>
2.配置“活码欢迎语”后,通过此活码添加好友后,系统自动推送此处所配置的欢迎语
</li>
<li>
(根据企业微信规则,若所添加的该成员在企业微信后台已经配置了欢迎语,那么会推送企微后台所配置的欢迎语,不会推送此处的欢迎语)
</li>
</ul>
<ul
class=
"tabs"
v-if=
"welcomesType == 2"
>
<li>
通过此活码添加好友后,系统不推送欢迎语,及时在【设置-欢迎语设置】中为该成员配置了欢迎语。
</li>
<li>
(根据企业微信规则,若所添加的该成员在企业微信后台已经配置了欢迎语,那么企微后台的欢迎语会照常推送)
</li>
</ul>
</el-form-item>
<el-form-item
label=
"选择欢迎语"
v-if=
"welcomesType == 1"
>
<div
class=
"welcomeTable"
>
<div
class=
"wtabTop"
>
<el-input
class=
"w260"
placeholder=
"请输入标题"
v-model=
"welcomePage.search"
></el-input>
<el-button
plain
class=
"ylbtn"
@
click=
"changeRoute"
>
新建欢迎语
</el-button>
</div>
<el-table
:data=
"welcomeTableData"
>
<el-table-column
width=
"55"
>
<template
slot-scope=
"scope"
>
<el-radio
:label=
"scope.$index"
@
change
.
native=
"getCurrentRow(scope.row)"
v-model=
"welcome"
>
</el-radio>
</
template
>
</el-table-column>
<el-table-column
prop=
"title"
label=
"标题"
width=
"158px"
></el-table-column>
<el-table-column
prop=
"welcomeContent"
label=
"内容"
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"附件"
width=
"212px"
show-overflow-tooltip
>
<
template
slot-scope=
"{ row }"
>
<div
class=
"enclosureBox"
>
<el-image
class=
"img"
:src=
"row.welcomeMediaList.mediaUrl"
>
<div
slot=
"error"
class=
"image-slot img"
>
<i
class=
"el-icon-picture-outline"
style=
"font-size:40px;"
></i>
</div>
</el-image>
<p>
{{
row
.
welcomeMediaList
.
mediaTitle
?
row
.
welcomeMediaList
.
mediaTitle
:
'--'
}}
</p>
</div>
</
template
>
</el-table-column>
</el-table>
<dm-pagination
class=
"paginationBox"
background
@
current-change=
"handleCurrentChange"
:current-page=
"welcomePage.pageNum"
layout=
" prev, pager, next "
:page-size=
"welcomePage.pageSize"
:total=
"totalNum"
>
</dm-pagination>
</div>
</el-form-item>
</el-col>
<el-col
:span=
"7"
v-if=
"welcomesType == 1 && welcomeContent != ''"
>
<p
class=
"welcomeTitle"
>
欢迎语预览
</p>
<previewWelcome
:welcomeContent=
"welcomeContent"
></previewWelcome>
</el-col>
</el-row>
</div>
</template>
<
script
>
import
previewWelcome
from
'@/components/preview-welcome.vue'
;
import
{
postJsonRequest
}
from
'@/api/api'
;
export
default
{
name
:
'welcomeItem'
,
components
:
{
previewWelcome
},
data
()
{
return
{
welcomesType
:
1
,
welcomeTableData
:
[],
welcome
:
''
,
welcomeContent
:
''
,
// 欢迎语参数
welcomePage
:
{
wxEnterpriseId
:
sessionStorage
.
getItem
(
'userInfos'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)).
wxEnterpriseId
:
''
,
title
:
''
,
type
:
2
,
pageNum
:
1
,
pageSize
:
4
},
totalNum
:
1
,
welcomeId
:
''
,
templateSelection
:
{}
};
},
created
()
{
this
.
getWelcomeTable
();
},
methods
:
{
// 当前页变化
handleCurrentChange
(
val
)
{
this
.
welcomePage
.
pageNum
=
val
;
this
.
getWelcomeTable
();
},
// 选择欢迎语列表数据
async
getWelcomeTable
()
{
await
postJsonRequest
(
'/haoban-manage3-web/welcome/list'
,
this
.
welcomePage
).
then
(
res
=>
{
this
.
welcomeTableData
=
res
.
data
.
result
.
result
;
this
.
totalNum
=
res
.
data
.
result
.
totalCount
;
});
},
// 新建欢迎语
changeRoute
()
{
this
.
$router
.
push
({
path
:
'/salutatorySet'
});
},
getCurrentRow
(
row
)
{
// 获取选中数据 row表示选中这一行的数据,可以从里面提取所需要的值
this
.
templateSelection
=
row
;
this
.
welcomeContent
=
row
.
welcomeContent
;
this
.
welcomeId
=
row
.
welcomeId
;
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.m20
{
margin
:
20px
;
}
.w340
{
width
:
340px
;
}
.mt20
{
margin-top
:
20px
;
}
.mt40b20
{
margin-top
:
40px
;
margin-bottom
:
20px
;
}
.mr15
{
margin-right
:
15px
;
}
.w260
{
width
:
260px
;
}
.tabs
{
font-size
:
12px
;
color
:
#909399
;
li
{
line-height
:
19px
;
}
}
.ylbtn
{
border
:
1px
solid
#2f54eb
;
color
:
#2f54eb
;
}
.addPic
{
font-size
:
14px
;
padding-right
:
4px
;
}
.welcomeTitle
{
text-align
:
center
;
margin-bottom
:
26px
;
margin-top
:
6px
;
font-weight
:
500
;
color
:
#303133
;
font-size
:
14px
;
}
.welcomeTable
{
width
:
720px
;
height
:
429px
;
border
:
1px
solid
#dcdfe6
;
padding
:
12px
;
position
:
relative
;
.wtabTop
{
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
12px
;
}
.paginationBox
{
position
:
absolute
;
right
:
7px
;
bottom
:
0
;
margin-top
:
46px
;
margin-right
:
-4px
;
}
.enclosureBox
{
display
:
flex
;
align-items
:
center
;
.img
{
width
:
40px
;
height
:
40px
;
margin-right
:
10px
;
}
p
{
width
:
143px
;
max-width
:
143px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
}
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment