Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
35b0c9b2
Commit
35b0c9b2
authored
Jan 29, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交点数管理
parent
4c0d7028
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
448 additions
and
0 deletions
+448
-0
addpoint.vue
src/components/education/addpoint.vue
+222
-0
educationIndex.vue
src/components/education/educationIndex.vue
+3
-0
pointList.vue
src/components/education/pointList.vue
+211
-0
index.js
src/router/index.js
+12
-0
No files found.
src/components/education/addpoint.vue
0 → 100644
View file @
35b0c9b2
<
template
>
<div
v-loading=
"loading"
class=
"addpoint"
>
<div
class=
"head-title"
>
<span
@
click=
"CommonJump('pointList')"
class=
"blue point"
>
点数管理
</span>
/ 编辑点数管理
</div>
<div
class=
"content"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
style=
"width:50%"
>
<el-form-item
label=
"商品名称"
prop=
"GoodsName"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.GoodsName"
placeholder=
"请输入商品名称"
class=
"w400"
/>
</el-form-item>
<el-form-item
label=
"售价"
prop=
"SellingPrice"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.SellingPrice"
placeholder=
"请输入售价"
class=
"w400"
type=
"number"
:min=
"0"
>
<template
slot=
"append"
>
元
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"点数"
prop=
"PonitNum"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.PonitNum"
placeholder=
"请输入点数"
class=
"w400"
type=
"number"
:min=
"0"
/>
</el-form-item>
<el-form-item
label=
"赠送点数"
prop=
"GivePonit"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.GivePonit"
placeholder=
"请输入赠送点数"
class=
"w400"
type=
"number"
:min=
"0"
/>
</el-form-item>
</el-form>
</div>
<div
style=
"margin-top:20px"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"Save('addMsg')"
>
保存
</el-button>
</div>
</div>
</template>
<
script
>
export
default
{
components
:
{
},
data
()
{
return
{
addMsg
:
{
ID
:
0
,
GoodsName
:
''
,
PonitNum
:
0
,
GivePonit
:
0
,
SellingPrice
:
0
,
},
rules
:
{
GoodsName
:
[{
required
:
true
,
message
:
'请输入商品名称'
,
trigger
:
'blur'
}],
PonitNum
:
[{
required
:
true
,
message
:
'请输入点数'
,
trigger
:
'blur'
}],
SellingPrice
:
[{
required
:
true
,
message
:
'请输入售价'
,
trigger
:
'blur'
}],
GivePonit
:
[{
required
:
true
,
message
:
'赠送点数不能为空'
,
trigger
:
'blur'
}],
},
loading
:
false
,
};
},
created
()
{
if
(
this
.
$route
.
query
.
ID
){
this
.
getData
(
this
.
$route
.
query
.
ID
)
}
},
methods
:
{
Save
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
addMsg
.
SellingPrice
==
0
){
this
.
Error
(
'售价大于0'
)
return
false
}
if
(
this
.
addMsg
.
PonitNum
==
0
){
this
.
Error
(
'点数大于0'
)
return
false
}
this
.
apipost
(
"/api/Point/SetPointGoods"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
CommonJump
(
'pointList'
);
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
else
{
return
false
;
}
});
},
getData
(
ID
)
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/Point/GetPointGoodsModel"
,
{
ID
:
ID
},
res
=>
{
this
.
loading
=
false
;
this
.
addMsg
=
res
.
data
.
data
;
})
},
},
mounted
()
{
}
};
</
script
>
<
style
>
.app-add-cat
.el-checkbox-group
{
font-size
:
14px
!important
;
}
.app-add-cat
.el-checkbox
{
margin-right
:
0
;
}
.app-add-cat
.el-dialog__body
{
padding
:
10px
20px
!important
;
}
.app-add-cat
.tag-box
.tag-item
{
margin-right
:
5px
;
}
.app-add-cat
.tag-box
{
margin
:
20px
0
;
}
.app-add-cat
.app-goods-cat-list
.active
{
background
:
#FAFAFA
;
}
.app-add-cat
.app-goods-cat-list
.cat-item
{
cursor
:
pointer
;
padding
:
5px
10px
;
}
.app-add-cat
.app-goods-cat-list
{
border
:
1px
solid
#E8EAEE
;
border-radius
:
5px
;
margin-top
:
-5px
;
padding
:
10px
0
;
overflow
:
scroll
;
height
:
400px
;
}
.addpoint
.blue
{
color
:
#409EFF
;
}
.addpoint
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
.addpoint
.gez_list
{
/*width: 650px;*/
margin-bottom
:
12px
;
padding
:
20px
;
border
:
1px
solid
#EBEEF5
;
background-color
:
#FFF
;
color
:
#303133
;
}
.addpoint
.quyu
{
background-color
:
#f4f4f5
;
color
:
#909399
;
padding
:
10px
;
line-height
:
30px
;
height
:
30px
;
font-size
:
12px
;
border-radius
:
4px
;
white-space
:
nowrap
;
margin
:
5px
;
}
.addpoint
.el-tag
+
.el-tag
{
margin-left
:
10px
;
}
.addpoint
.button-new-tag
{
margin-left
:
10px
;
height
:
32px
;
line-height
:
30px
;
padding-top
:
0
;
padding-bottom
:
0
;
}
.addpoint
.input-new-tag
{
width
:
90px
;
margin-left
:
10px
;
vertical-align
:
bottom
;
}
</
style
>
src/components/education/educationIndex.vue
View file @
35b0c9b2
...
...
@@ -196,6 +196,9 @@
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/resultPageList'}" @click="isChecked='/resultPageList',CommonJump('resultPageList')">
<i
class=
"el-icon-menu"
></i><span>
调查列表
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/pointList'}" @click="isChecked='/pointList',CommonJump('pointList')">
<i
class=
"el-icon-menu"
></i><span>
点数列表
</span>
</li>
</ul>
</div>
</div>
...
...
src/components/education/pointList.vue
0 → 100644
View file @
35b0c9b2
<
template
>
<div
class=
"pointList"
>
<div
class=
"el-card__header"
>
<span>
点数管理
</span>
<div
style=
"display: flex;flex-direction: row;align-items: center"
>
<el-button
type=
"primary"
class=
"el-button--small"
@
click=
"addRecharge"
>
新增
</el-button>
</div>
</div>
<div
style=
"padding: 20px;background: #fff;margin-top: 20px"
>
<el-table
:data=
"tableData"
header-cell-class-name=
"headClass"
style=
"width: 100%"
border
>
<el-table-column
prop=
"ID"
label=
"ID"
width=
"100"
>
</el-table-column>
<el-table-column
prop=
"GoodsName"
label=
"产品名称"
>
</el-table-column>
<el-table-column
prop=
"SellingPrice"
label=
"售价"
>
<template
slot-scope=
"scope"
>
<span>
¥
{{
scope
.
row
.
SellingPrice
.
toFixed
(
2
)
}}
元
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"PonitNum"
label=
"点数"
>
</el-table-column>
<el-table-column
prop=
"IsGive"
label=
"是否赠送点数"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.IsGive==0"
type=
"info"
>
不赠送
</el-tag>
<el-tag
v-if=
"scope.row.IsGive>0"
type=
"warning"
>
赠送
{{
scope
.
row
.
GivePonit
}}
点数
</el-tag>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top"
>
<img
src=
"../../assets/img/setup/edit.png"
alt=
""
class=
"imgstyle"
@
click=
"Edit(scope.row)"
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
src=
"../../assets/img/setup/del.png"
alt=
""
class=
"imgstyle"
@
click=
"delete_b(scope.row)"
>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:current-page
.
sync=
"msg.pageIndex"
:total=
"count"
>
</el-pagination>
</div>
</div>
</template>
<
script
>
export
default
{
name
:
"pointList"
,
data
(){
return
{
msg
:{
pageIndex
:
1
,
pageSize
:
15
,
},
changeState
:
false
,
dateList
:[],
tableData
:[],
count
:
0
,
loading
:
false
,
EnableMsg
:{
Ids
:
''
,
TeacherStatus
:
0
,
},
}
},
created
(){
this
.
getDateList
();
//获取老师分页
},
methods
:{
getDateList
(){
this
.
loading
=
true
;
this
.
apipost
(
"/api/Point/GetPointGoodsPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
){
this
.
tableData
=
res
.
data
.
data
.
pageData
;
this
.
count
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
addRecharge
(){
this
.
$router
.
push
(
'/addpoint'
);
},
Edit
(
row
){
this
.
$router
.
push
({
name
:
'addpoint'
,
query
:
{
ID
:
row
.
ID
,
blank
:
"y"
}
});
},
delete_b
(
row
){
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"/api/Point/DeletePointGoods"
,
{
Id
:
row
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getDateList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
);
});
},
getList
(){
this
.
msg
.
pageIndex
=
1
this
.
getDateList
()
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getDateList
();
},
},
}
</
script
>
<
style
>
.pointList
.el-card__header
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
background
:
#fff
;
}
.pointList
.el-button--small
{
padding
:
9px
15px
;
}
.pointList
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
/*margin-left: 10px;*/
}
.pointList
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.pointList
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
}
.pointList
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
15px
;
box-sizing
:
border-box
;
}
.pointList
.el-tag
{
margin-right
:
5px
;
}
.pointList
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
</
style
>
src/router/index.js
View file @
35b0c9b2
...
...
@@ -385,6 +385,18 @@ export default new Router({
path
:
'/resultPageList'
,
name
:
'resultPageList'
,
component
:
resolve
=>
require
([
'@/components/education/resultPageList'
],
resolve
),
},
//网课 点数分页
{
path
:
'/pointList'
,
name
:
'pointList'
,
component
:
resolve
=>
require
([
'@/components/education/pointList'
],
resolve
),
},
//网课 新增点数
{
path
:
'/addpoint'
,
name
:
'addpoint'
,
component
:
resolve
=>
require
([
'@/components/education/addpoint'
],
resolve
),
}
]
},
...
...
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