Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
71e912ef
Commit
71e912ef
authored
Mar 06, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增页面
parent
75e0182e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
189 additions
and
1 deletion
+189
-1
courseList.vue
src/pages/sale/courseList.vue
+183
-0
routes.js
src/router/routes.js
+6
-1
No files found.
src/pages/sale/courseList.vue
0 → 100644
View file @
71e912ef
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.CourseName"
label=
"课程名称"
@
clear=
"resetSearch"
maxlength=
"20"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
课程信息
</div>
</
template
>
<
template
v-slot:body-cell-CoverImg=
"props"
>
<q-td
:props=
"props"
>
<q-avatar
square
size=
"100px"
>
<img
v-if=
"props.value"
:src=
"props.value"
/>
</q-avatar>
</q-td>
</
template
>
<
template
v-slot:body-cell-CourseIntro=
"props"
>
<q-td
:props=
"props"
>
<span
v-html=
"props.value"
></span>
</q-td>
</
template
>
<
template
v-slot:body-cell-Status=
"props"
>
<q-td
:props=
"props"
>
<q-badge
:color=
"props.value==1?'negative':'primary'"
:label=
"props.value==0?'正常':'禁用'"
/>
</q-td>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<template
v-if=
"props.row.PreferentialList&&props.row.PreferentialList.length>0"
>
<table>
<thead>
<tr>
<td>
优惠条件
</td>
<td>
同行返佣
</td>
<td>
销售返佣
</td>
</tr>
</thead>
<tbody>
<tr
v-for=
"item in props.row.PreferentialList"
>
<td>
<template
v-if=
"item.PriceDiscountType==1"
>
买
{{
item
.
BuyNum
}}
送
{{
item
.
SendNum
}}
</
template
>
<
template
v-else-if=
"item.PriceDiscountType==5"
>
刷卡分期
</
template
>
<
template
v-else
>
{{
item
.
PriceDiscountTypeStr
}}
{{
item
.
PriceMoney
}}
%
</
template
>
</td>
<td>
{{item.B2BCommissionMoney}} %
</td>
<td>
{{item.SaleCommissionMoney}} %
</td>
</tr>
</tbody>
</table>
</template>
</q-td>
</template>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
</q-table>
</div>
</div>
</template>
<
script
>
import
{
queryCoursePage
,
}
from
'../../api/course/index'
export
default
{
meta
:
{
title
:
"课程预览"
},
components
:
{
},
data
()
{
return
{
currentUrl
:
""
,
columns
:
[{
name
:
'CourseId'
,
label
:
'课程编号'
,
field
:
'CourseId'
,
align
:
'left'
},
{
name
:
'CourseName'
,
required
:
true
,
label
:
'课程名称'
,
align
:
'left'
,
field
:
row
=>
row
.
CourseName
},
{
name
:
'CoverImg'
,
label
:
'课程封面'
,
field
:
'CoverImg'
,
align
:
'left'
},
{
name
:
'OriginalPrice'
,
label
:
'基础价格'
,
field
:
'OriginalPrice'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'价格信息'
,
field
:
'CourseId'
},
{
name
:
'Status'
,
label
:
'状态'
,
align
:
'left'
,
field
:
'Status'
}
],
data
:
[],
loading
:
true
,
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
CourseName
:
""
,
QCateIds
:
""
,
Status
:
"0"
,
IsQPrice
:
1
,
//是否查询优惠价格设置
IsQTeacher
:
1
,
//是否查询课程讲师
},
pageCount
:
0
,
}
},
mounted
()
{
this
.
currentUrl
=
this
.
$route
.
path
this
.
getcourselist
();
},
methods
:
{
//重新查询
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getcourselist
();
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getcourselist
()
},
//获取菜单分页列表
getcourselist
()
{
this
.
loading
=
true
;
queryCoursePage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
data
=
res
.
Data
.
PageData
this
.
pageCount
=
res
.
Data
.
PageCount
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/router/routes.js
View file @
71e912ef
...
...
@@ -146,7 +146,7 @@ const routes = [{
{
path
:
"/course/lessonPreparation"
,
//教师备课
component
:
()
=>
import
(
"pages/course/lessonPreparation.vue"
)
import
(
"pages/course/lessonPreparation.vue"
)
},
{
path
:
"/course/prepareclassDetails"
,
//教师备课 备课详情
...
...
@@ -421,6 +421,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/sale/japaneseTrain.vue"
)
},
{
path
:
"/sale/courseList"
,
//销售 课程预览
component
:
()
=>
import
(
"pages/sale/courseList.vue"
)
},
{
path
:
"/sale/myOrder"
,
//销售 我的订单
component
:
()
=>
...
...
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