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
0e1db0e4
Commit
0e1db0e4
authored
Dec 14, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
23ac59f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
712 additions
and
0 deletions
+712
-0
transfer-order.vue
src/components/school/student/transfer-order.vue
+250
-0
courselist.vue
src/components/school/student/transfer-order/courselist.vue
+462
-0
No files found.
src/components/school/student/transfer-order.vue
0 → 100644
View file @
0e1db0e4
div
<
template
>
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
class=
"addactivetype"
@
hide=
"$emit('close')"
>
<q-card
style=
"width: 800px;max-width:800px;"
>
<q-card-section
class=
"row items-center q-pb-none"
>
<div
class=
"text-h6"
>
转订单
</div>
<q-space
/>
<q-btn
icon=
"close"
flat
round
dense
v-close-popup
/>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<q-stepper
v-model=
"step"
ref=
"stepper"
color=
"primary"
animated
flat
>
<q-step
:name=
"1"
title=
"选择班级"
icon=
"settings"
:done=
"step > 1"
>
<div
class=
"row"
>
<q-select
v-model=
"OrderMsg.ClassId"
:options=
"ClassList"
filled
use-input
label=
"选择班级"
option-label=
"ClassName"
option-value=
"ClassId"
ref=
"ClassName"
class=
"col-6"
emit-value
map-options
@
filter=
"filterClass"
>
<template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
</q-step>
<q-step
:name=
"2"
title=
"选择课程"
icon=
"settings"
:done=
"step > 2"
>
<div
class=
"row"
>
<q-select
v-model=
"OrderMsg.HelpEnterId"
:options=
"EmployeeList"
filled
use-input
label=
"选择课程"
option-label=
"EmployeeName"
option-value=
"Id"
ref=
"EmployeeName"
class=
"col-6 q-pb-lg"
emit-value
map-options
@
filter=
"classFilterClass"
>
<
template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
</q-step>
<q-step
:name=
"3"
title=
"选择"
:done=
"step > 3"
>
<q-table
:data=
"data.StuList"
:columns=
"columns"
flat
row-key=
"StuId"
>
<
template
v-slot:body-cell-IsRenewGuest=
"props"
>
<q-td
:props=
"props"
>
<span
v-if=
"props.row.IsRenewGuest === 0"
>
否
</span>
<span
v-if=
"props.row.IsRenewGuest === 1"
>
是
</span>
</q-td>
</
template
>
<
template
v-slot:bottom
>
</
template
>
</q-table>
</q-step>
<q-step
:name=
"4"
title=
"确认"
icon=
"settings"
:done=
"step > 4"
>
<div
class=
"row"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.GuestNum"
class=
"col-12"
label=
"人数"
disable
/>
</div>
</q-step>
</q-stepper>
</q-card-section>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
v-close-popup
/>
<q-btn
@
click=
"$refs.stepper.previous()"
color=
"primary"
label=
"上一步"
v-if=
"step >1"
/>
<q-btn
@
click=
"$refs.stepper.next()"
color=
"primary"
label=
"下一步"
v-if=
"step <4"
/>
<q-btn
label=
"保存"
color=
"primary"
@
click=
""
v-if=
"step == 4"
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
import
{
getClassPruductList
,
//
setClassOrder
,
getOrderGuestRenewState
}
from
"../../../api/sale/sale"
;
import
{
getClassDropDownList
,
//获取班级下拉列表
}
from
'../../../api/school/index'
export
default
{
props
:
{
select
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
return
{
persistent
:
true
,
step
:
1
,
data
:
{},
columns
:
[
{
name
:
"StuName"
,
label
:
"名称"
,
field
:
"StuName"
,
align
:
"left"
},
{
name
:
"StuTel"
,
label
:
"电话"
,
align
:
"left"
,
field
:
"StuTel"
},
{
name
:
"IsRenewGuest"
,
label
:
"是否续费"
,
field
:
"IsRenewGuest"
,
align
:
"left"
}
],
OrderMsg
:
{
ClassId
:
0
,
//班级编号
GuestNum
:
0
,
//人数
B2CRatio
:
0
,
B2CReNewRatio
:
0
,
CustomerId
:
0
,
//市场专员
Unit_Price
:
0
,
PreferPrice
:
0
,
OrderSource
:
0
,
SaleRemark
:
""
,
Class_Price
:
0
,
//单价
OrderId
:
0
,
OrderType
:
0
,
//订单类型(1-班级课程订单,2-留学就业订单)
SourceId
:
0
,
//来源编号
HelpEnterId
:
0
,
//协助老师编号
GeneralOccupation
:
""
,
//一般同行
EduOccupation
:
""
,
//教育同行
IsLessPrice
:
0
,
//是否少价 0 不少 1 少
LessPrice
:
0
,
//少价金额
PerLessMoney
:
0
,
//每人少价金额
OrderNature
:
1
,
//订单性质
OldPreferPrice
:
0
,
//原实际应收
IsChaBan
:
0
,
//是否插班报入(1-是)
CourseId
:
""
,
//课程编号
StartClassHours
:
0
,
//已上课时
EffectTime
:
""
,
//生效时间
UpOrderId
:
0
,
//前置订单编号
JoinType
:
1
,
//订单报入类型
DiscountMoney
:
0
,
//优惠金额
PerDiscountMoney
:
0
//每人优惠金额
},
ClassList
:[],
allClassList
:[],
};
},
mounted
()
{
this
.
getOrderGuestRenewState
();
this
.
getClass
();
},
methods
:
{
getOrderGuestRenewState
()
{
const
ids
=
this
.
select
.
map
(
e
=>
e
.
StuId
).
toString
();
getOrderGuestRenewState
({
StuIds
:
ids
}).
then
(
res
=>
{
console
.
log
(
"res"
,
res
);
this
.
data
=
res
.
Data
;
});
},
//获取班级下拉
getClass
()
{
getClassDropDownList
({
CourseId
:
0
,
IsAddDefault
:
0
,
//添加默认选项
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
jsonData
=
res
.
Data
;
jsonData
.
unshift
({
ClassId
:
0
,
ClassName
:
"不限"
})
if
(
jsonData
&&
jsonData
.
length
>
0
)
{
this
.
ClassList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));
this
.
allClassList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));;
}
}
});
},
//筛选班级
filterClass
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
ClassList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allClassList
))
}
else
{
const
needle
=
val
.
toLowerCase
()
this
.
ClassList
=
this
.
allClassList
.
filter
(
v
=>
v
.
ClassName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
})
},
}
};
</
script
>
<
style
scoped
></
style
>
src/components/school/student/transfer-order/courselist.vue
0 → 100644
View file @
0e1db0e4
<
template
>
<div
class=
"page-body japaneseTrain"
>
<div
class=
"page-content"
>
<div>
<span
style=
"font-size: 20px;font-weight: bold;font-family:'perfectFont' "
></span
>
</div>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
title=
"日语培训产品列表"
>
<template
v-slot:body-cell-ClassName=
"props"
>
<q-td
:props=
"props"
style=
"padding-right: 0px"
>
{{
props
.
row
.
ClassName
}}
【
{{
props
.
row
.
ClassNo
}}
】
</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
{
getClassPruductList
,
//获取日语培训列表
setClassOrder
//新增 修改订单
}
from
"../../api/sale/sale"
;
import
{
getSchoolDropdown
,
//获取校区列表
getTeacherDropDownList
}
from
"../../api/school/index"
;
import
{
queryCourseDropdownList
,
getCourseSubject
}
from
"../../api/course/index"
;
import
editorderForm
from
"../../components/sale/editorder-form"
;
//修改订单
export
default
{
meta
:
{
title
:
"日语培训"
},
components
:
{
editorderForm
},
data
()
{
return
{
dialog
:
false
,
data
:
[],
loading
:
false
,
dateList
:
[],
//开学时间
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
ClassName
:
""
,
//班级名称
StartTime
:
""
,
//开始时间
EndTime
:
""
,
//结束时间
School_Id
:
""
,
//关联校区
CouseId
:
0
,
//课程id
Teacher_Id
:
0
,
//教师id
Q_CanApply
:
"0"
,
//是否可以报名 1是
JoinStartTime
:
""
,
//报名截止日期开始
JoinEndTime
:
""
,
//报名截止日期结束
ClassNo
:
""
,
//班号
CourseSubject
:
""
//所属科目
},
//关联校区列表
schoolList
:
[],
pageCount
:
0
,
ClassList
:
[],
//关联课程下拉数据
TeacherList
:
[],
//关联教师下拉数据
elvalue
:
new
Date
(),
isShowEditOrderForm
:
false
,
//是否显示订单弹窗
//订单对象
orderObj
:
{
ClassId
:
0
,
Unit_Price
:
0
,
CourseId
:
0
},
isChaBan
:
0
,
//是否插班(0-正常报入,1-插班报入)
CourseSubjectList
:
[],
//科目列表
myClassList
:
[]
};
},
created
()
{
this
.
getSchool
();
this
.
queryCourseSubject
();
this
.
CourseList
();
this
.
GetTeacherList
();
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
ClassName
)
{
this
.
msg
.
ClassName
=
decodeURI
(
this
.
$route
.
query
.
ClassName
);
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
ClassNo
)
{
this
.
msg
.
ClassNo
=
this
.
$route
.
query
.
ClassNo
;
}
let
nowDay
=
new
Date
();
var
year
=
nowDay
.
getFullYear
();
//年
var
month
=
nowDay
.
getMonth
()
+
1
;
//月
var
day
=
nowDay
.
getDate
();
//日
var
currentDay
=
year
+
"-"
+
month
+
"-"
+
day
;
this
.
msg
.
StartTime
=
currentDay
;
},
mounted
()
{
this
.
getList
();
},
methods
:
{
//课程筛选
filterCourseFn
(
val
,
update
,
abort
)
{
update
(()
=>
{
this
.
myClassList
=
this
.
ClassList
.
filter
(
v
=>
v
.
CourseName
.
indexOf
(
val
)
>
-
1
);
});
},
queryCourseSubject
()
{
getCourseSubject
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
CourseSubjectList
=
res
.
Data
;
}
});
},
//关闭订单修改
closeOrderSaveForm
()
{
this
.
isShowEditOrderForm
=
false
;
},
refreshOrder
()
{
this
.
getList
();
},
//跳转到班级订单
goclassorder
(
item
)
{
var
tempStr
=
"/course/classorder?ClassId="
+
item
.
ClassId
;
this
.
$router
.
push
({
path
:
tempStr
});
},
//获取校区列表
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
tempArray
=
res
.
Data
;
if
(
!
tempArray
)
{
tempArray
=
[];
}
this
.
schoolList
=
tempArray
;
}
});
},
//判断是否过期
getEXPDate
(
time
)
{
var
str
=
time
.
replace
(
/年/g
,
"/"
)
.
replace
(
/月/g
,
"/"
)
.
replace
(
/日/g
,
""
);
var
date
=
new
Date
(
str
).
getTime
();
var
now
=
new
Date
().
getTime
()
+
86400
;
if
(
date
<
now
)
{
return
true
;
//过期
}
else
{
return
false
;
//没过期
}
},
//获取课程
CourseList
()
{
queryCourseDropdownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
ClassList
=
res
.
Data
;
this
.
ClassList
.
unshift
({
CourseId
:
0
,
CourseName
:
"不限"
});
this
.
myClassList
=
this
.
ClassList
;
}
});
},
//获取教师下拉
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TeacherList
=
res
.
Data
;
this
.
TeacherList
.
unshift
({
TId
:
0
,
TeacherName
:
"不限"
});
}
});
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
//获取菜单分页列表
getList
()
{
this
.
loading
=
true
;
getClassPruductList
(
this
.
msg
)
.
then
(
res
=>
{
this
.
loading
=
false
;
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
this
.
data
.
forEach
(
x
=>
{
if
(
x
.
ClassStyle
==
1
)
{
let
weekList
=
[
//定义一个数组
{
id
:
7
,
select
:
false
},
{
id
:
1
,
select
:
false
},
{
id
:
2
,
select
:
false
},
{
id
:
3
,
select
:
false
},
{
id
:
4
,
select
:
false
},
{
id
:
5
,
select
:
false
},
{
id
:
6
,
select
:
false
}
];
weekList
.
forEach
(
j
=>
{
x
.
ClassPlanList
.
forEach
(
z
=>
{
if
(
j
.
id
==
z
.
WeekDay
)
{
j
.
select
=
true
;
}
});
});
x
.
weeks
=
weekList
;
}
else
if
(
x
.
ClassStyle
==
2
)
{
let
data
=
[];
for
(
let
i
=
0
;
i
<
31
;
i
++
)
{
let
obj
=
{
name
:
i
+
1
,
select
:
false
};
x
.
ClassPlanList
.
forEach
(
j
=>
{
if
(
j
.
WeekDay
==
i
+
1
)
{
obj
.
select
=
true
;
}
});
data
.
push
(
obj
);
}
x
.
month
=
data
;
}
});
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
},
//立即报名和插班报名
placeAnorder
(
item
,
type
)
{
if
(
item
.
Teacher_Id
==
0
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
message
:
`请联系班级管理员,关联班级老师后报名`
});
return
;
}
this
.
isChaBan
=
type
;
this
.
orderObj
.
ClassId
=
item
.
ClassId
;
this
.
orderObj
.
Unit_Price
=
item
.
SellPrice
;
this
.
orderObj
.
CourseId
=
item
.
CouseId
;
this
.
orderObj
.
B2CRatio
=
item
.
B2CRatio
;
this
.
orderObj
.
B2CReNewRatio
=
item
.
B2CReNewRatio
;
this
.
isShowEditOrderForm
=
true
;
},
//跳转到课程大纲
goChapter
(
CouseId
)
{
this
.
OpenNewUrl
(
"/course/chapter"
,
{
CourseId
:
CouseId
});
}
}
};
</
script
>
<
style
>
li
{
list-style-type
:
none
;
}
.japaneseTrain
ul
{
padding
:
0px
;
}
.japaneseTrain
li
{
background
:
rgba
(
221
,
222
,
224
,
0.2
);
border-radius
:
4px
;
margin-top
:
15px
;
}
.japaneseTrain
li
.dline
{
display
:
table
;
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
}
.japaneseTrain
li
.d1
,
.japaneseTrain
li
.d2
,
.japaneseTrain
li
.d3
,
.japaneseTrain
li
.d4
,
.japaneseTrain
li
.d5
{
width
:
18%
;
padding
:
20px
20px
10px
;
}
.japaneseTrain
li
.d7
{
flex
:
1
;
width
:
1px
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
}
.japaneseTrain
li
.d1
.di-title
{
font-size
:
16px
;
color
:
#111111
;
}
.japaneseTrain
li
.d1
.di-c
{
font-size
:
14px
;
display
:
flex
;
align-items
:
center
;
line-height
:
28px
;
color
:
#111111
;
}
.japaneseTrain
li
.d6
{
padding
:
10px
20px
;
width
:
100%
;
height
:
inherit
;
position
:
relative
;
border-top
:
1px
solid
#dddee0
;
}
.japaneseTrain
li
.d6
.progress
{
width
:
100%
;
height
:
5px
;
position
:
absolute
;
left
:
0
;
bottom
:
0
;
}
.japaneseTrain
li
.d2
>
div
{
margin
:
10px
0
;
font-size
:
14px
;
color
:
#111111
;
}
.japaneseTrain
li
.d2-n
{
font-size
:
12px
;
color
:
#999999
;
margin-right
:
20px
;
}
.japaneseTrain
li
.d3
.d3-s
{
color
:
var
(
--q-color-negative
);
font-weight
:
bold
;
}
.japaneseTrain
li
.d3
div
{
margin
:
10px
0
;
font-size
:
14px
;
}
.japaneseTrain
li
.d4
div
{
font-size
:
14px
;
color
:
#111111
;
margin
:
10px
0
;
}
.japaneseTrain
li
.d5
div
{
font-size
:
14px
;
color
:
#111111
;
margin
:
10px
0
;
}
.japaneseTrain
.price-popup
{
border-radius
:
4px
;
}
.japaneseTrain
.el-range-editor
.el-range-input
{
background
:
none
;
}
.japaneseTrain
.el-range-editor.el-input__inner
{
background-color
:
transparent
;
}
.japaneseTrain
.q-mb-md
{
margin-bottom
:
0
;
}
.japaneseTrain
.month-item
{
display
:
inline-block
;
width
:
45.5px
;
height
:
45.4px
;
line-height
:
45.4px
;
text-align
:
center
;
font-size
:
12px
;
color
:
#2d2d2d
;
}
.price-popup
.el-calendar-table
.el-calendar-day
{
height
:
60px
;
}
.japaneseTrain
.el-input__inner
{
border
:
none
!important
;
background
:
transparent
!important
;
}
.japanFeature
{
font-size
:
14px
;
color
:
#111111
;
cursor
:
pointer
;
margin-left
:
-1px
;
}
.CourseFearure
{
margin
:
10px
;
width
:
500px
;
color
:
#000
;
}
</
style
>
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