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
c4e36ac6
Commit
c4e36ac6
authored
Dec 14, 2021
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/confucius
parents
9925ab10
02b8b5b0
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1487 additions
and
685 deletions
+1487
-685
sale.js
src/api/sale/sale.js
+19
-0
student-left.vue
src/components/school/student/student-left.vue
+199
-93
student-visit.vue
src/components/school/student/student-visit.vue
+4
-5
student-yuefang.vue
src/components/school/student/student-yuefang.vue
+1
-1
transfer-order.vue
src/components/school/student/transfer-order.vue
+288
-148
courselist.vue
src/components/school/student/transfer-order/courselist.vue
+57
-438
order-form.vue
src/components/school/student/transfer-order/order-form.vue
+919
-0
No files found.
src/api/sale/sale.js
View file @
c4e36ac6
...
...
@@ -439,5 +439,24 @@ export function RemoveStudentAssist(data) {
});
}
//获取客户来源
export
function
CreateTypeList
(
data
)
{
return
request
({
url
:
'/user/CreateTypeList'
,
method
:
'post'
,
data
});
}
//验证手机号
export
function
CheckExistsStu
(
data
)
{
return
request
({
url
:
'/user/CheckExistsStu'
,
method
:
'post'
,
data
});
}
src/components/school/student/student-left.vue
View file @
c4e36ac6
...
...
@@ -59,6 +59,7 @@
width
:
120px
;
font-size
:
14px
;
}
</
style
>
<
template
>
<div>
...
...
@@ -68,61 +69,82 @@
<div
class=
"customer_info_Stage"
>
<div
class=
"stage_label"
style=
"margin-top:-16px;"
>
客户名称
</div>
<div
class=
"stage_value"
>
<q-input
filled
v-model=
"customObj.StuName"
style=
"width:182px;"
:rules=
"[val => !!val || '请输入客户名称']"
ref=
"StuName"
dense
></q-input>
<q-input
filled
v-model=
"customObj.StuName"
style=
"width:182px;"
ref=
"StuName"
dense
></q-input>
</div>
</div>
</div>
<div
class=
"customer_info_component"
>
<div
class=
"customer_info_Stage"
>
<div
class=
"stage_label"
>
性别
</div>
<div
class=
"stage_label"
style=
"margin-top:-16px;"
>
客户电话
</div>
<div
class=
"stage_value"
>
<q-radio
v-model=
"customObj.StuSex"
:val=
"0"
label=
"男"
/>
<q-radio
v-model=
"customObj.StuSex"
:val=
"1"
label=
"女"
/>
<q-input
filled
v-model=
"customObj.StuTel"
style=
"width:182px;"
@
blur=
"CheckExistsStu()"
ref=
"StuTel"
dense
></q-input>
</div>
</div>
</div>
<div
class=
"customer_info_component"
>
<div
class=
"customer_info_Stage"
>
<div
class=
"stage_label"
style=
"margin-top:-16px;"
>
电话
</div>
<div
class=
"stage_value"
>
<q-input
filled
v-model=
"customObj.StuTel"
style=
"width:182px;"
:rules=
"[val => !!val || '请输入电话号码']"
ref=
"StuTel"
dense
></q-input>
<div
class=
"info_item"
>
<div
class=
"item_label"
>
客户来源
</div>
<div
class=
"item_value"
>
<q-select
filled
v-model=
"customObj.CreateType"
dense
:options=
"customFromList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"客户来源"
/>
</div>
</div>
<div
class=
"info_item"
v-if=
"customObj.CreateType==3||customObj.CreateType==4"
>
<div
class=
"item_label"
>
<span
v-if=
"customObj.CreateType==3"
>
介绍人
</span>
<span
v-if=
"customObj.CreateType==4"
>
转介人
</span>
</div>
<div
class=
"item_value"
>
<q-select
filled
v-model=
"customObj.StuSourceId"
dense
@
filter=
"filterEmployee"
use-input
:options=
"myEmployeeList"
option-label=
"EmployeeName"
option-value=
"Id"
emit-value
map-options
/>
</div>
</div>
<div
class=
"info_item"
>
<div
class=
"item_label"
>
收客渠道
</div>
<div
class=
"item_value"
>
<q-select
filled
v-model=
"customObj.StuChannel"
dense
:options=
"StuChannelList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
/>
</div>
</div>
<div
class=
"info_item"
v-if=
"customObj.StuChannel==6"
>
<div
class=
"item_label"
>
第三方平台名称
</div>
<div
class=
"item_value"
>
<q-input
filled
v-model=
"customObj.PlatformName"
dense
></q-input>
</div>
</div>
<div
class=
"info_item"
v-if=
"customObj.StuChannel==7"
>
<div
class=
"item_label"
>
其他平台名称
</div>
<div
class=
"item_value"
>
<q-input
filled
v-model=
"customObj.PlatformName"
dense
></q-input>
</div>
</div>
<div
class=
"custom_Line"
></div>
<div
class=
"info_title"
>
基本资料
</div>
<div
class=
"info_content"
>
<div
class=
"info_item"
>
<div
class=
"item_label"
>
性别
</div>
<div
class=
"item_value"
>
<q-radio
v-model=
"customObj.StuSex"
:val=
"0"
label=
"男"
/>
<q-radio
v-model=
"customObj.StuSex"
:val=
"1"
label=
"女"
/>
</div>
</div>
<div
class=
"info_item studentDate"
>
<div
class=
"item_label"
>
出生日期
</div>
<div
class=
"item_value"
>
<q-field
filled
dense
>
<template
v-slot:control
>
<el-date-picker
v-model=
"customObj.StuBirth"
style=
"height:28px;width:150px"
type=
"date"
placeholder=
"选择日期"
>
<el-date-picker
v-model=
"customObj.StuBirth"
style=
"height:28px;width:150px"
type=
"date"
placeholder=
"选择日期"
>
</el-date-picker>
</
template
>
</q-field>
</div>
</div>
<div
class=
"info_item"
>
<div
class=
"item_label"
>
客户来源
</div>
<div
class=
"item_value"
>
<q-select
filled
v-model=
"customObj.cusfrom"
dense
:options=
"customFrom"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"客户来源"
/>
</div>
</div>
<div
class=
"info_item"
>
<div
class=
"item_label"
>
创建人
</div>
<div
class=
"item_value"
>
<q-select
filled
v-model=
"customObj.CreateBy"
dense
disable
@
filter=
"filterEmployee"
use-input
:options=
"myEmployeeList"
option-label=
"EmployeeName"
option-value=
"Id"
emit-value
map-options
/>
</div>
</div>
<div
class=
"info_item"
>
<div
class=
"item_label"
>
客户阶段状态
</div>
<div
class=
"item_value"
>
<q-select
filled
v-model=
"customObj.StuStage"
dense
:options=
"customState"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"客户状态"
/>
<q-select
filled
v-model=
"customObj.StuStage"
dense
:options=
"customState"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"客户状态"
/>
</div>
</div>
<div
class=
"info_item"
>
...
...
@@ -148,27 +170,15 @@
<div
class=
"info_item"
>
<div
class=
"item_label"
>
学习目的
</div>
<div
class=
"item_value"
>
<q-select
filled
v-model=
"customObj.StuPurpose"
dense
:options=
"goalsList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
/>
<q-select
filled
v-model=
"customObj.StuPurpose"
dense
:options=
"goalsList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
/>
</div>
</div>
<div
class=
"info_item"
>
<div
class=
"item_label"
>
收客渠道
</div>
<div
class=
"item_value"
>
<q-select
filled
v-model=
"customObj.StuChannel"
dense
:options=
"StuChannelList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
/>
</div>
</div>
<div
class=
"info_item"
v-if=
"customObj.StuChannel==6"
>
<div
class=
"item_label"
>
第三方平台名称
</div>
<div
class=
"item_value"
>
<q-input
filled
v-model=
"customObj.PlatformName"
dense
></q-input>
</div>
</div>
<div
class=
"info_item"
v-if=
"customObj.StuChannel==7"
>
<div
class=
"item_label"
>
其他平台名称
</div>
<div
class=
"item_label"
>
创建人
</div>
<div
class=
"item_value"
>
<q-input
filled
v-model=
"customObj.PlatformName"
dense
></q-input>
<q-select
filled
v-model=
"customObj.CreateBy"
dense
disable
@
filter=
"filterEmployee"
use-input
:options=
"myEmployeeList"
option-label=
"EmployeeName"
option-value=
"Id"
emit-value
map-options
/>
</div>
</div>
<div
class=
"info_item"
>
...
...
@@ -188,7 +198,9 @@
getGuestBasicsEnumList
,
getGuestEducationEnumList
,
getGuestLearningGoalsEnumList
,
GetStuChannelList
GetStuChannelList
,
CreateTypeList
,
CheckExistsStu
}
from
'../../../api/sale/sale'
import
{
queryEmployee
...
...
@@ -212,20 +224,29 @@
},
data
()
{
return
{
customFrom
:
[{
Name
:
'员工录入'
,
Id
:
1
},
{
Name
:
'同业录入'
,
Id
:
2
}],
//客户阶段状态列表
customState
:
[],
customMsg
:
{
StuId
:
0
,
},
//客户对象
customObj
:
{},
customObj
:
{
StuId
:
0
,
StuName
:
''
,
//客户名称
StuTel
:
''
,
//客户电话
CreateType
:
''
,
//客户来源
StuSourceId
:
''
,
//介绍人
StuChannel
:
''
,
//收客渠道
PlatformName
:
''
,
//平台名称
StuSex
:
0
,
//性别
StuBirth
:
''
,
//出生日期
StuStage
:
''
,
//客户阶段状态
JapanBaseInfo
:
''
,
//日语基础
StuProfession
:
''
,
//职业
StuEducation
:
''
,
//学历
StuPurpose
:
''
,
//学习目的
CreateBy
:
''
//创建人
},
//日语基础列表
basicList
:
[],
//学历列表
...
...
@@ -236,7 +257,12 @@
employeeList
:
[],
myEmployeeList
:
[],
StuChannelList
:
[],
//收客渠道
AssistDropList
:
[]
//协助人员
AssistDropList
:
[],
//协助人员
customFromList
:
[],
//客户来源
checkMsg
:{
StuId
:
0
,
StuTel
:
''
}
}
},
created
()
{
...
...
@@ -246,21 +272,71 @@
this
.
queryGoalsList
();
this
.
getEmployeeList
();
this
.
GetStuChannelList
();
this
.
getCustomFrom
();
if
(
this
.
saveObj
&&
this
.
saveObj
.
StuId
>
0
)
{
this
.
customMsg
.
StuId
=
this
.
saveObj
.
StuId
;
this
.
checkMsg
.
StuId
=
this
.
saveObj
.
StuId
;
this
.
queryStuInfo
();
}
},
mounted
()
{
},
mounted
()
{},
methods
:
{
//保存学员信息
saveStu
()
{
this
.
$refs
.
StuName
.
validate
();
this
.
$refs
.
StuTel
.
validate
();
if
(
!
this
.
$refs
.
StuName
.
hasError
&&!
this
.
$refs
.
StuTel
.
hasError
){
if
(
this
.
customObj
.
StuName
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请输入客户名称`
})
return
}
if
(
this
.
customObj
.
StuTel
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请输入客户电话`
})
return
}
if
(
this
.
customObj
.
CreateType
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择客户来源`
})
return
}
if
(
this
.
customObj
.
StuChannel
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择收客渠道`
})
return
}
if
(
this
.
customObj
.
StuChannel
==
6
){
if
(
this
.
customObj
.
PlatformName
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请填写第三方平台名称`
})
return
}
}
if
(
this
.
customObj
.
StuChannel
==
7
){
if
(
this
.
customObj
.
PlatformName
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请填写其他平台名称`
})
return
}
}
var
myreg
=
/^
(((
13
[
0-9
]{1})
|
(
15
[
0-9
]{1})
|
(
18
[
0-9
]{1}))
+
\d{8})
$/
;
if
(
!
myreg
.
test
(
this
.
customObj
.
StuTel
))
{
if
(
!
myreg
.
test
(
this
.
customObj
.
StuTel
))
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
...
...
@@ -278,12 +354,11 @@
position
:
'top'
})
this
.
$emit
(
'success'
);
if
(
this
.
AddType
==
1
)
{
if
(
this
.
AddType
==
1
)
{
this
.
$emit
(
'close'
);
}
}
})
}
},
//获取员工列表
getEmployeeList
()
{
...
...
@@ -295,9 +370,9 @@
})
},
//获取收客渠道
GetStuChannelList
(){
GetStuChannelList
()
{
GetStuChannelList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
StuChannelList
=
res
.
Data
;
}
})
...
...
@@ -316,6 +391,14 @@
this
.
basicList
=
res
.
Data
;
})
},
//获取客户来源
getCustomFrom
(){
CreateTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
){
this
.
customFromList
=
res
.
Data
;
}
})
},
//获取学历列表
queryGuestEducationEnumList
()
{
getGuestEducationEnumList
({}).
then
(
res
=>
{
...
...
@@ -339,24 +422,47 @@
StuId
:
this
.
customMsg
.
StuId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customObj
=
res
.
Data
;
var
tempDate
=
res
.
Data
;
this
.
customObj
.
StuId
=
tempDate
.
StuId
;
this
.
customObj
.
StuName
=
tempDate
.
StuName
;
this
.
customObj
.
StuTel
=
tempDate
.
StuTel
;
this
.
customObj
.
CreateType
=
tempDate
.
CreateType
;
this
.
customObj
.
StuSourceId
=
tempDate
.
StuSourceId
;
this
.
customObj
.
StuChannel
=
tempDate
.
StuChannel
;
this
.
customObj
.
PlatformName
=
tempDate
.
PlatformName
;
this
.
customObj
.
StuSex
=
tempDate
.
StuSex
;
this
.
customObj
.
StuBirth
=
tempDate
.
StuBirth
;
this
.
customObj
.
StuStage
=
tempDate
.
StuStage
;
this
.
customObj
.
JapanBaseInfo
=
tempDate
.
JapanBaseInfo
;
this
.
customObj
.
StuProfession
=
tempDate
.
StuProfession
;
this
.
customObj
.
StuEducation
=
tempDate
.
StuEducation
;
this
.
customObj
.
StuPurpose
=
tempDate
.
StuPurpose
;
this
.
customObj
.
CreateBy
=
tempDate
.
CreateBy
;
}
});
},
//新增协助人员
addAssist
(){
addAssist
()
{
let
obj
=
{
Id
:
0
,
//编号
AssistId
:
1
,
//员工编号
AssistType
:
1
,
//类型
StuId
:
1
,
//学员编号
Id
:
0
,
//编号
AssistId
:
1
,
//员工编号
AssistType
:
1
,
//类型
StuId
:
1
,
//学员编号
}
this
.
customObj
.
AssistList
.
push
(
obj
);
},
//删除协助人员
delAssist
(
index
){
this
.
customObj
.
AssistList
.
splice
(
index
,
1
);
delAssist
(
index
)
{
this
.
customObj
.
AssistList
.
splice
(
index
,
1
);
},
//验证手机号
CheckExistsStu
(){
this
.
checkMsg
.
StuTel
=
this
.
customObj
.
StuTel
CheckExistsStu
(
this
.
checkMsg
).
then
(
res
=>
{
})
}
}
}
</
script
>
src/components/school/student/student-visit.vue
View file @
c4e36ac6
...
...
@@ -88,7 +88,7 @@
<q-banner
v-if=
"isShowEdit"
>
<div
class=
"row wrap"
style=
"margin-top:10px;width:300px;"
>
<q-input
filled
v-model=
"feedBackMsg.Feedback"
:rows=
"3"
type=
"textarea"
class=
"col-12 q-pb-lg"
label=
"
反馈
"
>
class=
"col-12 q-pb-lg"
label=
"
请输入反馈内容
"
>
</q-input>
</div>
<div
class=
"row wrap"
style=
"margin-top:10px;width:300px;"
>
...
...
@@ -175,7 +175,7 @@
Id
:
0
,
//编号
IsVisit
:
0
,
//到访状态(1-已到访,0-未到访)
Feedback
:
''
//反馈
}
}
,
}
},
created
()
{
...
...
@@ -189,9 +189,8 @@
this
.
getList
();
let
userInfo
=
this
.
getLocalStorage
();
if
(
userInfo
){
this
.
VisitMsg
.
ReceptionPersion
=
parseInt
(
userInfo
.
Account
Id
);
this
.
VisitMsg
.
ReceptionPersion
=
parseInt
(
userInfo
.
Id
);
}
},
methods
:
{
//点击到访
...
...
@@ -303,7 +302,7 @@
this
.
VisitMsg
.
School_Id
=
0
;
this
.
VisitMsg
.
Date
=
''
;
this
.
VisitMsg
.
VisitTime
=
''
;
this
.
VisitMsg
.
ReceptionPersion
=
''
;
//
this.VisitMsg.ReceptionPersion = '';
this
.
VisitMsg
.
Remark
=
''
;
this
.
VisitMsg
.
Feedback
=
''
;
this
.
isShowAdd
=
false
;
...
...
src/components/school/student/student-yuefang.vue
View file @
c4e36ac6
...
...
@@ -56,7 +56,7 @@
<q-banner
v-if=
"isShowEdit"
>
<div
class=
"row wrap"
style=
"margin-top:10px;width:300px;"
>
<q-input
filled
v-model=
"feedBackMsg.Feedback"
:rows=
"3"
type=
"textarea"
class=
"col-12 q-pb-lg"
label=
"
反馈
"
>
class=
"col-12 q-pb-lg"
label=
"
请输入反馈内容
"
>
</q-input>
</div>
<div
class=
"row wrap"
style=
"float:right;margin-bottom:10px;"
>
...
...
src/components/school/student/transfer-order.vue
View file @
c4e36ac6
div
<
template
>
<
template
>
<q-dialog
v-model=
"persistent"
persistent
...
...
@@ -14,93 +14,117 @@ div<template>
<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:
7
0vh"
>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height:
8
0vh"
>
<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-step
:name=
"1"
title=
"选择课程"
icon=
"settings"
:done=
"step > 1"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-select
v-model=
"OrderMsg.ClassId"
:options=
"ClassList"
@
input=
"resetSearch"
filled
use-input
label=
"选择班级"
option-label=
"ClassName"
option-value=
"ClassId"
ref=
"ClassName"
class=
"col-6"
option-value=
"SId"
option-label=
"SName"
v-model=
"courseMsg.School_Id"
:options=
"schoolList"
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>
label=
"关联校区"
clearable
/>
</div>
</q-step>
<q-step
:name=
"2"
title=
"选择课程"
icon=
"settings"
:done=
"step > 2"
>
<div
class=
"row"
>
<q-select
v-model=
"OrderMsg.HelpEnterId"
:options=
"EmployeeList"
<div
class=
"col-3"
>
<q-input
@
change=
"resetSearch"
clearable
filled
v-model=
"courseMsg.ClassNo"
label=
"班号"
@
clear=
"resetSearch"
maxlength=
"20"
/>
</div>
<div
class=
"col-6"
>
<q-input
@
change=
"resetSearch"
clearable
filled
v-model=
"courseMsg.ClassName"
label=
"班级名称"
@
clear=
"resetSearch"
maxlength=
"20"
/>
</div>
<div
class=
"col-6"
>
<q-select
@
input=
"resetSearch"
@
filter=
"filterCourseFn"
use-input
label=
"选择课程"
option-label=
"EmployeeName
"
option-value=
"Id
"
ref=
"EmployeeName
"
class=
"col-6 q-pb-lg
"
filled
option-value=
"CourseId
"
option-label=
"CourseName
"
v-model=
"courseMsg.CouseId
"
:options=
"myClassList
"
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>
label=
"学习课程"
clearable
/>
</div>
</q-step>
<q-step
:name=
"3"
title=
"选择"
:done=
"step > 3"
>
<q-table
:data=
"data.StuList"
:columns=
"columns"
flat
row-key=
"StuId"
<div
class=
"col-6"
>
<div
class=
"col-3 Sysuser_Date"
>
<q-field
filled
>
<template
v-slot:control
>
<el-date-picker
v-model=
"courseMsg.StartTime"
type=
"date"
placeholder=
"开学日期"
size=
"small"
style=
"width:47%;"
@
change=
"resetSearch"
clear-icon=
"iconfont icon-guanbi"
>
<
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>
</el-date-picker
>
至
<el-date-picker
v-model=
"courseMsg.EndTime"
type=
"date"
placeholder=
"结束日期"
size=
"small"
style=
"width:47%;"
@
change=
"resetSearch"
clear-icon=
"iconfont icon-guanbi"
>
</el-date-picker>
</
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
/>
</q-field>
</div>
</div>
</div>
</div>
<Course
:dataList=
"courseData"
@
select=
"selectCourse"
></Course>
<q-pagination
class=
"full-width justify-end"
v-model=
"courseMsg.pageIndex"
color=
"primary"
:max=
"coursePageCount"
:input=
"true"
@
input=
"changePage"
/>
</q-step>
<q-step
:name=
"2"
title=
"确认"
icon=
"settings"
:done=
"step > 2"
>
<orderForm
ref=
"orderForm"
:save-obj=
"saveObj"
:stuData=
"stuData"
:isChaBan=
"isChaBan"
@
success=
"$emit('close')"
></orderForm>
</q-step>
</q-stepper>
</q-card-section>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-card-actions
align=
"right"
class=
"bg-white
q-mx-md
"
>
<q-btn
label=
"取消"
flat
...
...
@@ -112,15 +136,10 @@ div<template>
@
click=
"$refs.stepper.previous()"
color=
"primary"
label=
"上一步"
v-if=
"step >1"
/>
<q-btn
@
click=
"$refs.stepper.next()"
color=
"primary"
label=
"下一步"
v-if=
"step <4"
v-if=
"step > 1"
/>
<q-btn
label=
"保存"
color=
"primary"
@
click=
""
v-if=
"step == 4"
/>
<q-btn
@
click=
"next"
color=
"primary"
label=
"下一步"
v-if=
"step < 2"
/>
<q-btn
label=
"保存"
color=
"primary"
@
click=
"saveOrderForm"
v-if=
"step == 2"
/>
</q-card-actions>
</q-card>
</q-dialog>
...
...
@@ -128,13 +147,20 @@ div<template>
<
script
>
import
{
getClassPruductList
,
//
setClassOrder
,
getClassPruductList
,
//获取日语培训列表
setClassOrder
,
//新增 修改订单
getOrderGuestRenewState
}
from
"../../../api/sale/sale"
;
import
{
getClassDropDownList
,
//获取班级下拉列表
}
from
'../../../api/school/index'
getSchoolDropdown
,
//获取校区列表
getTeacherDropDownList
}
from
"../../../api/school/index"
;
import
{
queryCourseDropdownList
,
getCourseSubject
}
from
"../../../api/course/index"
;
import
Course
from
"./transfer-order/courselist"
;
import
orderForm
from
"./transfer-order/order-form"
;
export
default
{
props
:
{
select
:
{
...
...
@@ -142,31 +168,15 @@ export default {
default
:
()
=>
[]
}
},
components
:
{
Course
,
orderForm
},
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"
}
],
stuData
:
{},
//学生是否续费
OrderMsg
:
{
ClassId
:
0
,
//班级编号
GuestNum
:
0
,
//人数
...
...
@@ -198,53 +208,183 @@ export default {
DiscountMoney
:
0
,
//优惠金额
PerDiscountMoney
:
0
//每人优惠金额
},
ClassList
:[],
allClassList
:[],
courseMsg
:
{
pageIndex
:
1
,
pageSize
:
9
,
ClassName
:
""
,
//班级名称
StartTime
:
""
,
//开始时间
EndTime
:
""
,
//结束时间
School_Id
:
""
,
//关联校区
CouseId
:
0
,
//课程id
Teacher_Id
:
0
,
//教师id
Q_CanApply
:
"0"
,
//是否可以报名 1是
JoinStartTime
:
""
,
//报名截止日期开始
JoinEndTime
:
""
,
//报名截止日期结束
ClassNo
:
""
,
//班号
CourseSubject
:
""
//所属科目
},
courseData
:
[],
//课程列表
coursePageCount
:
0
,
//课程页数
saveObj
:
{},
//所选课程
isChaBan
:
0
,
//是否插班
//关联校区列表
schoolList
:
[],
ClassList
:
[],
//关联课程下拉数据
myClassList
:
[]
};
},
mounted
()
{
let
nowDay
=
new
Date
();
var
year
=
nowDay
.
getFullYear
();
//年
var
month
=
nowDay
.
getMonth
()
+
1
;
//月
var
day
=
nowDay
.
getDate
();
//日
var
currentDay
=
year
+
"-"
+
month
+
"-"
+
day
;
this
.
courseMsg
.
StartTime
=
currentDay
;
this
.
getOrderGuestRenewState
();
this
.
getClass
();
this
.
getCourseList
();
this
.
getSchool
();
this
.
CourseList
();
},
methods
:
{
getOrderGuestRenewState
()
{
const
ids
=
this
.
select
.
map
(
e
=>
e
.
StuId
).
toString
();
getOrderGuestRenewState
({
StuIds
:
ids
}).
then
(
res
=>
{
console
.
log
(
"res"
,
res
);
this
.
data
=
res
.
Data
;
this
.
stuData
=
res
.
Data
;
if
(
res
.
Data
.
RenewNum
==
0
)
{
this
.
isChaBan
=
0
;
}
else
{
this
.
isChaBan
=
1
;
}
});
},
//获取班级下拉
getClass
()
{
getClassDropDownList
({
CourseId
:
0
,
IsAddDefault
:
0
,
//添加默认选项
}).
then
(
res
=>
{
//获取课程分页列表
getCourseList
()
{
getClassPruductList
(
this
.
courseMsg
).
then
(
res
=>
{
this
.
courseData
=
res
.
Data
.
PageData
;
this
.
coursePageCount
=
res
.
Data
.
PageCount
;
this
.
courseData
.
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
;
}
});
});
},
// 课程翻页
changePage
(
val
)
{
this
.
courseMsg
.
pageIndex
=
val
;
this
.
getCourseList
();
},
// 选择课程
selectCourse
(
val
)
{
this
.
saveObj
=
val
[
0
];
this
.
saveObj
.
Unit_Price
=
this
.
saveObj
.
SellPrice
;
},
next
()
{
if
(
!
this
.
saveObj
.
ClassId
||
this
.
saveObj
.
ClassId
==
0
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
message
:
`请选择班级`
});
return
;
}
this
.
$refs
.
stepper
.
next
();
},
//获取校区列表
getSchool
()
{
getSchoolDropdown
({}).
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
));;
this
.
schoolList
=
res
.
Data
;
}
});
},
//获取课程
CourseList
()
{
queryCourseDropdownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
ClassList
=
res
.
Data
;
this
.
ClassList
.
unshift
({
CourseId
:
0
,
CourseName
:
"不限"
});
this
.
myClassList
=
this
.
ClassList
;
}
});
},
//筛选班级
filterClass
(
val
,
update
)
{
//课程筛选
filterCourseFn
(
val
,
update
,
abort
)
{
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
)
}
})
this
.
myClassList
=
this
.
ClassList
.
filter
(
v
=>
v
.
CourseName
.
indexOf
(
val
)
>
-
1
);
});
},
resetSearch
()
{
this
.
courseMsg
.
pageIndex
=
1
;
this
.
getCourseList
();
},
saveOrderForm
(){
this
.
$refs
.
orderForm
.
saveOrderInfo
()
}
}
};
</
script
>
<
style
scoped
></
style
>
<
style
scoped
>
/
deep
/
.el-input__inner
{
background-color
:
transparent
;
border
:
none
;
}
</
style
>
src/components/school/student/transfer-order/courselist.vue
View file @
c4e36ac6
<
template
>
<div
class=
"page-body japaneseTrain"
>
<div
class=
"page-content"
>
<div>
<span
style=
"font-size: 20px;font-weight: bold;font-family:'perfectFont' "
></span
>
</div>
<div
class=
"orderCourse"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
selection=
"single"
:selected
.
sync=
"selection"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table
"
class=
"sticky-tow-column-table
"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name
"
row-key=
"ClassId
"
title=
"日语培训产品列表"
@
update:selected =
"emitSel"
>
<template
v-slot:body-cell-ClassName=
"props"
>
<!--
<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
>
</
template
>
-->
<
template
v-slot:bottom
>
</
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
props
:
{
dataList
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
return
{
dialog
:
false
,
data
:
[],
loading
:
false
,
dateList
:
[],
//开学时间
selection
:
[],
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
rowsPerPage
:
0
},
columns
:
[
{
id
:
2
,
select
:
false
name
:
"ClassName"
,
label
:
"班级"
,
align
:
"left"
,
field
:
"ClassName"
},
{
id
:
3
,
select
:
false
name
:
"CourseName"
,
label
:
"课程"
,
field
:
"CourseName"
,
align
:
"left"
},
{
id
:
4
,
select
:
false
name
:
"TeacherName"
,
label
:
"老师"
,
field
:
"TeacherName"
,
align
:
"left"
},
{
id
:
5
,
select
:
false
},
{
id
:
6
,
select
:
false
}
];
weekList
.
forEach
(
j
=>
{
x
.
ClassPlanList
.
forEach
(
z
=>
{
if
(
j
.
id
==
z
.
WeekDay
)
{
j
.
select
=
true
;
name
:
"OpenTime"
,
label
:
"上课时间"
,
field
:
"OpenTime"
,
align
:
"left"
}
});
});
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
});
methods
:
{
emitSel
(
val
){
this
.
$emit
(
"select"
,
val
)
}
}
};
</
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
>
.orderCourse
.q-table__bottom
{
min-height
:
0
;
}
</
style
>
src/components/school/student/transfer-order/order-form.vue
0 → 100644
View file @
c4e36ac6
<
style
>
.editOrderDrawerTop
{
width
:
100%
;
height
:
50px
;
display
:
flex
;
justify-content
:
space-between
;
background-color
:
#f0f5fb
;
padding
:
5px
10px
;
align-items
:
center
;
}
</
style
>
<!--订单操作-->
<
template
>
<div>
<!--
<div
class=
"editOrderDrawerTop"
>
<div
style=
"display:flex;align-items:center;margin-left:10px;"
>
<span
class=
"drawer_Span"
>
{{
OrderMsg
.
OrderId
>
0
?
"修改订单"
:
"立即下单"
}}
</span>
</div>
</div>
-->
<div
class=
"row q-mb-md"
>
<div
class=
"col-10"
>
<div
v-for=
"(item, index) in stuData.StuList"
>
<q-chip
icon=
"person"
class=
"primary"
>
{{
item
.
StuName
}}
<span
v-if=
"item.IsRenewGuest == 1"
>
(续费)
</span>
</q-chip>
</div>
</div>
<div
class=
"col-2"
>
<q-toggle
v-model=
"isChaBan"
:true-value=
"1"
:false-value=
'0'
label=
"插班报入"
/>
</div>
</div>
<div
style=
"row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<q-input
filled
stack-label
maxlength=
"3"
:dense=
"false"
@
keyup
.
native=
"checkInteger(OrderMsg, 'GuestNum')"
v-model=
"OrderMsg.GuestNum"
@
input=
"calcPrice()"
class=
"col-6"
label=
"人数"
:rules=
"[val => !!val || '请填写人数']"
disable
/>
<template
v-if=
"isChaBan == 1"
>
<q-select
filled
option-value=
"CourseId"
:disable=
"modityOrderType == 2"
option-label=
"CourseName"
ref=
"CourseId"
v-model=
"OrderMsg.CourseId"
:options=
"CourseList"
emit-value
map-options
class=
"col-6"
:rules=
"[val => !!val || '请选择课程']"
label=
"选择课程"
@
input=
"calcPrice()"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.StartClassHours"
:disable=
"modityOrderType == 2"
@
keyup
.
native=
"checkInteger(OrderMsg, 'StartClassHours')"
ref=
"StartClassHours"
@
input=
"calcPrice()"
class=
"col-6"
label=
"起始课时"
/>
<q-input
filled
v-model=
"OrderMsg.EffectTime"
ref=
"EffectTime"
:rules=
"[val => !!val || '请填生效时间']"
class=
"col-6"
:disable=
"modityOrderType == 2"
mask=
"date"
label=
"生效时间"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"OrderMsg.EffectTime"
@
input=
"() => $refs.qDateProxy1.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<q-select
filled
option-value=
"OrderId"
option-label=
"CourseName"
class=
"col-6"
:disable=
"modityOrderType == 2"
v-model=
"OrderMsg.UpOrderId"
:options=
"beforeOrderList"
emit-value
map-options
label=
"前置订单"
>
<
template
v-slot:option=
"{
itemProps,
itemEvents,
opt,
selected,
toggleOption
}"
>
<q-item
v-bind=
"itemProps"
v-on=
"itemEvents"
>
<q-item-section>
<q-item-label
><span
style=
"color:blue"
>
{{
opt
.
OrderId
}}
</span>
{{
opt
.
CourseName
}}
{{
opt
.
ClassName
}}
{{
getStudent
(
opt
.
GuestList
)
}}
</q-item-label
>
</q-item-section>
</q-item>
</
template
>
</q-select>
</template>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Class_Price"
:disable=
"true"
class=
"col-6"
label=
"单价(课程售价)"
style=
"display:none;"
/>
<
template
v-if=
"modityOrderType == 1"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"IsShowUpPrice == true ? false : true"
@
blur=
"calcPrice()"
class=
"col-6"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
<q-toggle
v-model=
"IsShowUpPrice"
label=
"高于定价收生"
class=
"q-mb-md"
style=
"display:none;"
/>
</
template
>
<
template
v-if=
"modityOrderType == 2"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"true"
@
input=
"calcPrice()"
class=
"col-6"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
</
template
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.DiscountMoney"
:disable=
"true"
class=
"col-6"
label=
"优惠金额"
/>
<!-- <q-input filled stack-label :dense="false" v-model="OrderMsg.PerDiscountMoney" :disable="true"
class="col-6" label="优惠金额(每人)" :hint="'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)" /> -->
<
template
v-if=
"modityOrderType == 3"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
@
input=
"calcPrice()"
class=
"col-6"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
</
template
>
<q-input
filled
stack-label
:disable=
"modityOrderType != 3"
:dense=
"false"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(OrderMsg, 'PreferPrice')"
v-model=
"OrderMsg.PreferPrice"
class=
"col-6"
label=
"应收"
/>
<q-select
:disable=
"modityOrderType == 2"
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"OrderMsg.OrderSource"
:options=
"SourceEnumList"
emit-value
map-options
class=
"col-6"
label=
"客人来源"
/>
<q-select
:disable=
"modityOrderType == 2 || OrderMsg.JoinType == 3"
v-model=
"OrderMsg.HelpEnterId"
:options=
"EmployeeList"
filled
use-input
label=
"协助老师"
option-label=
"EmployeeName"
option-value=
"Id"
ref=
"EmployeeName"
class=
"col-6"
emit-value
map-options
@
filter=
"filterFn"
>
<
template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
<q-select
:disable=
"modityOrderType == 2 || OrderMsg.JoinType == 3"
v-model=
"OrderMsg.CourseConsultantId"
:options=
"EmployeeList"
filled
use-input
label=
"课程顾问"
option-label=
"EmployeeName"
option-value=
"Id"
ref=
"EmployeeName"
class=
"col-6"
emit-value
map-options
@
filter=
"filterFn"
>
<
template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
<q-select
:disable=
"modityOrderType == 2 || OrderMsg.JoinType == 3"
v-model=
"OrderMsg.CustomerId"
:options=
"myCustomerList"
filled
use-input
label=
"同行"
option-label=
"CustomerName"
option-value=
"CustomerId"
ref=
"CustomerName"
class=
"col-6"
emit-value
map-options
@
filter=
"cusfilterFn"
>
<
template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
<q-input
:disable=
"modityOrderType == 2"
v-if=
"OrderMsg.OrderSource == 3"
filled
stack-label
:dense=
"false"
maxlength=
"50"
v-model=
"OrderMsg.GeneralOccupation"
class=
"col-6"
label=
"一般同行"
/>
<q-input
:disable=
"modityOrderType == 2"
v-if=
"OrderMsg.OrderSource == 7"
filled
stack-label
:dense=
"false"
maxlength=
"50"
v-model=
"OrderMsg.EduOccupation"
class=
"col-6"
label=
"教育同行"
/>
<!-- <q-toggle :disable="(modityOrderType==2)" v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1"
label="是否少价" class="q-mb-md" /> -->
<q-input
:disable=
"modityOrderType == 2"
v-if=
"OrderMsg.IsLessPrice == 1"
@
input=
"calcPrice()"
@
keyup
.
native=
"checkPrice(OrderMsg, 'PerLessMoney')"
maxlength=
"10"
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.PerLessMoney"
class=
"col-6"
label=
"少价金额(每人)"
:hint=
"'总少价金额:' + OrderMsg.PerLessMoney * OrderMsg.GuestNum"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.SaleRemark"
style=
"margin-top: 20px"
type=
"textarea"
class=
"col-12"
label=
"备注"
/>
</div>
<!-- <div style="margin:30px 10px 70px 0;" class="flex justify-end savebtn">
<q-btn
color="accent"
class="q-mr-md"
label="保存"
@click="saveOrderInfo()"
/>
</div> -->
</div>
<div
class=
"dialog-out-close"
@
click=
"closeEditOrder"
style=
"height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;"
>
<q-icon
name=
"iconfont icon-jujue1"
size=
"26px"
/>
</div>
</div>
</template>
<
script
>
import
{
getClassOrderInfo
,
//获取订单操作日志列表
getOrderSourceEnumList
,
//获取订单来源 枚举
setClassOrder
,
//修改订单
queryChaClassInfo
,
GetSelectClassOrderList
,
//获取前置下拉
getMyCustomerList
//同行下拉
}
from
"../../../../api/sale/sale"
;
import
{
queryEmployee
}
from
"../../../../api/users/user"
;
//获取员工
import
{
mapState
}
from
"vuex"
;
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
},
//订单类型
orderType
:
{
type
:
Number
,
default
:
1
},
//修改订单类型
modityOrderType
:
{
type
:
Number
,
default
:
0
//1-销售修改,2-OP修改,3-总经理修改
},
isChaBan
:
{
type
:
Number
,
default
:
0
//1-是插班报入
},
stuData
:
{
//学生是否续费
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
IsShowEditOrder
:
true
,
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
,
//每人优惠金额
CourseConsultantId
:
0
,
//课程顾问
CustomerId
:
0
,
//同行
OrderIdentify
:
2
,
//标识参数, 1产品下单 2客户转订单
StuIds
:
""
// NormalCommission:'',//正常返佣金额
// RenewCommission:"",// 预计返佣金额
},
Unit_PriceRemark
:
""
,
//单价规则
IsShowUpPrice
:
false
,
//是否显示高于定价
UnitPrice
:
0
,
SourceEnumList
:
[],
//订单来源
EmployeeList
:
[],
//员工列表
AllemployeeList
:
[],
//所有员工列表
CourseList
:
[],
//课程列表
courseObj
:
{},
//选择的课程
beforeOrderList
:
[],
//前置订单数据
myCustomerList
:
[],
//同行列表
allCustomerList
:
[]
//所有同行列表
};
},
created
()
{
this
.
OrderMsg
.
IsChaBan
=
this
.
isChaBan
;
//HK2021-08-06新增
if
(
this
.
saveObj
&&
this
.
saveObj
.
CourseId
)
{
this
.
OrderMsg
.
CourseId
=
this
.
saveObj
.
CourseId
;
}
this
.
getOrderSEList
();
this
.
getEmployee
();
this
.
initConfig
();
this
.
getSelectClass
();
this
.
getCustomerList
();
},
mounted
()
{
this
.
initData
();
},
watch
:
{},
methods
:
{
//获取班级课程信息
initConfig
()
{
var
qMsg
=
{
ClassId
:
0
};
if
(
this
.
saveObj
.
ClassId
)
{
qMsg
.
ClassId
=
this
.
saveObj
.
ClassId
;
}
queryChaClassInfo
(
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
CourseList
=
res
.
Data
.
otherCourse
;
if
(
this
.
saveObj
&&
this
.
saveObj
.
OrderId
>
0
)
{
}
else
{
this
.
OrderMsg
.
StartClassHours
=
res
.
Data
.
finishHours
;
}
if
(
this
.
OrderMsg
&&
this
.
OrderMsg
.
CourseId
)
{
this
.
courseObj
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
}
this
.
calcPrice
();
}
});
},
//计算课程单价和应收金额
calcPrice
()
{
var
guestNum
=
0
;
if
(
this
.
OrderMsg
.
GuestNum
&&
this
.
OrderMsg
.
GuestNum
>
0
)
{
guestNum
=
Number
(
this
.
OrderMsg
.
GuestNum
);
}
let
temp
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
if
(
temp
)
{
this
.
courseObj
=
temp
;
var
tempDiscountMoney
=
0
;
//优惠金额
var
tempSaleRemark
=
`直客首次报名优惠比例
${
temp
.
B2CRatio
??
0
}
%
`; //备注
//插班课时单价
var classHourPrice = temp.SellPrice / this.courseObj.ClassHours;
var chaBanPrice = Number(
classHourPrice *
(this.courseObj.ClassHours - this.OrderMsg.StartClassHours)
).toFixed(2);
if (guestNum == 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[0].PriceType == 0) {
if (this.OrderMsg.IsChaBan == 1) {
tempDiscountMoney =
(chaBanPrice * temp.CoursePriceList[0].PriceMoney) / 100;
} else {
tempDiscountMoney =
(temp.SellPrice * temp.CoursePriceList[0].PriceMoney) / 100;
}
// tempSaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney + "%";
} else {
tempDiscountMoney = item.CoursePriceList[0].PriceMoney;
// tempSaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney;
}
}
}
if (guestNum > 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[1].PriceType == 0) {
// tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney + "%";
if (this.OrderMsg.IsChaBan == 1) {
tempDiscountMoney =
(chaBanPrice * temp.CoursePriceList[1].PriceMoney) / 100;
} else {
tempDiscountMoney =
(temp.SellPrice * temp.CoursePriceList[1].PriceMoney) / 100;
}
} else {
tempDiscountMoney = item.CoursePriceList[1].PriceMoney;
// tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney;
}
}
}
var perDiscountMoney = Number(tempDiscountMoney).toFixed(2);
this.OrderMsg.PerDiscountMoney = perDiscountMoney;
// this.OrderMsg.DiscountMoney = perDiscountMoney * guestNum;
// this.OrderMsg.DiscountMoney =
// this.OrderMsg.Class_Price *
// this.OrderMsg.GuestNum *
// this.OrderMsg.B2CRatio;
//计算每人优惠和总优惠
if (this.OrderMsg.IsChaBan == 1) {
this.OrderMsg.Unit_Price = chaBanPrice;
this.UnitPrice = chaBanPrice;
} else {
this.OrderMsg.Unit_Price = temp.SellPrice;
this.UnitPrice = temp.SellPrice;
}
this.OrderMsg.SaleRemark = tempSaleRemark;
} else {
if (this.saveObj.ClassId) {
this.OrderMsg.ClassId = this.saveObj.ClassId;
}
if (this.saveObj.Unit_Price) {
this.OrderMsg.Unit_Price = this.saveObj.Unit_Price;
this.UnitPrice = this.saveObj.Unit_Price;
}
if (this.saveObj.SourceId) {
this.OrderMsg.SourceId = this.saveObj.SourceId;
}
this.courseObj = {};
}
/**计算少价---开始*/
var tempPerLessMoney = 0;
if (this.OrderMsg.PerLessMoney && this.OrderMsg.PerLessMoney > 0) {
tempPerLessMoney = this.OrderMsg.PerLessMoney;
}
this.OrderMsg.LessPrice = tempPerLessMoney * guestNum;
/**计算少价----结束*/
var unit_price = 0;
if (this.OrderMsg.Unit_Price && this.OrderMsg.Unit_Price > 0) {
unit_price = Number(this.OrderMsg.Unit_Price);
}
var str = "";
//计算应收价格
if (this.OrderMsg.IsChaBan == 1) {
var newPreferPrice = 0;
if (
this.courseObj &&
this.courseObj.CourseId &&
this.courseObj.CourseId > 0
) {
newPreferPrice = chaBanPrice * guestNum;
}
this.OrderMsg.PreferPrice =
Number(newPreferPrice).toFixed(2) - this.OrderMsg.LessPrice;
} else {
this.OrderMsg.PreferPrice =
Number(guestNum * unit_price).toFixed(2) - this.OrderMsg.LessPrice;
}
//留学就业订单
if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OldPreferPrice = Number(guestNum * unit_price).toFixed(2);
}
this.OrderMsg.GuestNum = this.stuData.StuList.length;
console.log("tag551", this.OrderMsg.GuestNum);
this.OrderMsg.DiscountMoney = 0;
this.stuData.StuList.map(e => {
if (e.IsRenewGuest == 0) {
this.OrderMsg.DiscountMoney +=
this.OrderMsg.Class_Price * this.OrderMsg.B2CRatio;
} else {
this.OrderMsg.DiscountMoney +=
this.OrderMsg.Class_Price * this.OrderMsg.B2CReNewRatio;
}
});
},
initData() {
console.log("tag", "init", this.saveObj);
if (this.saveObj && this.saveObj.OrderId > 0) {
getClassOrderInfo({
OrderId: this.saveObj.OrderId
}).then(res => {
if (res.Code == 1) {
var tempData = res.Data.OrderInfo;
this.OrderMsg.ClassId = tempData.ClassId;
// this.OrderMsg.GuestNum = tempData.GuestNum;
this.OrderMsg.Unit_Price = tempData.Unit_Price;
this.OrderMsg.PreferPrice = tempData.PreferPrice;
this.OrderMsg.OrderSource = tempData.OrderSource;
this.OrderMsg.SaleRemark = tempData.SaleRemark;
this.OrderMsg.Class_Price = tempData.Class_Price;
this.OrderMsg.OrderId = tempData.OrderId;
this.OrderMsg.OrderType = tempData.OrderType;
this.OrderMsg.SourceId = tempData.SourceId;
this.OrderMsg.HelpEnterId = tempData.HelpEnterId;
this.OrderMsg.GeneralOccupation = tempData.GeneralOccupation;
this.OrderMsg.EduOccupation = tempData.EduOccupation;
this.OrderMsg.IsLessPrice = tempData.IsLessPrice;
this.OrderMsg.LessPrice = tempData.LessPrice;
this.OrderMsg.PerLessMoney = tempData.PerLessMoney;
this.OrderMsg.OrderNature = tempData.OrderNature;
this.OrderMsg.OldPreferPrice = tempData.OldPreferPrice;
this.OrderMsg.CourseId = tempData.CourseId;
this.OrderMsg.JoinType = tempData.JoinType;
this.OrderMsg.StartClassHours = tempData.StartClassHours;
this.OrderMsg.IsChaBan = tempData.IsChaBan;
this.OrderMsg.EffectTime = tempData.EffectTime;
this.OrderMsg.UpOrderId = tempData.UpOrderId;
this.OrderMsg.DiscountMoney = tempData.DiscountMoney;
this.OrderMsg.PerDiscountMoney = tempData.PerDiscountMoney;
this.OrderMsg.B2CRatio =
tempData.B2CRatio > 1
? tempData.B2CRatio / 100
: tempData.B2CRatio;
this.OrderMsg.B2CReNewRatio =
tempData.B2CReNewRatio > 1
? tempData.B2CReNewRatio / 100
: tempData.B2CReNewRatio;
this.OrderMsg.CustomerId = tempData.CustomerId;
this.OrderMsg.CourseConsultantId = tempData.CourseConsultantId;
this.UnitPrice = this.OrderMsg.Unit_Price;
this.IsShowEditOrder = true;
}
});
} else {
this.OrderMsg.SaleRemark = ""; //清空备注
this.OrderMsg.HelpEnterId = 0;
this.OrderMsg.GeneralOccupation = "";
this.OrderMsg.EduOccupation = "";
this.OrderMsg.IsLessPrice = 0;
this.OrderMsg.LessPrice = 0;
this.OrderMsg.PerLessMoney = 0;
this.OrderMsg.OrderNature = 0;
this.OrderMsg.OldPreferPrice = 0;
// this.OrderMsg.GuestNum = 1;
this.OrderMsg.StartClassHours = 0;
this.OrderMsg.IsChaBan = this.isChaBan;
this.OrderMsg.EffectTime = "";
this.OrderMsg.UpOrderId = 0;
this.OrderMsg.JoinType = 1;
this.OrderMsg.DiscountMoney = 0;
this.OrderMsg.PerDiscountMoney = 0;
this.OrderMsg.OrderType = this.orderType;
this.OrderMsg.B2CRatio = 0;
this.OrderMsg.B2CReNewRatio = 0;
this.OrderMsg.CustomerId = 0;
this.OrderMsg.CourseConsultantId = 0;
if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OrderNature = 1;
}
if (this.saveObj) {
if (this.saveObj.ClassId) {
this.OrderMsg.ClassId = this.saveObj.ClassId;
}
if (this.saveObj.Unit_Price) {
this.OrderMsg.Unit_Price = this.saveObj.Unit_Price;
this.OrderMsg.Class_Price = this.saveObj.Unit_Price;
this.UnitPrice = this.saveObj.Unit_Price;
}
if (this.saveObj.SourceId) {
this.OrderMsg.SourceId = this.saveObj.SourceId;
}
if (this.saveObj.CourseId) {
this.OrderMsg.CourseId = this.saveObj.CourseId;
} else {
this.OrderMsg.CourseId = "";
}
if (this.saveObj.B2CRatio) {
this.OrderMsg.B2CRatio =
this.saveObj.B2CRatio > 1
? this.saveObj.B2CRatio / 100
: this.saveObj.B2CRatio;
}
if (this.saveObj.B2CReNewRatio) {
this.OrderMsg.B2CReNewRatio =
this.saveObj.B2CReNewRatio > 1
? this.saveObj.B2CReNewRatio / 100
: this.saveObj.B2CReNewRatio;
}
}
this.IsShowEditOrder = true;
this.calcPrice();
// console.log("this.saveObj", this.saveObj);
}
},
//筛选员工
filterFn(val, update) {
update(() => {
if (val === "") {
this.EmployeeList = JSON.parse(JSON.stringify(this.AllemployeeList));
} else {
const needle = val.toLowerCase();
this.EmployeeList = this.AllemployeeList.filter(
v => v.EmployeeName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//筛选同行
cusfilterFn(val, update) {
update(() => {
if (val === "") {
this.myCustomerList = JSON.parse(
JSON.stringify(this.allCustomerList)
);
} else {
const needle = val.toLowerCase();
this.myCustomerList = this.allCustomerList.filter(
v => v.CustomerName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//获取业务员
getEmployee() {
var qMsg = {
Dept_Id: 0
};
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.EmployeeList = res.Data;
this.AllemployeeList = res.Data;
let obj = {
Id: 0,
EmployeeName: "不限"
};
this.EmployeeList.unshift(obj);
}
});
},
//关闭弹窗
closeEditOrder() {
this.IsShowEditOrder = false;
this.$emit("close");
},
//获取订单来源
getOrderSEList() {
getOrderSourceEnumList({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
this.SourceEnumList = tempArray;
this.OrderMsg.OrderSource = tempArray[0].Id;
}
});
},
//修改订单
saveOrderInfo() {
//插班验证课程和生效时间
if (this.isChaBan == 1) {
this.$refs.CourseId.validate();
this.$refs.EffectTime.validate();
if (this.$refs.CourseId.hasError) {
this.$q.notify({
type: "negative",
position: "top",
message: `
请选择课程
!
`
});
return;
}
if (this.$refs.EffectTime.hasError) {
this.$q.notify({
type: "negative",
position: "top",
message: `
请选择生效时间
!
`
});
return;
}
}
//插班报名计算应收
if (this.OrderMsg.IsChaBan == 1) {
if (this.modityOrderType == 1 || this.modityOrderType == 2) {
if (
!this.courseObj ||
(this.courseObj && !this.courseObj.ClassHours)
) {
if (this.OrderMsg && this.OrderMsg.CourseId) {
this.courseObj = this.CourseList.find(
x => x.CourseId == this.OrderMsg.CourseId
);
}
}
//插班课时单价
var classHourPrice =
this.courseObj.SellPrice / this.courseObj.ClassHours;
var chaBanPrice = Number(
classHourPrice *
(this.courseObj.ClassHours - this.OrderMsg.StartClassHours)
).toFixed(2);
var newPreferPrice =
chaBanPrice * this.OrderMsg.GuestNum - this.OrderMsg.LessPrice;
this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2);
}
}
//正常报名计算应收
if (this.OrderMsg.IsChaBan == 0) {
if (this.modityOrderType == 1 || this.modityOrderType == 2) {
this.OrderMsg.PreferPrice =
this.OrderMsg.GuestNum * this.OrderMsg.Unit_Price -
this.OrderMsg.LessPrice;
}
}
this.OrderMsg.StuIds = this.stuData.StuList.map(e => e.StuId).toString();
setClassOrder(this.OrderMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "操作成功!",
position: "top"
});
//调用父页面成功方法
this.$emit("success");
this.IsShowEditOrder = false;
} else {
this.$q.notify({
type: "negative",
position: "top",
message: res.Message
});
}
});
},
//获取前置下拉数据
getSelectClass() {
var qMsg = {
ClassId: 0
};
if (this.saveObj.ClassId) {
qMsg.ClassId = this.saveObj.ClassId;
}
GetSelectClassOrderList(qMsg).then(res => {
if (res.Code == 1) {
this.beforeOrderList = res.Data;
}
});
},
getStudent(item) {
let str = "";
if (item && item.length > 1) {
str = item[0].GuestName + "等" + item.length + "人";
}
if (item.length == 1) {
str = item[0].GuestName;
}
return str;
},
getCustomerList() {
getMyCustomerList({}).then(res => {
this.myCustomerList = res.Data;
this.allCustomerList = res.Data;
this.myCustomerList.unshift({
CustomerId: 0,
CustomerName: "不限"
});
});
}
}
};
</
script
>
<
style
>
.savebtn
{
position
:
absolute
;
bottom
:
0
;
right
:
0
;
}
</
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