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
465ffc4b
Commit
465ffc4b
authored
Dec 04, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
d49c2ab7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
215 additions
and
9 deletions
+215
-9
class-form.vue
src/components/course/class-form.vue
+215
-9
No files found.
src/components/course/class-form.vue
View file @
465ffc4b
<
style
>
.CLM-Form
.el-input__inner
{
background
:
transparent
;
border
:
0
;
}
.CLM-Form
.el-input-group__append
{
background
:
transparent
;
border
:
0
;
}
.common_Style
{
display
:
inline-block
;
width
:
30px
;
height
:
30px
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
30px
;
}
.classForm_monday
{
background-color
:
#ced9f8
;
color
:
#2961FE
;
}
.classForm_tuesday
{
background-color
:
#d9f3ff
;
color
:
#3FC4FF
;
}
.classForm_wednesday
{
background-color
:
#f6e2cb
;
color
:
#F28C1D
;
}
.classForm_thursday
{
background-color
:
#ccf3eb
;
color
:
#02C499
;
}
.classForm_friday
{
background-color
:
#f7cfd6
;
color
:
#F72E52
;
}
.classForm_saturday
{
background-color
:
#fff5cc
;
color
:
#FFCC00
;
}
.classForm_sunday
{
background-color
:
#e6e3fe
;
color
:
#8175FB
;
}
</
style
>
<
template
>
<q-dialog
v-model=
"persistent"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card
style=
"width: 800px;max-width:900px;"
class=
"CLM-Form"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
objOption
.
ClassId
==
0
?
'新开班级'
:
'修改班级'
}}
</div>
</q-card-section>
...
...
@@ -69,9 +117,101 @@
map-options
/>
</div>
<div
class=
"col-6"
>
<!-- <q-select filled stack-label @input="getDepartList(msg.School_Id),resetSearch()" option-value="SId"
option-label="SName" v-model="msg.School_Id" ref="School_Id" :options="SchoolList" label="所属校区"
:dense="false" class="col-6 q-pr-lg q-pr-lg" emit-value map-options /> -->
<q-select
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"objOption.ClassRoomId"
ref=
"School_Id"
:options=
"classRoomList"
label=
"关联教室"
:dense=
"false"
class=
"col-6 q-pr-lg q-pr-lg"
emit-value
map-options
/>
</div>
</div>
<div
class=
"row wrap"
style=
"margin:20px 0;"
>
<div
class=
"col-6"
>
阶梯定价
<q-toggle
size=
"md"
label=
""
color=
"primary"
:false-value=
"0"
:true-value=
"1"
v-model=
"objOption.IsStepPrice"
/>
<q-btn
style=
"margin-left:30px;"
size=
"10px"
@
click=
"addStepPrice()"
round
color=
"primary"
icon=
"iconfont icon-img_haha"
/>
</div>
</div>
<
template
v-if=
"objOption.IsStepPrice==1"
>
<div
class=
"row wrap"
v-for=
"(item,index) in ladderPriceList"
:key=
"index"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
v-model=
"item.pnumber"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"人"
/>
</div>
<div
class=
"col-6"
style=
"position:relative;"
>
<q-input
filled
stack-label
maxlength=
"20"
v-model=
"item.price"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"价格"
/>
<q-btn
style=
"position:absolute;right:-8px;top:14px;"
size=
"10px"
@
click=
"delStepPrice(index)"
round
color=
"red"
icon=
"iconfont icon-guanbi1"
/>
</div>
</div>
</
template
>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
提成设置
<q-toggle
size=
"md"
label=
""
color=
"primary"
:false-value=
"0"
:true-value=
"1"
v-model=
"objOption.IsOpenCommission"
/>
<div
style=
"display:inline-block;margin-left:20px;"
>
<q-radio
v-model=
"objOption.CommissionType"
:val=
"1"
label=
"按人头"
/>
<q-radio
v-model=
"objOption.CommissionType"
:val=
"2"
label=
"按百分"
/>
</div>
</div>
</div>
<div
class=
"row wrap"
style=
"margin:20px 0"
>
<div
class=
"col-12"
>
<q-field
filled
class=
"col-6 q-pr-lg q-pb-lg"
>
<
template
v-slot:control
>
<el-input
placeholder=
"数值"
v-model=
"objOption.CommissionValue"
>
<template
slot=
"append"
>
<span
v-if=
"objOption.CommissionType==1"
>
人
</span>
<span
v-if=
"objOption.CommissionType==2"
>
%
</span>
</
template
>
</el-input>
</template>
</q-field>
</div>
</div>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
上课设置
</div>
<div
class=
"row wrap"
style=
"margin-bottom:30px;"
>
<div
class=
"col-6"
>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.ClassStyle"
ref=
"ClassStyle"
:options=
"classSetList"
label=
"排课安排"
:dense=
"false"
class=
"col-6 q-pr-lg q-pr-lg"
emit-value
map-options
/>
</div>
</div>
<div
class=
"row wrap"
v-if=
"objOption.ClassStyle==1"
>
<div
class=
"col-6"
>
<q-select
filled
stack-label
multiple
option-value=
"value"
option-label=
"label"
v-model=
"checkedArr"
ref=
"ClassStyle"
:options=
"weekList"
label=
"选择周几"
:dense=
"false"
class=
"col-6 q-pr-lg q-pr-lg"
emit-value
map-options
>
<
template
v-slot:option=
"{ itemProps, itemEvents, opt, selected, toggleOption }"
>
<q-item
v-bind=
"itemProps"
v-on=
"itemEvents"
>
<q-item-section
avatar
>
<span
v-if=
"opt.icon==1"
class=
"common_Style classForm_monday"
>
月
</span>
<span
v-if=
"opt.icon==2"
class=
"common_Style classForm_tuesday"
>
火
</span>
<span
v-if=
"opt.icon==3"
class=
"common_Style classForm_wednesday"
>
水
</span>
<span
v-if=
"opt.icon==4"
class=
"common_Style classForm_thursday"
>
木
</span>
<span
v-if=
"opt.icon==5"
class=
"common_Style classForm_friday"
>
金
</span>
<span
v-if=
"opt.icon==6"
class=
"common_Style classForm_saturday"
>
土
</span>
<span
v-if=
"opt.icon==7"
class=
"common_Style classForm_sunday"
>
日
</span>
</q-item-section>
<q-item-section>
<q-item-label
v-html=
"opt.label"
/>
</q-item-section>
<q-item-section
side
>
<i
style=
"color:#2961FE"
v-if=
"selected"
class=
"iconfont icon-chenggong"
></i>
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
</div>
<div
class=
"row wrap"
v-if=
"objOption.ClassStyle==2"
>
<div
class=
"col-12"
>
<q-date
v-model=
"checkedDays"
minimal
range
multiple
style=
"width:100%"
/>
</div>
</div>
</q-card-section>
...
...
@@ -103,6 +243,7 @@
},
data
()
{
return
{
aa
:
3
,
persistent
:
true
,
objOption
:
{
ClassId
:
0
,
//班级编号
...
...
@@ -141,7 +282,59 @@
ClassList
:
[],
//关联课程下拉数据
TeacherList
:
[],
//关联教师下拉数据
SchoolList
:
[],
//关联校区下拉数据
classRoomList
:
[],
// 关联教室
ladderPriceList
:
[{
//阶梯定价数组
pnumber
:
2
,
price
:
''
}],
checkedArr
:[],
//上课设置
classSetList
:[{
Name
:
'按周排课'
,
Id
:
1
},{
Name
:
'按月排课'
,
Id
:
2
},{
Name
:
'固定日期'
,
Id
:
3
},{
Name
:
'约课'
,
Id
:
4
}],
//周几
weekList
:[{
label
:
'周一'
,
value
:
'周一'
,
icon
:
1
},{
label
:
'周二'
,
value
:
'周二'
,
icon
:
2
},{
label
:
'周三'
,
value
:
'周三'
,
icon
:
3
},{
label
:
'周四'
,
value
:
'周四'
,
icon
:
4
},{
label
:
'周五'
,
value
:
'周五'
,
icon
:
5
},{
label
:
'周六'
,
value
:
'周六'
,
icon
:
6
},{
label
:
'周日'
,
value
:
'周日'
,
icon
:
7
}],
//选中日期
checkedDays
:[]
}
},
mounted
()
{
...
...
@@ -218,17 +411,30 @@
//获取校区下拉
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
SchoolList
=
res
.
Data
;
var
obj
=
{
SName
:
'全部'
,
SId
:
0
SName
:
'全部'
,
SId
:
0
}
this
.
SchoolList
.
unshift
(
obj
);
}
})
},
//新增阶梯定价
addStepPrice
()
{
var
_index
=
this
.
ladderPriceList
.
length
-
1
;
var
obj
=
{
pnumber
:
''
,
price
:
''
}
obj
.
pnumber
=
parseInt
(
this
.
ladderPriceList
[
_index
].
pnumber
)
+
1
;
this
.
ladderPriceList
.
push
(
obj
);
},
//删除阶梯定价
delStepPrice
(
index
)
{
this
.
ladderPriceList
.
splice
(
index
,
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