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
ca67a4b4
Commit
ca67a4b4
authored
Jul 01, 2022
by
yugujie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: actcode
parent
8ade44ab
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
10 deletions
+47
-10
actCode.js
src/api/actCode.js
+10
-1
act-code-table.vue
...leads/actCodeManage/staffActCode/views/act-code-table.vue
+0
-0
group-list.vue
...alesleads/actCodeManage/staffActCode/views/group-list.vue
+37
-9
No files found.
src/api/actCode.js
View file @
ca67a4b4
...
...
@@ -4,4 +4,13 @@ import { postRequest } from '@/api/api';
export
const
findActCodeGroupListApi
=
params
=>
postRequest
(
'/hm/group/list'
,
params
);
// 新增活码分组
export
const
addActCodeGroup
=
params
=>
postRequest
(
'/hm/group/save'
,
params
);
export
const
addActCodeGroupApi
=
params
=>
postRequest
(
'/hm/group/save'
,
params
);
// 编辑活码分组
export
const
editActCodeGroupApi
=
params
=>
postRequest
(
'/hm/group/edit'
,
params
);
// 删除分组
export
const
delActCodeGroupApi
=
params
=>
postRequest
(
'/hm/group/delete'
,
params
);
// 活码列表
export
const
actCodeListApi
=
params
=>
postRequest
(
''
,
params
);
src/views/salesleads/actCodeManage/staffActCode/views/act-code-table.vue
View file @
ca67a4b4
This diff is collapsed.
Click to expand it.
src/views/salesleads/actCodeManage/staffActCode/views/group-list.vue
View file @
ca67a4b4
...
...
@@ -14,7 +14,7 @@
<
/div
>
<
el
-
popover
placement
=
"bottom"
trigger
=
"hover"
v
-
if
=
"isShowGroupListItemMore(listItem)"
>
<
p
class
=
"more"
@
click
=
"editGroupListItem(listItem)"
>
编辑
<
/p
>
<
p
class
=
"more"
@
click
=
"delGroupListItem(listItem)"
>
删除
<
/p
>
<
p
class
=
"more"
@
click
=
"delGroupListItem(listItem)"
v
-
if
=
"!listItem.releationNum"
>
删除
<
/p
>
<
i
slot
=
"reference"
class
=
"iconfont-hb3 icongengduo icon"
><
/i
>
<
/el-popover
>
<
/li
>
...
...
@@ -24,7 +24,7 @@
<
el
-
button
type
=
"primary"
class
=
"ghost-btn add-group"
@
click
=
"addGroup"
>
新增分组
<
/el-button
>
<
/div
>
<!--
新增
/
编辑分组
-->
<
el
-
dialog
:
title
=
"
title
"
:
visible
.
sync
=
"addOrEditGroupDialog"
width
=
"500px"
top
=
"30vh"
:
close
-
on
-
click
-
modal
=
"false"
>
<
el
-
dialog
:
title
=
"
isEditGroup ? '编辑分组' : '新增分组'
"
:
visible
.
sync
=
"addOrEditGroupDialog"
width
=
"500px"
top
=
"30vh"
:
close
-
on
-
click
-
modal
=
"false"
>
<
el
-
form
:
model
=
"groupListForm"
:
rules
=
"groupListFormRules"
ref
=
"groupListForm"
>
<
el
-
form
-
item
label
=
"分组名称"
prop
=
"groupName"
>
<
el
-
input
placeholder
=
"请输入分组名称"
v
-
model
=
"groupListForm.groupName"
:
maxlength
=
"10"
show
-
word
-
limit
clearable
><
/el-input
>
...
...
@@ -40,7 +40,7 @@
<
/template
>
<
script
>
import
{
findActCodeGroupListApi
,
addActCodeGroup
}
from
'@/api/actCode.js'
;
import
{
findActCodeGroupListApi
,
addActCodeGroup
Api
,
editActCodeGroupApi
,
delActCodeGroupApi
}
from
'@/api/actCode.js'
;
export
default
{
name
:
'staffActCodeGroupList'
,
data
()
{
...
...
@@ -118,7 +118,12 @@ export default {
return
!
hiddenListItemMore
.
includes
(
listItem
.
groupId
);
}
,
addGroup
()
{
this
.
scrollLoad
=
false
;
this
.
isEditGroup
=
false
;
this
.
groupListForm
=
{
groupName
:
''
,
groupId
:
''
}
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
groupListForm
.
clearValidate
();
}
);
...
...
@@ -142,33 +147,56 @@ export default {
// 删除操作
const
listItemIndex
=
this
.
groupList
.
findIndex
(
item
=>
item
.
groupId
===
listItem
.
groupId
);
if
(
listItemIndex
<
0
)
return
;
let
params
=
{
groupId
:
listItem
.
groupId
}
;
delActCodeGroupApi
(
params
).
then
(
res
=>
{
if
(
res
.
errorCode
==
0
)
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
}
);
this
.
groupList
.
splice
(
listItemIndex
,
1
);
}
}
);
}
)
.
catch
(()
=>
{
}
);
}
,
handleGroupListItem
()
{
this
.
$refs
.
groupListForm
.
validate
(
valid
=>
{
this
.
$refs
.
groupListForm
.
validate
(
async
valid
=>
{
if
(
valid
)
{
// 用来接收编辑或者新增后的返回结果
let
res
=
{
}
;
let
resSucTip
=
`${this.isEditGroup ? '修改' : '新增'
}
成功`
;
let
resErTip
=
`${this.isEditGroup ? '修改' : '新增'
}
失败`
;
if
(
this
.
isEditGroup
)
{
res
=
await
editActCodeGroupApi
(
this
.
groupListForm
);
}
else
{
let
params
=
{
groupName
:
this
.
groupListForm
.
groupName
}
;
addActCodeGroup
(
params
).
then
(
res
=>
{
res
=
await
addActCodeGroupApi
(
params
);
}
if
(
res
.
errorCode
==
0
)
{
this
.
$message
({
type
:
'success'
,
message
:
'新增成功'
,
message
:
resSucTip
,
duration
:
1000
}
);
if
(
this
.
isEditGroup
)
{
const
groupListItem
=
this
.
groupList
.
find
(({
groupId
}
)
=>
groupId
==
this
.
groupListForm
.
groupId
);
groupListItem
.
groupName
=
this
.
groupListForm
.
groupName
;
}
else
{
this
.
pageNum
=
1
;
this
.
searchGroup
();
}
this
.
addOrEditGroupDialog
=
false
;
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
res
.
message
||
'新增失败'
message
:
resErTip
}
);
}
this
.
editDialog
.
visible
=
false
;
}
);
}
}
);
}
,
...
...
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