Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
admin-base
Commits
4e7a61e4
Commit
4e7a61e4
authored
Jan 03, 2019
by
chenfenglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
来源码类别
parent
85011a13
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
299 additions
and
9 deletions
+299
-9
index.vue
src/components/notBuyClass/index.vue
+12
-0
dialog.vue
src/components/sourceManage/dialog.vue
+208
-0
index.vue
src/components/sourceManage/index.vue
+79
-9
No files found.
src/components/notBuyClass/index.vue
View file @
4e7a61e4
...
...
@@ -5,6 +5,12 @@
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"searchFrom.user_id"
@
change=
"getList"
></el-input>
</el-form-item>
<el-form-item
label=
"用户昵称"
>
<el-input
v-model=
"searchFrom.user_name"
@
change=
"getList"
></el-input>
</el-form-item>
<el-form-item
label=
"手机号"
>
<el-input
v-model=
"searchFrom.mobile"
@
change=
"getList"
></el-input>
</el-form-item>
<el-form-item
label=
"商品名称"
>
<el-select
v-model=
"searchFrom.goods_id"
placeholder=
"请选择"
@
change=
"getList"
clearable
>
<el-option
...
...
@@ -118,6 +124,9 @@ export default {
if
(
this
.
searchFrom
.
goods_id
){
json
.
goods_id
=
this
.
searchFrom
.
goods_id
}
if
(
this
.
searchFrom
.
mobile
){
json
.
mobile
=
this
.
searchFrom
.
mobile
}
getClassConfigApi
(
json
).
then
(
res
=>
{
this
.
total
=
res
.
total
;
this
.
configList
=
res
.
list
;
...
...
@@ -161,6 +170,9 @@ export default {
}
if
(
this
.
searchFrom
.
goods_id
){
json
.
goods_id
=
this
.
searchFrom
.
goods_id
}
if
(
this
.
searchFrom
.
mobile
){
json
.
mobile
=
this
.
searchFrom
.
mobile
}
exportExcelApi
(
'/api/admin/user/receive/course/log/export'
,
json
)
},
...
...
src/components/sourceManage/dialog.vue
0 → 100644
View file @
4e7a61e4
<
template
>
<div>
<el-dialog
:title=
"manageObj.title"
center
append-to-body
:visible
.
sync=
"manageObj.show"
width=
"800px"
>
<div
class=
"head clear-both"
>
<el-button
@
click=
"add"
plain
type=
"primary"
style=
"float: right"
v-if=
"!$store.state.readonly"
>
新增来源码类别
</el-button>
</div>
<el-table
:data=
"sourceTypeList"
style=
"width: 100%"
>
<el-table-column
prop=
"desc"
label=
"描述"
>
</el-table-column>
<el-table-column
prop=
"value"
label=
"类别"
>
</el-table-column>
<el-table-column
prop=
"created_at"
label=
"创建时间"
>
</el-table-column>
<el-table-column
width=
"250"
v-if=
"!$store.state.readonly"
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
plain
type=
"warning"
@
click=
"edit(scope.row)"
>
编辑
</el-button>
<el-button
size=
"mini"
plain
type=
"danger"
@
click=
"del(scope.row)"
v-if=
"$store.state.deletePermission"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-dialog>
<el-dialog
:title=
"addTypeObj.title"
center
append-to-body
:visible
.
sync=
"addTypeObj.show"
width=
"800px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
>
<el-row>
<el-col
:span=
"4"
><label>
来源码类别
</label></el-col>
<el-col
:span=
"8"
>
<el-form-item
prop=
"value"
>
<el-input
v-model=
"form.value"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"4"
><label>
描述
</label></el-col>
<el-col
:span=
"8"
>
<el-form-item
prop=
"desc"
>
<el-input
v-model=
"form.desc"
type=
"textarea"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"addTypeObj.show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sub"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
getConfigListApi
,
saveConfigApi
,
updateConfigApi
,
deleteConfigApi
,
getConfigDetailApi
}
from
"../../service/api"
export
default
{
name
:
"manageDialog"
,
props
:[
"manageObj"
],
data
(){
return
{
sourceTypeList
:[],
addTypeObj
:{
title
:
"来源码类别"
,
show
:
false
,
},
form
:{
value
:
''
,
desc
:
''
,
id
:
''
},
rules
:{
value
:[
{
required
:
true
,
message
:
'请输入类别'
,
trigger
:
'change'
}
],
desc
:[
{
message
:
'请输入描述'
,
trigger
:
'change'
}
]
}
}
},
methods
:{
sub
(){
let
json
=
{
value
:
this
.
form
.
value
,
key
:
"code_rule_type"
}
if
(
this
.
form
.
desc
){
json
.
desc
=
this
.
form
.
desc
}
if
(
this
.
form
.
id
){
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
){
this
.
$confirm
(
'此操作将修改来源码?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
updateConfigApi
(
this
.
form
.
id
,
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
this
.
addTypeObj
.
show
=
false
;
this
.
sourceTypeOptions
();
})
})
}
});
}
else
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
){
this
.
$confirm
(
'此操作将新增来源码?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
saveConfigApi
(
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'新增成功!'
});
this
.
addTypeObj
.
show
=
false
;
this
.
sourceTypeOptions
();
})
})
}
});
}
},
add
(){
this
.
form
.
id
=
''
;
this
.
form
.
value
=
''
;
this
.
form
.
desc
=
''
;
this
.
addTypeObj
.
show
=
true
;
},
sourceTypeOptions
(){
let
json
=
{
limit
:
2000
,
page
:
1
,
key
:
"code_rule_type"
,
};
getConfigListApi
(
json
).
then
(
res
=>
{
this
.
sourceTypeList
=
res
.
list
})
},
del
(
data
){
this
.
$confirm
(
'此操作将删除该记录?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
deleteConfigApi
(
data
.
id
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
});
this
.
sourceTypeOptions
()
});
});
},
edit
(
data
){
getConfigDetailApi
(
data
.
id
).
then
((
res
)
=>
{
this
.
addTypeObj
.
show
=
true
this
.
form
.
id
=
res
.
id
;
this
.
form
.
value
=
res
.
value
;
this
.
form
.
desc
=
res
.
desc
;
});
},
},
mounted
(){
},
watch
:{
"manageObj.show"
(
val
){
if
(
val
){
this
.
sourceTypeOptions
();
}
else
{
this
.
$emit
(
"reflash"
);
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/sourceManage/index.vue
View file @
4e7a61e4
<
template
>
<div
class=
"menu"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"120px"
inline
>
<el-form-item
label=
"来源码类别"
>
<el-select
v-model=
"searchFrom.type_id"
placeholder=
"请选择"
@
change=
"getList"
clearable
>
<el-option
v-for=
"(data,index) in codeType"
:key=
"index"
:label=
"data.value"
:value=
"data.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"getList"
>
搜索
</el-button>
</el-form-item>
</el-form>
<div
class=
"head clear-both"
>
<el-button
@
click=
"add"
plain
type=
"success"
style=
"float: right"
v-if=
"!$store.state.readonly"
>
新增来源码
</el-button>
<el-button
@
click=
"manageObj.show=true"
plain
type=
"primary"
style=
"float: right;margin-right:30px"
>
来源码类别管理
</el-button>
</div>
<el-table
:data=
"sourceList"
...
...
@@ -29,6 +45,13 @@
<
template
slot-scope=
"scope"
>
<a
href=
"javascript:void(0);"
@
click=
"getNoCashUser(scope.row.no_cash_user)"
>
{{
scope
.
row
.
no_cash_user
}}
</a>
</
template
>
</el-table-column>
<el-table-column
prop=
"type_id"
label=
"来源码类别"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
type_name
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"desc"
...
...
@@ -68,6 +91,16 @@
<el-form-item
label=
"来源CODE"
prop=
"code"
>
<el-input
v-model=
"dialog.form.code"
></el-input>
</el-form-item>
<el-form-item
label=
"来源码类别"
prop=
"type_id"
>
<el-select
v-model=
"dialog.form.type_id"
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"(data,index) in codeType"
:key=
"index"
:label=
"data.value"
:value=
"data.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"是否可提现"
>
<el-switch
v-model=
"dialog.form.is_withdraw"
...
...
@@ -115,7 +148,7 @@
<el-row>
<el-col
:span=
"8"
:offset=
"16"
>
<el-form-item>
<el-button
style=
"float: right"
type=
"primary"
plain
@
click=
"get
User
"
>
搜索
</el-button>
<el-button
style=
"float: right"
type=
"primary"
plain
@
click=
"get
List
"
>
搜索
</el-button>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -169,19 +202,22 @@
</span>
</el-dialog>
<choose-good-dialog
:dialogObj=
"chooseGoodDialogObj"
@
changeShow=
"changeShow"
/>
<manage-dialog
:manageObj=
"manageObj"
@
reflash=
"sourceOptions"
/>
</div>
</template>
<
script
>
import
{
getSourceListApi
,
addSourceApi
,
delSourceApi
,
updateSourceApi
,
getUserListApi
}
from
"../../service/api"
;
import
{
getSourceListApi
,
addSourceApi
,
delSourceApi
,
updateSourceApi
,
getUserListApi
,
getConfigListApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
import
userPage
from
'../framework/page'
import
chooseGoodDialog
from
'../teacherDetail/chooseGoodDialog'
import
manageDialog
from
"./dialog"
export
default
{
components
:
{
page
,
userPage
,
chooseGoodDialog
chooseGoodDialog
,
manageDialog
},
data
(){
return
{
...
...
@@ -205,6 +241,9 @@
],
code
:
[
{
required
:
true
,
message
:
'请填写来源码类型'
,
trigger
:
'change'
},
],
type_id
:
[
{
required
:
true
,
message
:
'请填写来源码类别'
,
trigger
:
'change'
},
]
},
form
:{
...
...
@@ -213,7 +252,8 @@
code
:
''
,
is_withdraw
:
0
,
desc
:
''
,
no_cash_user
:
''
no_cash_user
:
''
,
type_id
:
""
,
}
},
userDialog
:
{
...
...
@@ -223,7 +263,9 @@
show
:
false
},
userList
:
[],
searchUserFrom
:
{},
searchUserFrom
:
{
type_id
:
""
,
},
multipleSelection
:
[],
noCashUserDialog
:
{
total
:
0
,
...
...
@@ -235,7 +277,15 @@
chooseGoodDialogObj
:
{
show
:
false
,
code
:
''
}
},
manageObj
:{
show
:
false
,
title
:
"来源码类别管理"
,
},
searchFrom
:{
},
codeType
:[],
}
},
filters
:
{
...
...
@@ -254,7 +304,7 @@
}
else
{
return
'否'
}
}
}
,
},
created
(){
this
.
getList
()
...
...
@@ -265,6 +315,9 @@
limit
:
this
.
limit
,
page
:
this
.
nowPage
}
if
(
this
.
searchFrom
.
type_id
){
json
.
type_id
=
this
.
searchFrom
.
type_id
;
}
getSourceListApi
(
json
).
then
(
res
=>
{
if
(
res
)
{
this
.
sourceList
=
res
.
list
?
res
.
list
:
[];
...
...
@@ -370,6 +423,7 @@
this
.
dialog
.
title
=
'编辑来源码'
;
this
.
dialog
.
form
.
title
=
data
.
title
;
this
.
dialog
.
form
.
code
=
data
.
code
;
this
.
dialog
.
form
.
type_id
=
data
.
type_id
;
this
.
dialog
.
form
.
is_withdraw
=
data
.
is_withdraw
===
1
;
this
.
dialog
.
form
.
desc
=
data
.
desc
;
this
.
dialog
.
form
.
no_cash_user
=
data
.
no_cash_user
;
...
...
@@ -380,6 +434,7 @@
this
.
dialog
.
title
=
'新增来源码'
;
this
.
dialog
.
form
.
title
=
''
;
this
.
dialog
.
form
.
code
=
'USER'
;
this
.
dialog
.
form
.
type_id
=
''
;
this
.
dialog
.
form
.
is_withdraw
=
false
;
this
.
dialog
.
form
.
desc
=
''
;
this
.
dialog
.
form
.
no_cash_user
=
''
;
...
...
@@ -407,6 +462,7 @@
let
json
=
{
title
:
dia
.
form
.
title
,
code
:
dia
.
form
.
code
,
type_id
:
dia
.
form
.
type_id
,
is_withdraw
:
dia
.
form
.
is_withdraw
?
1
:
0
,
desc
:
dia
.
form
.
desc
};
...
...
@@ -431,6 +487,7 @@
let
json
=
{
title
:
dia
.
form
.
title
,
code
:
dia
.
form
.
code
,
type_id
:
dia
.
form
.
type_id
,
no_cash_user
:
dia
.
form
.
no_cash_user
,
is_withdraw
:
dia
.
form
.
is_withdraw
?
1
:
0
,
desc
:
dia
.
form
.
desc
...
...
@@ -463,7 +520,20 @@
createInviteLink
(
code
){
this
.
chooseGoodDialogObj
.
show
=
true
;
this
.
chooseGoodDialogObj
.
code
=
`CC-
${
code
}
`
;
}
},
sourceOptions
(){
let
json
=
{
limit
:
2000
,
page
:
1
,
key
:
"code_rule_type"
,
};
getConfigListApi
(
json
).
then
(
res
=>
{
this
.
codeType
=
res
.
list
})
},
},
mounted
(){
this
.
sourceOptions
();
}
}
</
script
>
...
...
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