Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
memberTag-web
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
memberTag
memberTag-web
Commits
3bd0c821
Commit
3bd0c821
authored
Mar 02, 2020
by
KyleAlex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限制创建分组
parent
6e8ca3c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
api.js
src/request/api.js
+10
-0
memberGroupEdit.vue
src/view/memberGroup/memberGroupEdit.vue
+14
-2
No files found.
src/request/api.js
View file @
3bd0c821
...
...
@@ -155,3 +155,13 @@ export const memberTagGroupList = params =>
method
:
'get'
,
params
});
export
const
getIsAllowAdd
=
params
=>
request
({
url
:
'/member-tag-group/over-count'
,
method
:
'get'
,
params
:
{
requestProject
:
'gic-member-tag-web'
,
...
params
}
});
src/view/memberGroup/memberGroupEdit.vue
View file @
3bd0c821
...
...
@@ -117,7 +117,11 @@
</el-select>
</el-form-item>
<el-form-item
label
:class=
"
{'m-l-60': ruleForm.selectedTags.length > 1}">
<el-tooltip
class=
"item"
effect=
"dark"
content=
"您商户的非实时分组数量已达到上限"
placement=
"top-start"
v-if=
"isAllowAdd"
>
<el-button
type=
"primary"
style=
"color: #c0c4cc;cursor: not-allowed;background-image: none;background-color: #F5F7FA;border-color: #DCDFE6;"
>
创建会员分组
</el-button>
</el-tooltip>
<el-button
v-else
type=
"primary"
@
click
.
stop=
"confirmSavePost"
>
{{
$route
.
query
.
memberTagGroupId
?
'保存'
:
'创建会员分组'
}}
</el-button>
...
...
@@ -194,7 +198,7 @@ import tagsGroupList from './tags-group-list.vue';
import
showMsg
from
'@/common/js/showmsg'
;
import
{
postRequest
}
from
'@/api/api'
;
import
{
getMemberTagCount
}
from
'@/request/memberGroup.js'
;
import
{
getMemberTagList
,
memberGroupList
}
from
'@/request/api.js'
;
import
{
getMemberTagList
,
memberGroupList
,
getIsAllowAdd
}
from
'@/request/api.js'
;
export
default
{
name
:
'memberGroupEdit'
,
...
...
@@ -348,7 +352,9 @@ export default {
// 分页相关
pageNum
:
1
,
pageSize
:
20
,
total
:
0
total
:
0
,
isAllowAdd
:
false
,
};
},
computed
:
{
...
...
@@ -657,6 +663,11 @@ export default {
.
catch
(
err
=>
{
console
.
log
(
err
);
});
},
getIsAllowAdd
()
{
getIsAllowAdd
().
then
(
res
=>
{
res
.
errorCode
===
1
&&
!
res
.
result
&&
(
this
.
isAllowAdd
=
res
.
result
);
})
}
},
mounted
()
{
...
...
@@ -671,6 +682,7 @@ export default {
this
.
ruleForm
.
memberTagGroupId
=
memberTagGroupId
;
this
.
getGroupData
();
}
else
{
this
.
getIsAllowAdd
();
let
date
=
new
Date
(
new
Date
().
getTime
()
+
365
*
24
*
3600
*
1000
);
let
Y
=
date
.
getFullYear
()
+
'-'
;
let
M
=
(
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'-'
;
...
...
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