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
bb245a36
Commit
bb245a36
authored
Jan 05, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d01c14b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
860 additions
and
1257 deletions
+860
-1257
student-left.vue
src/components/school/student/student-left.vue
+564
-791
studentAddForm.vue
src/components/school/student/studentAddForm.vue
+296
-466
No files found.
src/components/school/student/student-left.vue
View file @
bb245a36
<
style
>
<
style
>
.info_title
{
.info_title
{
padding
:
0
22px
;
padding
:
0
22px
;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
flex-shrink
:
0
;
flex-shrink
:
0
;
font-size
:
16px
;
font-size
:
16px
;
font-weight
:
700
;
font-weight
:
700
;
font-family
:
Microsoft
YaHei
,
Avenir
,
Helvetica
,
Arial
,
sans-serif
!important
;
font-family
:
Microsoft
YaHei
,
Avenir
,
Helvetica
,
Arial
,
sans-serif
!important
;
}
}
.customer_info_component
{
.customer_info_component
{
width
:
100%
;
width
:
100%
;
}
}
.customer_info_Stage
{
.customer_info_Stage
{
width
:
100%
;
width
:
100%
;
padding
:
0
7px
;
padding
:
0
7px
;
cursor
:
pointer
;
cursor
:
pointer
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
width
:
100%
;
width
:
100%
;
padding
:
12px
22px
;
padding
:
12px
22px
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.stage_label
{
.stage_label
{
color
:
#606266
;
color
:
#606266
;
flex-shrink
:
0
;
flex-shrink
:
0
;
width
:
65px
;
width
:
65px
;
text-align
:
right
;
text-align
:
right
;
}
}
.stage_value
{
.stage_value
{
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
.info_content
{
.info_content
{
margin-bottom
:
30px
;
margin-bottom
:
30px
;
}
}
.info_item
{
.info_item
{
position
:
relative
;
position
:
relative
;
display
:
flex
;
display
:
flex
;
padding
:
12px
22px
;
padding
:
12px
22px
;
align-items
:
center
;
align-items
:
center
;
}
}
.item_value
{
.item_value
{
flex
:
1
;
flex
:
1
;
font-size
:
14px
;
font-size
:
14px
;
word-break
:
break-all
;
word-break
:
break-all
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.item_label
{
.item_label
{
color
:
#606266
;
color
:
#606266
;
flex-shrink
:
0
;
flex-shrink
:
0
;
width
:
120px
;
width
:
120px
;
font-size
:
14px
;
font-size
:
14px
;
}
}
.student_require
{
.student_require
{
color
:
red
;
color
:
red
;
}
}
.stuHeadImg
{
.stuHeadImg
{
width
:
80px
;
width
:
80px
;
height
:
80px
;
height
:
80px
;
position
:
relative
;
position
:
relative
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div>
<div>
...
@@ -79,19 +79,10 @@
...
@@ -79,19 +79,10 @@
<div
class=
"stage_label"
>
头像
</div>
<div
class=
"stage_label"
>
头像
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<div
class=
"stuHeadImg"
>
<div
class=
"stuHeadImg"
>
<el-upload
<el-upload
:before-upload=
"uploadFile"
:multiple=
"false"
action=
""
:show-file-list=
"false"
>
:before-upload=
"uploadFile"
:multiple=
"false"
action=
""
:show-file-list=
"false"
>
<q-avatar
size=
"80px"
font-size=
"36px"
text-color=
"white"
>
<q-avatar
size=
"80px"
font-size=
"36px"
text-color=
"white"
>
<img
:src=
"customObj.StuIcon"
v-if=
"customObj.StuIcon"
/>
<img
:src=
"customObj.StuIcon"
v-if=
"customObj.StuIcon"
/>
<img
<img
v-else
src=
"../../../assets/images/administration/litheader.png"
alt=
""
/>
v-else
src=
"../../../assets/images/administration/litheader.png"
alt=
""
/>
</q-avatar>
</q-avatar>
</el-upload>
</el-upload>
</div>
</div>
...
@@ -104,14 +95,7 @@
...
@@ -104,14 +95,7 @@
<span
class=
"student_require"
>
*
</span>
客户名称
<span
class=
"student_require"
>
*
</span>
客户名称
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-input
<q-input
filled
v-model=
"customObj.StuName"
style=
"width:185px;"
ref=
"StuName"
dense
:disable=
"noEdit"
>
filled
v-model=
"customObj.StuName"
style=
"width:185px;"
ref=
"StuName"
dense
:disable=
"noEdit"
>
</q-input>
</q-input>
</div>
</div>
</div>
</div>
...
@@ -122,15 +106,8 @@
...
@@ -122,15 +106,8 @@
客户电话
客户电话
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-input
<q-input
filled
v-model=
"customObj.StuTel"
style=
"width:185px;"
filled
ref=
"StuRealMobile"
:disable=
"noEdit"
dense
>
v-model=
"customObj.formatTel"
style=
"width:185px;"
@
blur=
"CheckExistsStu(1)"
ref=
"StuTel"
:disable=
"noEdit"
dense
>
</q-input>
</q-input>
</div>
</div>
</div>
</div>
...
@@ -141,15 +118,8 @@
...
@@ -141,15 +118,8 @@
客户电话
客户电话
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-input
<q-input
filled
v-model=
"customObj.StuRealMobile"
style=
"width:185px;"
@
blur=
"CheckExistsStu(1)"
filled
ref=
"StuRealMobile"
:disable=
"noEdit"
dense
>
v-model=
"customObj.StuTel"
style=
"width:185px;"
@
blur=
"CheckExistsStu(1)"
ref=
"StuTel"
:disable=
"noEdit"
dense
>
</q-input>
</q-input>
</div>
</div>
</div>
</div>
...
@@ -160,16 +130,8 @@
...
@@ -160,16 +130,8 @@
QQ
QQ
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-input
<q-input
filled
v-model=
"customObj.QQ"
style=
"width:185px;"
@
blur=
"CheckExistsStu(2)"
:disable=
"noEdit"
filled
@
keyup
.
native=
"checkInteger(customObj, 'QQ')"
ref=
"QQ"
dense
></q-input>
v-model=
"customObj.QQ"
style=
"width:185px;"
@
blur=
"CheckExistsStu(2)"
:disable=
"noEdit"
@
keyup
.
native=
"checkInteger(customObj, 'QQ')"
ref=
"QQ"
dense
></q-input>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -179,15 +141,8 @@
...
@@ -179,15 +141,8 @@
微信号
微信号
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-input
<q-input
filled
v-model=
"customObj.WeChatNo"
@
blur=
"CheckExistsStu(3)"
style=
"width:185px;"
ref=
"WeChatNo"
filled
:disable=
"noEdit"
dense
></q-input>
v-model=
"customObj.WeChatNo"
@
blur=
"CheckExistsStu(3)"
style=
"width:185px;"
ref=
"WeChatNo"
:disable=
"noEdit"
dense
></q-input>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -197,19 +152,8 @@
...
@@ -197,19 +152,8 @@
<span
class=
"student_require"
>
*
</span>
客户状态
<span
class=
"student_require"
>
*
</span>
客户状态
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-select
<q-select
filled
v-model=
"customObj.StuStage"
dense
:options=
"customState"
option-label=
"Name"
filled
:disable=
"noEdit"
style=
"width:185px;"
option-value=
"Id"
emit-value
map-options
label=
"客户状态"
/>
v-model=
"customObj.StuStage"
dense
:options=
"customState"
option-label=
"Name"
:disable=
"noEdit"
style=
"width:185px;"
option-value=
"Id"
emit-value
map-options
label=
"客户状态"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -220,21 +164,9 @@
...
@@ -220,21 +164,9 @@
<span
class=
"student_require"
>
*
</span>
客户来源
<span
class=
"student_require"
>
*
</span>
客户来源
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-select
<q-select
filled
v-model=
"customObj.CreateType"
@
change=
"clearStuMsg()"
style=
"width:185px;"
filled
:disable=
"noEdit || isHaveOrder"
@
input=
"resetStuSource()"
dense
:options=
"customFromList"
v-model=
"customObj.CreateType"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"客户来源"
/>
@
change=
"clearStuMsg()"
style=
"width:185px;"
:disable=
"noEdit || isHaveOrder"
@
input=
"resetStuSource()"
dense
:options=
"customFromList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"客户来源"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -244,20 +176,9 @@
...
@@ -244,20 +176,9 @@
<span
class=
"student_require"
>
*
</span>
介绍人
<span
class=
"student_require"
>
*
</span>
介绍人
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-select
<q-select
filled
v-model=
"customObj.StuSourceId"
style=
"width:185px;"
dense
@
filter=
"filterEmployee"
filled
:disable=
"noEdit || isHaveOrder"
use-input
:options=
"myEmployeeList"
option-label=
"EmployeeName"
v-model=
"customObj.StuSourceId"
option-value=
"Id"
emit-value
map-options
/>
style=
"width:185px;"
dense
@
filter=
"filterEmployee"
:disable=
"noEdit || isHaveOrder"
use-input
:options=
"myEmployeeList"
option-label=
"EmployeeName"
option-value=
"Id"
emit-value
map-options
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -267,20 +188,9 @@
...
@@ -267,20 +188,9 @@
<span
class=
"student_require"
>
*
</span>
转介人
<span
class=
"student_require"
>
*
</span>
转介人
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-select
<q-select
filled
v-model=
"customObj.StuSourceId"
style=
"width:185px;"
use-input
@
filter=
"filterStudent"
filled
:disable=
"noEdit || isHaveOrder"
dense
:options=
"MyTransListData"
option-label=
"StuName"
v-model=
"customObj.StuSourceId"
option-value=
"StuId"
emit-value
map-options
/>
style=
"width:185px;"
use-input
@
filter=
"filterStudent"
:disable=
"noEdit || isHaveOrder"
dense
:options=
"MyTransListData"
option-label=
"StuName"
option-value=
"StuId"
emit-value
map-options
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -290,20 +200,9 @@
...
@@ -290,20 +200,9 @@
<span
class=
"student_require"
>
*
</span>
收客渠道
<span
class=
"student_require"
>
*
</span>
收客渠道
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-select
<q-select
filled
v-model=
"customObj.StuChannel"
style=
"width:185px;"
dense
:options=
"StuChannelList"
filled
:disable=
"noEdit || isHaveOrder"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
use-input
v-model=
"customObj.StuChannel"
@
filter=
"filterStuChannel"
>
style=
"width:185px;"
dense
:options=
"StuChannelList"
:disable=
"noEdit || isHaveOrder"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
use-input
@
filter=
"filterStuChannel"
>
<template
v-slot:no-option
>
<template
v-slot:no-option
>
<q-item>
<q-item>
<q-item-section
class=
"text-grey"
>
<q-item-section
class=
"text-grey"
>
...
@@ -321,20 +220,9 @@
...
@@ -321,20 +220,9 @@
<span
class=
"student_require"
>
*
</span>
关联同行
<span
class=
"student_require"
>
*
</span>
关联同行
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-select
<q-select
filled
v-model=
"customObj.CustomerId"
style=
"width:185px"
dense
:options=
"customList"
use-input
filled
:disable=
"noEdit || isHaveOrder"
@
filter=
"filterFn"
option-label=
"CustomerName"
v-model=
"customObj.CustomerId"
option-value=
"CustomerId"
emit-value
map-options
>
style=
"width:185px"
dense
:options=
"customList"
use-input
:disable=
"noEdit || isHaveOrder"
@
filter=
"filterFn"
option-label=
"CustomerName"
option-value=
"CustomerId"
emit-value
map-options
>
<
template
v-slot:no-option
>
<
template
v-slot:no-option
>
<q-item>
<q-item>
<q-item-section
class=
"text-grey"
>
<q-item-section
class=
"text-grey"
>
...
@@ -350,23 +238,13 @@
...
@@ -350,23 +238,13 @@
<div
class=
"info_item"
v-if=
"customObj.StuChannel == 17"
>
<div
class=
"info_item"
v-if=
"customObj.StuChannel == 17"
>
<div
class=
"item_label"
>
第三方平台名称
</div>
<div
class=
"item_label"
>
第三方平台名称
</div>
<div
class=
"item_value"
>
<div
class=
"item_value"
>
<q-input
<q-input
filled
v-model=
"customObj.PlatformName"
dense
:disable=
"noEdit"
></q-input>
filled
v-model=
"customObj.PlatformName"
dense
:disable=
"noEdit"
></q-input>
</div>
</div>
</div>
</div>
<div
class=
"info_item"
v-if=
"customObj.StuChannel == 20"
>
<div
class=
"info_item"
v-if=
"customObj.StuChannel == 20"
>
<div
class=
"item_label"
>
其他平台名称
</div>
<div
class=
"item_label"
>
其他平台名称
</div>
<div
class=
"item_value"
>
<div
class=
"item_value"
>
<q-input
<q-input
filled
v-model=
"customObj.PlatformName"
dense
:disable=
"noEdit"
></q-input>
filled
v-model=
"customObj.PlatformName"
dense
:disable=
"noEdit"
></q-input>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -377,19 +255,8 @@
...
@@ -377,19 +255,8 @@
<span
class=
"student_require"
>
*
</span>
客户类型
<span
class=
"student_require"
>
*
</span>
客户类型
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-select
<q-select
filled
v-model=
"customObj.StuType"
style=
"width:185px"
dense
:options=
"customTypeList"
filled
:disable=
"noEdit"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"客户类型"
/>
v-model=
"customObj.StuType"
style=
"width:185px"
dense
:options=
"customTypeList"
:disable=
"noEdit"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"客户类型"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -399,19 +266,8 @@
...
@@ -399,19 +266,8 @@
客户需求
客户需求
</div>
</div>
<div
class=
"stage_value"
>
<div
class=
"stage_value"
>
<q-select
<q-select
filled
v-model=
"customObj.StuNeeds"
style=
"width:185px"
dense
:options=
"NeedData"
filled
:disable=
"noEdit"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"客户需求"
/>
v-model=
"customObj.StuNeeds"
style=
"width:185px"
dense
:options=
"NeedData"
:disable=
"noEdit"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"客户需求"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -421,18 +277,8 @@
...
@@ -421,18 +277,8 @@
<div
class=
"info_item"
>
<div
class=
"info_item"
>
<div
class=
"item_label"
>
性别
</div>
<div
class=
"item_label"
>
性别
</div>
<div
class=
"item_value"
>
<div
class=
"item_value"
>
<q-radio
<q-radio
v-model=
"customObj.StuSex"
:val=
"0"
label=
"男"
:disable=
"noEdit"
/>
v-model=
"customObj.StuSex"
<q-radio
v-model=
"customObj.StuSex"
:val=
"1"
label=
"女"
:disable=
"noEdit"
/>
:val=
"0"
label=
"男"
:disable=
"noEdit"
/>
<q-radio
v-model=
"customObj.StuSex"
:val=
"1"
label=
"女"
:disable=
"noEdit"
/>
</div>
</div>
</div>
</div>
<div
class=
"info_item studentDate"
>
<div
class=
"info_item studentDate"
>
...
@@ -440,14 +286,8 @@
...
@@ -440,14 +286,8 @@
<div
class=
"item_value"
>
<div
class=
"item_value"
>
<q-field
filled
dense
>
<q-field
filled
dense
>
<
template
v-slot:control
>
<
template
v-slot:control
>
<el-date-picker
<el-date-picker
v-model=
"customObj.StuBirth"
size=
"mini"
style=
"width:150px"
type=
"date"
v-model=
"customObj.StuBirth"
:disabled=
"noEdit"
placeholder=
"选择日期"
>
size=
"mini"
style=
"width:150px"
type=
"date"
:disabled=
"noEdit"
placeholder=
"选择日期"
>
</el-date-picker>
</el-date-picker>
</
template
>
</
template
>
</q-field>
</q-field>
...
@@ -457,60 +297,28 @@
...
@@ -457,60 +297,28 @@
<div
class=
"info_item"
>
<div
class=
"info_item"
>
<div
class=
"item_label"
>
日语基础
</div>
<div
class=
"item_label"
>
日语基础
</div>
<div
class=
"item_value"
>
<div
class=
"item_value"
>
<q-select
<q-select
filled
v-model=
"customObj.JapanBaseInfo"
dense
:options=
"basicList"
option-label=
"Name"
filled
:disable=
"noEdit"
option-value=
"Id"
emit-value
map-options
/>
v-model=
"customObj.JapanBaseInfo"
dense
:options=
"basicList"
option-label=
"Name"
:disable=
"noEdit"
option-value=
"Id"
emit-value
map-options
/>
</div>
</div>
</div>
</div>
<div
class=
"info_item"
>
<div
class=
"info_item"
>
<div
class=
"item_label"
>
职业
</div>
<div
class=
"item_label"
>
职业
</div>
<div
class=
"item_value"
>
<div
class=
"item_value"
>
<q-input
<q-input
filled
v-model=
"customObj.StuProfession"
dense
:disable=
"noEdit"
></q-input>
filled
v-model=
"customObj.StuProfession"
dense
:disable=
"noEdit"
></q-input>
</div>
</div>
</div>
</div>
<div
class=
"info_item"
>
<div
class=
"info_item"
>
<div
class=
"item_label"
>
学历
</div>
<div
class=
"item_label"
>
学历
</div>
<div
class=
"item_value"
>
<div
class=
"item_value"
>
<q-select
<q-select
filled
v-model=
"customObj.StuEducation"
dense
:options=
"educationList"
option-label=
"Name"
filled
:disable=
"noEdit"
option-value=
"Id"
emit-value
map-options
/>
v-model=
"customObj.StuEducation"
dense
:options=
"educationList"
option-label=
"Name"
:disable=
"noEdit"
option-value=
"Id"
emit-value
map-options
/>
</div>
</div>
</div>
</div>
<div
class=
"info_item"
>
<div
class=
"info_item"
>
<div
class=
"item_label"
>
学习目的
</div>
<div
class=
"item_label"
>
学习目的
</div>
<div
class=
"item_value"
>
<div
class=
"item_value"
>
<q-select
<q-select
filled
v-model=
"customObj.StuPurpose"
dense
:options=
"goalsList"
option-label=
"Name"
filled
:disable=
"noEdit"
option-value=
"Id"
emit-value
map-options
/>
v-model=
"customObj.StuPurpose"
dense
:options=
"goalsList"
option-label=
"Name"
:disable=
"noEdit"
option-value=
"Id"
emit-value
map-options
/>
</div>
</div>
</div>
</div>
<!-- <div class="info_item">
<!-- <div class="info_item">
...
@@ -521,540 +329,505 @@
...
@@ -521,540 +329,505 @@
</div>
</div>
</div> -->
</div> -->
<div
class=
"info_item"
v-if=
"!noEdit"
>
<div
class=
"info_item"
v-if=
"!noEdit"
>
<q-btn
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"保存"
@
click=
"saveStu()"
/>
color=
"accent"
class=
"q-mr-md"
label=
"保存"
@
click=
"saveStu()"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
getStudentInfo
,
//获取学员客户信息
getStudentInfo
,
//获取学员客户信息
queryStuStageList
,
//获取客户阶段列表
queryStuStageList
,
//获取客户阶段列表
saveStudent
,
//保存学员信息
saveStudent
,
//保存学员信息
GetStudentTypeList
,
GetStudentTypeList
,
getStudentDorpDownList
,
getStudentDorpDownList
,
GetNeedsList
GetNeedsList
}
from
"../../../api/school/index"
;
}
from
"../../../api/school/index"
;
import
{
import
{
getGuestBasicsEnumList
,
getGuestBasicsEnumList
,
getGuestEducationEnumList
,
getGuestEducationEnumList
,
getGuestLearningGoalsEnumList
,
getGuestLearningGoalsEnumList
,
GetStuChannelList
,
GetStuChannelList
,
CreateTypeList
,
CreateTypeList
,
CheckExistsStu
,
CheckExistsStu
,
GetCustomerList
GetCustomerList
}
from
"../../../api/sale/sale"
;
}
from
"../../../api/sale/sale"
;
import
{
queryEmployee
}
from
"../../../api/users/user"
;
import
{
import
{
queryEmployee
queryStuOrderPage
//学员订单分页列表
}
from
"../../../api/users/user"
;
}
from
"../../../api/customerstudent/customerstudent"
;
import
{
import
{
UploadSelfFile
}
from
"../../../api/common/common"
;
queryStuOrderPage
//学员订单分页列表
}
from
"../../../api/customerstudent/customerstudent"
;
import
{
UploadSelfFile
}
from
"../../../api/common/common"
;
export
default
{
export
default
{
meta
:
{
meta
:
{
title
:
"学员管理"
title
:
"学员管理"
},
components
:
{},
props
:
{
stuData
:
{
type
:
Object
,
default
:
null
},
saveObj
:
{
type
:
Object
,
default
:
null
},
},
AddType
:
{
components
:
{},
type
:
Number
,
props
:
{
default
:
null
stuData
:
{
},
type
:
Object
,
BelongType
:
{
default
:
null
type
:
Number
,
default
:
null
}
},
data
()
{
return
{
//客户阶段状态列表
customState
:
[],
customMsg
:
{
StuId
:
0
},
},
//客户对象
saveObj
:
{
customObj
:
{
type
:
Object
,
StuId
:
0
,
default
:
null
StuIcon
:
""
,
//学院头像
StuName
:
""
,
//客户名称
StuTel
:
""
,
//客户电话
CreateType
:
""
,
//客户来源
StuSourceId
:
""
,
//介绍人
StuChannel
:
""
,
//收客渠道
PlatformName
:
""
,
//平台名称
StuSex
:
0
,
//性别
StuBirth
:
""
,
//出生日期
StuStage
:
""
,
//客户阶段状态
JapanBaseInfo
:
""
,
//日语基础
StuProfession
:
""
,
//职业
StuEducation
:
""
,
//学历
StuPurpose
:
""
,
//学习目的
CreateBy
:
""
,
//创建人
CustomerId
:
0
,
//关联同行
QQ
:
""
,
//qq
WeChatNo
:
""
,
//微信号
StuType
:
""
,
//客户类型
StuNeeds
:
0
//客户需求
},
},
//日语基础列表
AddType
:
{
basicList
:
[],
type
:
Number
,
//学历列表
default
:
null
educationList
:
[],
//学习目的列表
goalsList
:
[],
//员工列表
employeeList
:
[],
myEmployeeList
:
[],
StuChannelList
:
[],
//收客渠道
allStuChannelList
:
[],
//所有收客渠道
AssistDropList
:
[],
//协助人员
customFromList
:
[],
//客户来源
customTypeList
:
[],
//客户类型
customList
:
[],
//同行列表
allCustomList
:
[],
//所有同行列表
TransListData
:
[],
//转介人数据
MyTransListData
:
[],
checkMsg
:
{
StuId
:
0
,
StuTel
:
""
,
QQ
:
""
,
WeChatNo
:
""
},
},
NeedData
:
[],
BelongType
:
{
noEdit
:
false
,
type
:
Number
,
isHaveOrder
:
false
default
:
null
};
},
created
()
{
this
.
getStuStageList
();
this
.
getBasicList
();
this
.
queryGuestEducationEnumList
();
this
.
queryGoalsList
();
this
.
getEmployeeList
();
this
.
GetStuChannelList
();
this
.
getCustomFrom
();
this
.
GetCustomerList
();
this
.
getCustomTypeList
();
this
.
getStudentDorpDown
();
this
.
getGetNeedsList
();
this
.
getStuOrderPage
();
if
(
this
.
saveObj
&&
this
.
saveObj
.
StuId
>
0
)
{
this
.
customMsg
.
StuId
=
this
.
saveObj
.
StuId
;
this
.
checkMsg
.
StuId
=
this
.
saveObj
.
StuId
;
if
(
this
.
saveObj
.
noEdit
&&
this
.
saveObj
.
noEdit
==
true
)
{
this
.
noEdit
=
true
;
}
}
}
if
(
this
.
BelongType
==
3
)
{
this
.
noEdit
=
true
;
}
},
watch
:
{
stuData
()
{
this
.
init
();
}
},
methods
:
{
uploadFile
(
files
)
{
UploadSelfFile
(
"studentIcon"
,
files
,
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customObj
.
StuIcon
=
res
.
FileUrl
;
}
});
},
},
//获取客户需求
data
()
{
getGetNeedsList
()
{
return
{
GetNeedsList
().
then
(
res
=>
{
//客户阶段状态列表
if
(
res
.
Code
==
1
)
{
customState
:
[],
this
.
NeedData
=
res
.
Data
;
customMsg
:
{
}
StuId
:
0
});
},
//客户对象
customObj
:
{
StuId
:
0
,
StuIcon
:
""
,
//学院头像
StuName
:
""
,
//客户名称
StuRealMobile
:
""
,
//客户电话
CreateType
:
""
,
//客户来源
StuSourceId
:
""
,
//介绍人
StuChannel
:
""
,
//收客渠道
PlatformName
:
""
,
//平台名称
StuSex
:
0
,
//性别
StuBirth
:
""
,
//出生日期
StuStage
:
""
,
//客户阶段状态
JapanBaseInfo
:
""
,
//日语基础
StuProfession
:
""
,
//职业
StuEducation
:
""
,
//学历
StuPurpose
:
""
,
//学习目的
CreateBy
:
""
,
//创建人
CustomerId
:
0
,
//关联同行
QQ
:
""
,
//qq
WeChatNo
:
""
,
//微信号
StuType
:
""
,
//客户类型
StuNeeds
:
0
,
//客户需求
StuTel
:
""
,
//显示使用
},
//日语基础列表
basicList
:
[],
//学历列表
educationList
:
[],
//学习目的列表
goalsList
:
[],
//员工列表
employeeList
:
[],
myEmployeeList
:
[],
StuChannelList
:
[],
//收客渠道
allStuChannelList
:
[],
//所有收客渠道
AssistDropList
:
[],
//协助人员
customFromList
:
[],
//客户来源
customTypeList
:
[],
//客户类型
customList
:
[],
//同行列表
allCustomList
:
[],
//所有同行列表
TransListData
:
[],
//转介人数据
MyTransListData
:
[],
checkMsg
:
{
StuId
:
0
,
StuRealMobile
:
""
,
QQ
:
""
,
WeChatNo
:
""
},
NeedData
:
[],
noEdit
:
false
,
isHaveOrder
:
false
};
},
},
//保存学员信息
created
()
{
saveStu
()
{
this
.
getStuStageList
();
if
(
this
.
customObj
.
StuName
==
""
)
{
this
.
getBasicList
();
this
.
$q
.
notify
({
this
.
queryGuestEducationEnumList
();
type
:
"negative"
,
this
.
queryGoalsList
();
position
:
"top"
,
this
.
getEmployeeList
();
message
:
`请输入客户名称`
this
.
GetStuChannelList
();
});
this
.
getCustomFrom
();
return
;
this
.
GetCustomerList
();
}
this
.
getCustomTypeList
();
if
(
this
.
getStudentDorpDown
();
this
.
customObj
.
StuTel
==
""
&&
this
.
getGetNeedsList
();
this
.
customObj
.
QQ
==
""
&&
this
.
getStuOrderPage
();
this
.
customObj
.
WeChatNo
==
""
if
(
this
.
saveObj
&&
this
.
saveObj
.
StuId
>
0
)
{
)
{
this
.
customMsg
.
StuId
=
this
.
saveObj
.
StuId
;
this
.
$q
.
notify
({
this
.
checkMsg
.
StuId
=
this
.
saveObj
.
StuId
;
type
:
"negative"
,
if
(
this
.
saveObj
.
noEdit
&&
this
.
saveObj
.
noEdit
==
true
)
{
position
:
"top"
,
this
.
noEdit
=
true
;
message
:
`请输入电话QQ微信至少一个`
}
});
return
;
}
if
(
this
.
customObj
.
CreateType
==
""
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
message
:
`请选择客户来源`
});
return
;
}
if
(
this
.
customObj
.
CreateType
==
1
&&
!
this
.
customObj
.
StuChannel
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
message
:
`请选择收客渠道`
});
return
;
}
if
(
this
.
customObj
.
CreateType
==
2
&&
!
this
.
customObj
.
CustomerId
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
message
:
`请选择关联同行`
});
return
;
}
}
if
(
this
.
customObj
.
CreateType
==
3
&&
!
this
.
customObj
.
StuSourceId
)
{
if
(
this
.
BelongType
==
3
)
{
this
.
$q
.
notify
({
this
.
noEdit
=
true
;
type
:
"negative"
,
position
:
"top"
,
message
:
`请选择介绍人`
});
return
;
}
}
if
(
this
.
customObj
.
CreateType
==
4
&&
!
this
.
customObj
.
StuSourceId
)
{
},
this
.
$q
.
notify
({
watch
:
{
type
:
"negative"
,
stuData
()
{
position
:
"top"
,
this
.
init
();
message
:
`请选择转介人`
});
return
;
}
}
if
(
this
.
customObj
.
StuStage
==
""
)
{
},
this
.
$q
.
notify
({
methods
:
{
type
:
"negative"
,
uploadFile
(
files
)
{
position
:
"top"
,
UploadSelfFile
(
"studentIcon"
,
files
,
res
=>
{
message
:
`请选择客户状态`
if
(
res
.
Code
==
1
)
{
this
.
customObj
.
StuIcon
=
res
.
FileUrl
;
}
});
});
return
;
},
}
//获取客户需求
if
(
this
.
customObj
.
StuType
==
""
)
{
getGetNeedsList
(
)
{
this
.
$q
.
notify
(
{
GetNeedsList
().
then
(
res
=>
{
type
:
"negative"
,
if
(
res
.
Code
==
1
)
{
position
:
"top"
,
this
.
NeedData
=
res
.
Data
;
message
:
`请选择客户类型`
}
});
});
return
;
},
}
//保存学员信息
if
(
this
.
customObj
.
StuTel
!=
""
)
{
saveStu
()
{
var
myreg
=
/^
[
1
][
3-9
][\d]{9}
/
;
if
(
this
.
customObj
.
StuName
==
""
)
{
if
(
!
myreg
.
test
(
this
.
customObj
.
StuTel
))
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
type
:
"negative"
,
type
:
"negative"
,
position
:
"top"
,
position
:
"top"
,
message
:
`请输入
正确的电话号码
`
message
:
`请输入
客户名称
`
});
});
return
;
return
;
}
}
}
if
(
saveStudent
(
this
.
customObj
).
then
(
res
=>
{
this
.
customObj
.
StuRealMobile
==
""
&&
if
(
res
.
Code
==
1
)
{
this
.
customObj
.
QQ
==
""
&&
this
.
customObj
.
WeChatNo
==
""
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
type
:
"negative"
,
color
:
"accent"
,
position
:
"top"
,
timeout
:
2000
,
message
:
`请输入电话QQ微信至少一个`
message
:
"数据保存成功!"
,
position
:
"top"
});
});
this
.
$emit
(
"update"
);
return
;
this
.
$emit
(
"success"
);
this
.
$emit
(
"getrecord"
);
if
(
this
.
AddType
==
1
)
{
this
.
$emit
(
"close"
);
}
}
}
});
if
(
this
.
customObj
.
CreateType
==
""
)
{
},
this
.
$q
.
notify
({
//获取员工列表
type
:
"negative"
,
getEmployeeList
()
{
position
:
"top"
,
queryEmployee
({
message
:
`请选择客户来源`
IsLeave
:
1
});
}).
then
(
res
=>
{
return
;
this
.
employeeList
=
res
.
Data
;
this
.
myEmployeeList
=
res
.
Data
;
});
},
//获取收客渠道
GetStuChannelList
()
{
GetStuChannelList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
StuChannelList
=
res
.
Data
;
this
.
allStuChannelList
=
res
.
Data
;
}
}
});
if
(
this
.
customObj
.
CreateType
==
1
&&
!
this
.
customObj
.
StuChannel
)
{
},
this
.
$q
.
notify
({
//筛选渠道
type
:
"negative"
,
filterStuChannel
(
val
,
update
)
{
position
:
"top"
,
update
(()
=>
{
message
:
`请选择收客渠道`
if
(
val
===
""
)
{
});
this
.
StuChannelList
=
JSON
.
parse
(
return
;
JSON
.
stringify
(
this
.
allStuChannelList
)
);
}
else
{
const
needle
=
val
.
toLowerCase
();
this
.
StuChannelList
=
this
.
allStuChannelList
.
filter
(
v
=>
v
.
Name
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
}
});
if
(
this
.
customObj
.
CreateType
==
2
&&
!
this
.
customObj
.
CustomerId
)
{
},
this
.
$q
.
notify
({
//筛选员工
type
:
"negative"
,
filterEmployee
(
val
,
update
,
abort
)
{
position
:
"top"
,
update
(()
=>
{
message
:
`请选择关联同行`
this
.
myEmployeeList
=
this
.
employeeList
.
filter
(
});
v
=>
v
.
EmployeeName
.
indexOf
(
val
)
>
-
1
return
;
);
});
},
//获取日语基础列表
getBasicList
()
{
getGuestBasicsEnumList
({}).
then
(
res
=>
{
this
.
basicList
=
res
.
Data
;
});
},
//获取客户来源
getCustomFrom
()
{
CreateTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customFromList
=
res
.
Data
;
}
}
});
if
(
this
.
customObj
.
CreateType
==
3
&&
!
this
.
customObj
.
StuSourceId
)
{
},
this
.
$q
.
notify
({
//获取学历列表
type
:
"negative"
,
queryGuestEducationEnumList
()
{
position
:
"top"
,
getGuestEducationEnumList
({}).
then
(
res
=>
{
message
:
`请选择介绍人`
this
.
educationList
=
res
.
Data
;
});
});
return
;
},
//获取学习目的列表
queryGoalsList
()
{
getGuestLearningGoalsEnumList
({}).
then
(
res
=>
{
this
.
goalsList
=
res
.
Data
;
});
},
//获取客户阶段列表
getStuStageList
()
{
queryStuStageList
().
then
(
res
=>
{
this
.
customState
=
res
.
Data
;
});
},
//获取客户下拉数据
GetCustomerList
()
{
let
msg
=
{
QCreateBy
:
0
};
GetCustomerList
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customList
=
res
.
Data
;
this
.
allCustomList
=
res
.
Data
;
}
}
});
if
(
this
.
customObj
.
CreateType
==
4
&&
!
this
.
customObj
.
StuSourceId
)
{
},
this
.
$q
.
notify
({
//筛选客户
type
:
"negative"
,
filterFn
(
val
,
update
)
{
position
:
"top"
,
update
(()
=>
{
message
:
`请选择转介人`
if
(
val
===
""
)
{
});
this
.
customList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allCustomList
));
return
;
}
else
{
const
needle
=
val
.
toLowerCase
();
this
.
customList
=
this
.
allCustomList
.
filter
(
v
=>
v
.
CustomerName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
}
});
if
(
this
.
customObj
.
StuStage
==
""
)
{
},
this
.
$q
.
notify
({
//获取客户类型
type
:
"negative"
,
getCustomTypeList
()
{
position
:
"top"
,
GetStudentTypeList
().
then
(
res
=>
{
message
:
`请选择客户状态`
if
(
res
.
Code
==
1
)
{
});
this
.
customTypeList
=
res
.
Data
;
return
;
}
}
});
if
(
this
.
customObj
.
StuType
==
""
)
{
},
this
.
$q
.
notify
({
//获取转介人下拉
type
:
"negative"
,
getStudentDorpDown
()
{
position
:
"top"
,
getStudentDorpDownList
().
then
(
res
=>
{
message
:
`请选择客户类型`
if
(
res
.
Code
==
1
)
{
});
this
.
TransListData
=
res
.
Data
;
return
;
this
.
MyTransListData
=
res
.
Data
;
}
}
});
if
(
this
.
customObj
.
StuRealMobile
!=
""
)
{
},
var
myreg
=
/^
[
1
][
3-9
][\d]{9}
/
;
//筛选转介人
if
(
!
myreg
.
test
(
this
.
customObj
.
StuRealMobile
))
{
filterStudent
(
val
,
update
,
abort
)
{
this
.
$q
.
notify
({
update
(()
=>
{
type
:
"negative"
,
this
.
MyTransListData
=
this
.
TransListData
.
filter
(
position
:
"top"
,
v
=>
v
.
StuName
.
indexOf
(
val
)
>
-
1
message
:
`请输入正确的电话号码`
);
});
});
return
;
},
}
// queryStuInfo() {
// getStudentInfo({
// StuId: this.customMsg.StuId
// }).then(res => {
// if (res.Code == 1) {
// 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;
// this.customObj.CustomerId = tempDate.CustomerId;
// this.customObj.StuType = tempDate.StuType;
// this.customObj.QQ = tempDate.QQ;
// this.customObj.WeChatNo = tempDate.WeChatNo;
// this.customObj.StuNeeds = tempDate.StuNeeds;
// }
// });
// },
init
()
{
const
tempDate
=
this
.
stuData
;
this
.
customObj
.
StuId
=
tempDate
.
StuId
;
this
.
customObj
.
StuName
=
tempDate
.
StuName
;
this
.
customObj
.
StuIcon
=
tempDate
.
StuIcon
;
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
;
this
.
customObj
.
CustomerId
=
tempDate
.
CustomerId
;
this
.
customObj
.
StuType
=
tempDate
.
StuType
;
this
.
customObj
.
QQ
=
tempDate
.
QQ
;
this
.
customObj
.
WeChatNo
=
tempDate
.
WeChatNo
;
this
.
customObj
.
StuNeeds
=
tempDate
.
StuNeeds
;
if
(
this
.
customObj
.
StuId
>
0
)
{
this
.
isHaveOrder
=
true
;
}
if
(
this
.
BelongType
==
3
)
{
this
.
customObj
.
formatTel
=
this
.
customObj
.
StuTel
!=
""
?
this
.
customObj
.
StuTel
.
substring
(
0
,
2
)
+
"*****"
+
this
.
customObj
.
StuTel
.
substring
(
8
,
10
)
:
""
;
}
else
{
// this.customObj.formatTel = this.customObj.StuTel;
}
},
//新增协助人员
addAssist
()
{
let
obj
=
{
Id
:
0
,
//编号
AssistId
:
1
,
//员工编号
AssistType
:
1
,
//类型
StuId
:
1
//学员编号
};
this
.
customObj
.
AssistList
.
push
(
obj
);
},
//删除协助人员
delAssist
(
index
)
{
this
.
customObj
.
AssistList
.
splice
(
index
,
1
);
},
//验证手机号
CheckExistsStu
(
type
)
{
if
(
type
==
1
)
{
if
(
this
.
customObj
.
StuTel
&&
this
.
customObj
.
StuTel
.
length
==
11
)
{
this
.
checkMsg
.
StuTel
=
this
.
customObj
.
StuTel
;
this
.
checkMsg
.
QQ
=
""
;
this
.
checkMsg
.
WeChatNo
=
""
;
CheckExistsStu
(
this
.
checkMsg
).
then
(
r
=>
{});
}
}
}
saveStudent
(
this
.
customObj
).
then
(
res
=>
{
if
(
type
==
2
)
{
if
(
res
.
Code
==
1
)
{
if
(
this
.
customObj
.
QQ
)
{
this
.
$q
.
notify
({
this
.
checkMsg
.
StuTel
=
""
;
icon
:
"iconfont icon-chenggong"
,
this
.
checkMsg
.
QQ
=
this
.
customObj
.
QQ
;
color
:
"accent"
,
this
.
checkMsg
.
WeChatNo
=
""
;
timeout
:
2000
,
CheckExistsStu
(
this
.
checkMsg
).
then
(
r
=>
{});
message
:
"数据保存成功!"
,
position
:
"top"
});
this
.
$emit
(
"update"
);
this
.
$emit
(
"success"
);
this
.
$emit
(
"getrecord"
);
if
(
this
.
AddType
==
1
)
{
this
.
$emit
(
"close"
);
}
}
});
},
//获取员工列表
getEmployeeList
()
{
queryEmployee
({
IsLeave
:
1
}).
then
(
res
=>
{
this
.
employeeList
=
res
.
Data
;
this
.
myEmployeeList
=
res
.
Data
;
});
},
//获取收客渠道
GetStuChannelList
()
{
GetStuChannelList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
StuChannelList
=
res
.
Data
;
this
.
allStuChannelList
=
res
.
Data
;
}
});
},
//筛选渠道
filterStuChannel
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
""
)
{
this
.
StuChannelList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allStuChannelList
)
);
}
else
{
const
needle
=
val
.
toLowerCase
();
this
.
StuChannelList
=
this
.
allStuChannelList
.
filter
(
v
=>
v
.
Name
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
});
},
//筛选员工
filterEmployee
(
val
,
update
,
abort
)
{
update
(()
=>
{
this
.
myEmployeeList
=
this
.
employeeList
.
filter
(
v
=>
v
.
EmployeeName
.
indexOf
(
val
)
>
-
1
);
});
},
//获取日语基础列表
getBasicList
()
{
getGuestBasicsEnumList
({}).
then
(
res
=>
{
this
.
basicList
=
res
.
Data
;
});
},
//获取客户来源
getCustomFrom
()
{
CreateTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customFromList
=
res
.
Data
;
}
});
},
//获取学历列表
queryGuestEducationEnumList
()
{
getGuestEducationEnumList
({}).
then
(
res
=>
{
this
.
educationList
=
res
.
Data
;
});
},
//获取学习目的列表
queryGoalsList
()
{
getGuestLearningGoalsEnumList
({}).
then
(
res
=>
{
this
.
goalsList
=
res
.
Data
;
});
},
//获取客户阶段列表
getStuStageList
()
{
queryStuStageList
().
then
(
res
=>
{
this
.
customState
=
res
.
Data
;
});
},
//获取客户下拉数据
GetCustomerList
()
{
let
msg
=
{
QCreateBy
:
0
};
GetCustomerList
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customList
=
res
.
Data
;
this
.
allCustomList
=
res
.
Data
;
}
});
},
//筛选客户
filterFn
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
""
)
{
this
.
customList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allCustomList
));
}
else
{
const
needle
=
val
.
toLowerCase
();
this
.
customList
=
this
.
allCustomList
.
filter
(
v
=>
v
.
CustomerName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
});
},
//获取客户类型
getCustomTypeList
()
{
GetStudentTypeList
().
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customTypeList
=
res
.
Data
;
}
});
},
//获取转介人下拉
getStudentDorpDown
()
{
getStudentDorpDownList
().
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TransListData
=
res
.
Data
;
this
.
MyTransListData
=
res
.
Data
;
}
});
},
//筛选转介人
filterStudent
(
val
,
update
,
abort
)
{
update
(()
=>
{
this
.
MyTransListData
=
this
.
TransListData
.
filter
(
v
=>
v
.
StuName
.
indexOf
(
val
)
>
-
1
);
});
},
init
()
{
const
tempDate
=
this
.
stuData
;
this
.
customObj
.
StuId
=
tempDate
.
StuId
;
this
.
customObj
.
StuName
=
tempDate
.
StuName
;
this
.
customObj
.
StuIcon
=
tempDate
.
StuIcon
;
this
.
customObj
.
StuRealMobile
=
tempDate
.
StuRealMobile
;
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
;
this
.
customObj
.
CustomerId
=
tempDate
.
CustomerId
;
this
.
customObj
.
StuType
=
tempDate
.
StuType
;
this
.
customObj
.
QQ
=
tempDate
.
QQ
;
this
.
customObj
.
WeChatNo
=
tempDate
.
WeChatNo
;
this
.
customObj
.
StuNeeds
=
tempDate
.
StuNeeds
;
this
.
customObj
.
StuTel
=
tempDate
.
StuTel
;
if
(
this
.
customObj
.
StuId
>
0
)
{
this
.
isHaveOrder
=
true
;
}
}
}
if
(
type
==
3
)
{
},
if
(
this
.
customObj
.
WeChatNo
)
{
//新增协助人员
this
.
checkMsg
.
StuTel
=
""
;
addAssist
()
{
this
.
checkMsg
.
QQ
=
""
;
let
obj
=
{
this
.
checkMsg
.
WeChatNo
=
this
.
customObj
.
WeChatNo
;
Id
:
0
,
//编号
CheckExistsStu
(
this
.
checkMsg
).
then
(
r
=>
{});
AssistId
:
1
,
//员工编号
AssistType
:
1
,
//类型
StuId
:
1
//学员编号
};
this
.
customObj
.
AssistList
.
push
(
obj
);
},
//删除协助人员
delAssist
(
index
)
{
this
.
customObj
.
AssistList
.
splice
(
index
,
1
);
},
//验证手机号
CheckExistsStu
(
type
)
{
if
(
type
==
1
)
{
if
(
this
.
customObj
.
StuRealMobile
&&
this
.
customObj
.
StuRealMobile
.
length
==
11
)
{
this
.
checkMsg
.
StuRealMobile
=
this
.
customObj
.
StuRealMobile
;
this
.
checkMsg
.
QQ
=
""
;
this
.
checkMsg
.
WeChatNo
=
""
;
CheckExistsStu
(
this
.
checkMsg
).
then
(
r
=>
{});
}
}
}
}
if
(
type
==
2
)
{
},
if
(
this
.
customObj
.
QQ
)
{
//切换客户来源重置
this
.
checkMsg
.
StuRealMobile
=
""
;
resetStuSource
()
{
this
.
checkMsg
.
QQ
=
this
.
customObj
.
QQ
;
this
.
customObj
.
StuChannel
=
""
;
this
.
checkMsg
.
WeChatNo
=
""
;
this
.
customObj
.
CustomerId
=
""
;
CheckExistsStu
(
this
.
checkMsg
).
then
(
r
=>
{});
this
.
customObj
.
StuSourceId
=
""
;
}
this
.
customObj
.
PlatformName
=
""
;
}
},
if
(
type
==
3
)
{
getStuOrderPage
()
{
if
(
this
.
customObj
.
WeChatNo
)
{
let
customMsg
=
{
this
.
checkMsg
.
StuRealMobile
=
""
;
pageIndex
:
1
,
this
.
checkMsg
.
QQ
=
""
;
pageSize
:
10
,
this
.
checkMsg
.
WeChatNo
=
this
.
customObj
.
WeChatNo
;
StuId
:
0
CheckExistsStu
(
this
.
checkMsg
).
then
(
r
=>
{});
};
if
(
this
.
saveObj
)
{
customMsg
.
StuId
=
this
.
saveObj
.
StuId
;
}
queryStuOrderPage
(
customMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
this
.
customObj
.
StuId
>
0
)
{
if
(
res
.
Data
.
PageData
.
length
>
0
)
{
this
.
isHaveOrder
=
true
;
}
else
{
this
.
isHaveOrder
=
false
;
}
}
}
}
}
});
},
//切换客户来源重置
resetStuSource
()
{
this
.
customObj
.
StuChannel
=
""
;
this
.
customObj
.
CustomerId
=
""
;
this
.
customObj
.
StuSourceId
=
""
;
this
.
customObj
.
PlatformName
=
""
;
},
getStuOrderPage
()
{
let
customMsg
=
{
pageIndex
:
1
,
pageSize
:
10
,
StuId
:
0
};
if
(
this
.
saveObj
)
{
customMsg
.
StuId
=
this
.
saveObj
.
StuId
;
}
queryStuOrderPage
(
customMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
this
.
customObj
.
StuId
>
0
)
{
if
(
res
.
Data
.
PageData
.
length
>
0
)
{
this
.
isHaveOrder
=
true
;
}
else
{
this
.
isHaveOrder
=
false
;
}
}
}
});
}
}
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
::v-deep
.el-input__inner
{
::v-deep
.el-input__inner
{
background
:
transparent
;
background
:
transparent
;
border
:
none
;
border
:
none
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/components/school/student/studentAddForm.vue
View file @
bb245a36
...
@@ -4,515 +4,345 @@
...
@@ -4,515 +4,345 @@
<div
class=
"text-h6"
>
添加客户
</div>
<div
class=
"text-h6"
>
添加客户
</div>
<div
style=
"font-size:12px;"
class=
"text-grey-6 q-my-md"
>
必填资料
</div>
<div
style=
"font-size:12px;"
class=
"text-grey-6 q-my-md"
>
必填资料
</div>
<div
class=
"row q-col-gutter-md"
>
<div
class=
"row q-col-gutter-md"
>
<q-input
<q-input
class=
"col-6"
filled
v-model=
"customObj.StuName"
dense
label=
"客户名称"
></q-input>
class=
"col-6"
<q-input
class=
"col-6"
filled
v-model=
"customObj.StuRealMobile"
dense
full-mask
mask=
"###########"
label=
"客户电话"
filled
@
blur=
"checkStuTel(1)"
></q-input>
v-model=
"customObj.StuName"
dense
label=
"客户名称"
></q-input>
<q-input
class=
"col-6"
filled
v-model=
"customObj.StuTel"
dense
full-mask
mask=
"###########"
label=
"客户电话"
@
blur=
"checkStuTel(1)"
></q-input>
</div>
</div>
<div
class=
"q-mt-xs row q-col-gutter-md"
>
<div
class=
"q-mt-xs row q-col-gutter-md"
>
<q-input
<q-input
class=
"col-6"
filled
v-model=
"customObj.QQ"
dense
full-mask
mask=
"###########"
label=
"客户QQ"
class=
"col-6"
@
blur=
"checkStuTel(2)"
></q-input>
filled
<q-input
class=
"col-6"
filled
v-model=
"customObj.WeChatNo"
dense
full-mask
label=
"客户微信号"
@
blur=
"checkStuTel(3)"
>
v-model=
"customObj.QQ"
</q-input>
dense
full-mask
mask=
"###########"
label=
"客户QQ"
@
blur=
"checkStuTel(2)"
></q-input>
<q-input
class=
"col-6"
filled
v-model=
"customObj.WeChatNo"
dense
full-mask
label=
"客户微信号"
@
blur=
"checkStuTel(3)"
></q-input>
</div>
</div>
<div
class=
"q-mt-xs row q-col-gutter-md"
>
<div
class=
"q-mt-xs row q-col-gutter-md"
>
<q-select
<q-select
filled
v-model=
"customObj.CreateType"
dense
:options=
"customFromList"
option-label=
"Name"
filled
option-value=
"Id"
emit-value
map-options
label=
"客户来源"
behavior=
"menu"
class=
"col-6"
/>
v-model=
"customObj.CreateType"
<q-select
filled
v-model=
"customObj.StuChannel"
v-if=
"customObj.CreateType==1"
label=
"获客渠道"
dense
dense
:options=
"StuChannelList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
class=
"col-6"
:options=
"customFromList"
behavior=
"menu"
/>
option-label=
"Name"
<q-select
filled
v-model=
"customObj.CustomerId"
v-if=
"customObj.CreateType==2"
label=
"关联同行"
dense
option-value=
"Id"
:options=
"customList"
option-label=
"CustomerName"
option-value=
"CustomerId"
emit-value
map-options
emit-value
class=
"col-6"
behavior=
"menu"
/>
map-options
<q-select
v-if=
"customObj.CreateType == 3"
filled
v-model=
"customObj.StuSourceId"
dense
@
filter=
"filterEmployee"
label=
"客户来源"
use-input
:options=
"myEmployeeList"
option-label=
"EmployeeName"
option-value=
"Id"
emit-value
map-options
behavior=
"menu"
label=
"关联员工"
behavior=
"menu"
class=
"col-6"
/>
class=
"col-6"
<q-select
v-if=
"customObj.CreateType == 4"
filled
v-model=
"customObj.StuSourceId"
dense
:options=
"customList"
/>
option-label=
"CustomerName"
option-value=
"CustomerId"
emit-value
map-options
label=
"转介人"
behavior=
"menu"
<q-select
class=
"col-6"
/>
filled
v-model=
"customObj.StuChannel"
v-if=
"customObj.CreateType==1"
label=
"获客渠道"
dense
:options=
"StuChannelList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
class=
"col-6"
behavior=
"menu"
/>
<q-select
filled
v-model=
"customObj.CustomerId"
v-if=
"customObj.CreateType==2"
label=
"关联同行"
dense
:options=
"customList"
option-label=
"CustomerName"
option-value=
"CustomerId"
emit-value
map-options
class=
"col-6"
behavior=
"menu"
/>
<q-select
v-if=
"customObj.CreateType == 3"
filled
v-model=
"customObj.StuSourceId"
dense
@
filter=
"filterEmployee"
use-input
:options=
"myEmployeeList"
option-label=
"EmployeeName"
option-value=
"Id"
emit-value
map-options
label=
"关联员工"
behavior=
"menu"
class=
"col-6"
/>
<q-select
v-if=
"customObj.CreateType == 4"
filled
v-model=
"customObj.StuSourceId"
dense
:options=
"customList"
option-label=
"CustomerName"
option-value=
"CustomerId"
emit-value
map-options
label=
"转介人"
behavior=
"menu"
class=
"col-6"
/>
</div>
</div>
<div
class=
"q-mt-xs row q-col-gutter-md"
>
<div
class=
"q-mt-xs row q-col-gutter-md"
>
<q-select
<q-select
filled
v-model=
"customObj.StuType"
dense
:options=
"customTypeList"
option-label=
"Name"
filled
option-value=
"Id"
emit-value
map-options
label=
"客户类型"
behavior=
"menu"
class=
"col-6"
/>
v-model=
"customObj.StuType"
dense
:options=
"customTypeList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"客户类型"
behavior=
"menu"
class=
"col-6"
/>
</div>
</div>
<div
class=
"q-mt-xs row q-col-gutter-md"
>
<div
class=
"q-mt-xs row q-col-gutter-md"
>
<q-input
<q-input
filled
v-model=
"customObj.PlatformName"
:label=
"customObj.StuChannel == 6 ? '平台名称' : '其他渠道名称'"
dense
filled
class=
"col-6"
v-if=
"customObj.CreateType==1&&(customObj.StuChannel == 6 || customObj.StuChannel == 7)"
>
v-model=
"customObj.PlatformName"
</q-input>
:label=
"customObj.StuChannel == 6 ? '平台名称' : '其他渠道名称'"
dense
class=
"col-6"
v-if=
"customObj.CreateType==1&&(customObj.StuChannel == 6 || customObj.StuChannel == 7)"
></q-input>
</div>
</div>
<div
style=
"font-size:12px;"
class=
"text-grey-6 q-my-md"
>
补充资料
</div>
<div
style=
"font-size:12px;"
class=
"text-grey-6 q-my-md"
>
补充资料
</div>
<div
class=
"row q-col-gutter-md"
>
<div
class=
"row q-col-gutter-md"
>
<q-field
filled
label=
"性别"
stack-label
class=
"col-6"
dense
>
<q-field
filled
label=
"性别"
stack-label
class=
"col-6"
dense
>
<template
v-slot:control
>
<template
v-slot:control
>
<el-radio
<el-radio
v-model=
"customObj.StuSex"
:val=
"0"
label=
"男"
class=
"q-mr-md"
></el-radio>
v-model=
"customObj.StuSex"
:val=
"0"
label=
"男"
class=
"q-mr-md"
></el-radio>
<el-radio
v-model=
"customObj.StuSex"
:val=
"1"
label=
"女"
></el-radio>
<el-radio
v-model=
"customObj.StuSex"
:val=
"1"
label=
"女"
></el-radio>
</
template
>
</
template
>
</q-field>
</q-field>
<q-field
<q-field
filled
label=
"出生日期"
stack-label
class=
"col-6 cursor-pointer"
dense
>
filled
label=
"出生日期"
stack-label
class=
"col-6 cursor-pointer"
dense
>
<
template
v-slot:append
>
<
template
v-slot:append
>
<q-icon
name=
"event"
></q-icon>
<q-icon
name=
"event"
></q-icon>
</
template
>
</
template
>
<
template
v-slot:control
>
<
template
v-slot:control
>
<span>
{{
customObj
.
StuBirth
}}
</span>
<span>
{{
customObj
.
StuBirth
}}
</span>
<q-popup-proxy
<q-popup-proxy
ref=
"qDateProxy1"
transition-show=
"scale"
transition-hide=
"scale"
>
ref=
"qDateProxy1"
<q-date
v-model=
"customObj.StuBirth"
minimal
@
input=
"() => $refs.qDateProxy1.hide()"
/>
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"customObj.StuBirth"
minimal
@
input=
"() => $refs.qDateProxy1.hide()"
/>
</q-popup-proxy>
</q-popup-proxy>
</
template
>
</
template
>
</q-field>
</q-field>
<q-select
<q-select
filled
v-model=
"customObj.StuStage"
dense
:options=
"customState"
option-label=
"Name"
option-value=
"Id"
filled
emit-value
map-options
class=
"col-6"
label=
"客户阶段"
behavior=
"menu"
/>
v-model=
"customObj.StuStage"
<q-select
filled
v-model=
"customObj.JapanBaseInfo"
dense
:options=
"basicList"
option-label=
"Name"
dense
option-value=
"Id"
class=
"col-6"
label=
"日语基础"
emit-value
map-options
behavior=
"menu"
/>
:options=
"customState"
<q-input
filled
v-model=
"customObj.StuProfession"
dense
class=
"col-6"
label=
"职业"
></q-input>
option-label=
"Name"
<q-select
filled
v-model=
"customObj.StuEducation"
dense
:options=
"educationList"
option-label=
"Name"
option-value=
"Id"
option-value=
"Id"
emit-value
map-options
class=
"col-6"
label=
"最高学历"
behavior=
"menu"
/>
emit-value
<q-select
filled
v-model=
"customObj.StuPurpose"
dense
:options=
"goalsList"
option-label=
"Name"
option-value=
"Id"
map-options
emit-value
map-options
class=
"col-6"
label=
"学习目的"
behavior=
"menu"
/>
class=
"col-6"
label=
"客户阶段"
behavior=
"menu"
/>
<q-select
filled
v-model=
"customObj.JapanBaseInfo"
dense
:options=
"basicList"
option-label=
"Name"
option-value=
"Id"
class=
"col-6"
label=
"日语基础"
emit-value
map-options
behavior=
"menu"
/>
<q-input
filled
v-model=
"customObj.StuProfession"
dense
class=
"col-6"
label=
"职业"
></q-input>
<q-select
filled
v-model=
"customObj.StuEducation"
dense
:options=
"educationList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
class=
"col-6"
label=
"最高学历"
behavior=
"menu"
/>
<q-select
filled
v-model=
"customObj.StuPurpose"
dense
:options=
"goalsList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
class=
"col-6"
label=
"学习目的"
behavior=
"menu"
/>
</div>
</div>
<q-separator
class=
"q-my-md"
/>
<q-separator
class=
"q-my-md"
/>
<div
class=
"text-right q-py-xs"
>
<div
class=
"text-right q-py-xs"
>
<q-btn
<q-btn
flat
color=
"dark"
@
click=
"closeForm"
class=
"q-mr-md q-px-xs"
label=
"取消"
></q-btn>
flat
<q-btn
unelevated
color=
"primary"
class=
"q-px-md"
label=
"保存"
@
click=
"saveStu"
></q-btn>
color=
"dark"
@
click=
"closeForm"
class=
"q-mr-md q-px-xs"
label=
"取消"
></q-btn>
<q-btn
unelevated
color=
"primary"
class=
"q-px-md"
label=
"保存"
@
click=
"saveStu"
></q-btn>
</div>
</div>
</q-card>
</q-card>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
getStudentInfo
,
//获取学员客户信息
getStudentInfo
,
//获取学员客户信息
queryStuStageList
,
//获取客户阶段列表
queryStuStageList
,
//获取客户阶段列表
saveStudent
,
//保存学员信息
saveStudent
,
//保存学员信息
GetStudentTypeList
GetStudentTypeList
}
from
"../../../api/school/index"
;
}
from
"../../../api/school/index"
;
import
{
import
{
getGuestBasicsEnumList
,
getGuestBasicsEnumList
,
getGuestEducationEnumList
,
getGuestEducationEnumList
,
getGuestLearningGoalsEnumList
,
getGuestLearningGoalsEnumList
,
GetStuChannelList
,
GetStuChannelList
,
CreateTypeList
,
CreateTypeList
,
GetCustomerList
GetCustomerList
}
from
"../../../api/sale/sale"
;
}
from
"../../../api/sale/sale"
;
import
{
queryEmployee
,
queryStudentByTel
}
from
"../../../api/users/user"
;
import
{
export
default
{
queryEmployee
,
meta
:
{
queryStudentByTel
title
:
"学员管理"
}
from
"../../../api/users/user"
;
},
export
default
{
components
:
{},
meta
:
{
props
:
{
title
:
"学员管理"
saveObj
:
{
},
type
:
Object
,
components
:
{},
default
:
null
props
:
{
}
saveObj
:
{
},
type
:
Object
,
data
()
{
default
:
null
return
{
}
//客户阶段状态列表
},
customState
:
[],
data
()
{
customMsg
:
{
return
{
StuId
:
0
//客户阶段状态列表
},
customState
:
[],
//客户对象
customMsg
:
{
customObj
:
{
StuId
:
0
AssistList
:
[
},
{
//客户对象
customObj
:
{
AssistList
:
[{
Id
:
0
,
//编号
Id
:
0
,
//编号
AssistId
:
1
,
//员工编号
AssistId
:
1
,
//员工编号
AssistType
:
1
,
//类型
AssistType
:
1
,
//类型
StuId
:
1
//学员编号
StuId
:
1
//学员编号
}
}],
],
StuSex
:
1
StuSex
:
1
},
},
//日语基础列表
//日语基础列表
basicList
:
[],
basicList
:
[],
//学历列表
//学历列表
educationList
:
[],
educationList
:
[],
//学习目的列表
//学习目的列表
goalsList
:
[],
goalsList
:
[],
//员工列表
//员工列表
employeeList
:
[],
employeeList
:
[],
myEmployeeList
:
[],
myEmployeeList
:
[],
customFromList
:
[],
customFromList
:
[],
StuChannelList
:
[],
//收客渠道
StuChannelList
:
[],
//收客渠道
AssistDropList
:
[],
//协助人员
AssistDropList
:
[],
//协助人员
customList
:
[],
customList
:[],
customTypeList
:
[]
//客户类型
customTypeList
:[]
//客户类型
};
};
},
created
()
{
this
.
getStuStageList
();
this
.
getBasicList
();
this
.
queryGuestEducationEnumList
();
this
.
queryGoalsList
();
this
.
getEmployeeList
();
this
.
GetStuChannelList
();
this
.
getCustomFrom
();
this
.
GetCustomerList
();
this
.
getCustomTypeList
();
if
(
this
.
saveObj
&&
this
.
saveObj
.
StuId
>
0
)
{
this
.
customMsg
.
StuId
=
this
.
saveObj
.
StuId
;
this
.
queryStuInfo
();
}
},
mounted
()
{},
methods
:
{
//获取客户来源
getCustomFrom
()
{
CreateTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customFromList
=
res
.
Data
;
}
});
},
checkStuTel
(
type
)
{
//验证手机
if
(
type
==
1
){
if
(
this
.
customObj
.
StuTel
&&
this
.
customObj
.
StuTel
.
length
==
11
)
{
queryStudentByTel
({
StuTel
:
this
.
customObj
.
StuTel
,
QQ
:
''
,
WeChatNo
:
''
}).
then
(
r
=>
{
if
(
r
.
Data
)
{
this
.
$emit
(
"success"
,
r
.
Data
,
1
);
}
});
}
}
//验证QQ
if
(
type
==
2
){
if
(
this
.
customObj
.
QQ
)
{
queryStudentByTel
({
StuTel
:
''
,
QQ
:
this
.
customObj
.
QQ
,
WeChatNo
:
''
}).
then
(
r
=>
{
if
(
r
.
Data
)
{
this
.
$emit
(
"success"
,
r
.
Data
,
1
);
}
});
}
}
//验证微信
if
(
type
==
3
){
if
(
this
.
customObj
.
WeChatNo
)
{
queryStudentByTel
({
StuTel
:
''
,
QQ
:
''
,
WeChatNo
:
this
.
customObj
.
WeChatNo
}).
then
(
r
=>
{
if
(
r
.
Data
)
{
this
.
$emit
(
"success"
,
r
.
Data
,
1
);
}
});
}
}
},
},
validate
()
{
created
()
{
let
msg
=
""
;
this
.
getStuStageList
();
if
(
!
this
.
customObj
.
StuName
)
{
this
.
getBasicList
();
msg
=
"请输入客户名称"
;
this
.
queryGuestEducationEnumList
();
}
else
if
(
!
this
.
customObj
.
StuTel
&&
!
this
.
customObj
.
QQ
&&
!
this
.
customObj
.
WeChatNo
)
{
this
.
queryGoalsList
();
msg
=
"请至少输入一个手机号QQ号微信号"
;
this
.
getEmployeeList
();
}
else
if
(
!
this
.
customObj
.
CreateType
)
{
this
.
GetStuChannelList
();
msg
=
"请选择客户来源"
;
this
.
getCustomFrom
();
}
else
if
(
!
this
.
customObj
.
StuChannel
)
{
this
.
GetCustomerList
();
msg
=
"请选择客户获客渠道"
;
this
.
getCustomTypeList
();
}
else
if
(
if
(
this
.
saveObj
&&
this
.
saveObj
.
StuId
>
0
)
{
this
.
customObj
.
StuChannel
==
6
||
this
.
customMsg
.
StuId
=
this
.
saveObj
.
StuId
;
this
.
customObj
.
StuChannel
==
7
this
.
queryStuInfo
();
)
{
if
(
!
this
.
customObj
.
PlatformName
)
{
msg
=
"请填写具体渠道信息"
;
}
}
}
return
msg
;
},
},
//保存学员信息
mounted
()
{},
saveStu
()
{
methods
:
{
let
msg
=
this
.
validate
();
//获取客户来源
if
(
msg
)
{
getCustomFrom
(
)
{
this
.
$q
.
notify
(
{
CreateTypeList
({}).
then
(
res
=>
{
type
:
"negative"
,
if
(
res
.
Code
==
1
)
{
position
:
"top"
,
this
.
customFromList
=
res
.
Data
;
message
:
msg
}
});
});
return
;
},
}
checkStuTel
(
type
)
{
saveStudent
(
this
.
customObj
).
then
(
res
=>
{
//验证手机
if
(
res
.
Code
==
1
)
{
if
(
type
==
1
)
{
this
.
$q
.
notify
({
if
(
this
.
customObj
.
StuRealMobile
&&
this
.
customObj
.
StuRealMobile
.
length
==
11
)
{
icon
:
"iconfont icon-chenggong"
,
queryStudentByTel
({
color
:
"accent"
,
StuRealMobile
:
this
.
customObj
.
StuRealMobile
,
timeout
:
2000
,
QQ
:
''
,
message
:
"数据保存成功!"
,
WeChatNo
:
''
position
:
"top"
}).
then
(
r
=>
{
});
if
(
r
.
Data
)
{
this
.
$emit
(
"success"
,
res
.
Data
,
0
);
this
.
$emit
(
"success"
,
r
.
Data
,
1
);
}
});
}
}
}
});
//验证QQ
},
if
(
type
==
2
)
{
closeForm
()
{
if
(
this
.
customObj
.
QQ
)
{
this
.
$emit
(
"close"
);
queryStudentByTel
({
},
StuTel
:
''
,
//获取员工列表
QQ
:
this
.
customObj
.
QQ
,
getEmployeeList
()
{
WeChatNo
:
''
queryEmployee
({
}).
then
(
r
=>
{
IsLeave
:
1
if
(
r
.
Data
)
{
}).
then
(
res
=>
{
this
.
$emit
(
"success"
,
r
.
Data
,
1
);
this
.
employeeList
=
res
.
Data
;
}
this
.
myEmployeeList
=
res
.
Data
;
});
});
}
},
//获取收客渠道
GetStuChannelList
()
{
GetStuChannelList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
StuChannelList
=
res
.
Data
;
}
}
});
//验证微信
},
if
(
type
==
3
)
{
//筛选员工
if
(
this
.
customObj
.
WeChatNo
)
{
filterEmployee
(
val
,
update
,
abort
)
{
queryStudentByTel
({
update
(()
=>
{
StuTel
:
''
,
this
.
myEmployeeList
=
this
.
employeeList
.
filter
(
QQ
:
''
,
v
=>
v
.
EmployeeName
.
indexOf
(
val
)
>
-
1
WeChatNo
:
this
.
customObj
.
WeChatNo
);
}).
then
(
r
=>
{
});
if
(
r
.
Data
)
{
},
this
.
$emit
(
"success"
,
r
.
Data
,
1
);
//获取日语基础列表
}
getBasicList
()
{
});
getGuestBasicsEnumList
({}).
then
(
res
=>
{
}
this
.
basicList
=
res
.
Data
;
});
},
//获取学历列表
queryGuestEducationEnumList
()
{
getGuestEducationEnumList
({}).
then
(
res
=>
{
this
.
educationList
=
res
.
Data
;
});
},
//获取学习目的列表
queryGoalsList
()
{
getGuestLearningGoalsEnumList
({}).
then
(
res
=>
{
this
.
goalsList
=
res
.
Data
;
});
},
//获取客户阶段列表
getStuStageList
()
{
queryStuStageList
().
then
(
res
=>
{
this
.
customState
=
res
.
Data
;
});
},
//获取客户下拉数据
GetCustomerList
()
{
GetCustomerList
().
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customList
=
res
.
Data
;
}
}
})
},
},
validate
()
{
//获取客户类型
let
msg
=
""
;
getCustomTypeList
(){
if
(
!
this
.
customObj
.
StuName
)
{
GetStudentTypeList
().
then
(
res
=>
{
msg
=
"请输入客户名称"
;
if
(
res
.
Code
==
1
)
{
}
else
if
(
!
this
.
customObj
.
StuRealMobile
&&
!
this
.
customObj
.
QQ
&&
!
this
.
customObj
.
WeChatNo
)
{
this
.
customTypeList
=
res
.
Data
;
msg
=
"请至少输入一个手机号QQ号微信号"
;
}
else
if
(
!
this
.
customObj
.
CreateType
)
{
msg
=
"请选择客户来源"
;
}
else
if
(
!
this
.
customObj
.
StuChannel
)
{
msg
=
"请选择客户获客渠道"
;
}
else
if
(
this
.
customObj
.
StuChannel
==
6
||
this
.
customObj
.
StuChannel
==
7
)
{
if
(
!
this
.
customObj
.
PlatformName
)
{
msg
=
"请填写具体渠道信息"
;
}
}
}
})
return
msg
;
},
},
queryStuInfo
()
{
//保存学员信息
getStudentInfo
({
saveStu
()
{
StuId
:
this
.
customMsg
.
StuId
let
msg
=
this
.
validate
();
}).
then
(
res
=>
{
if
(
msg
)
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
this
.
customObj
=
res
.
Data
;
type
:
"negative"
,
position
:
"top"
,
message
:
msg
});
return
;
}
}
});
saveStudent
(
this
.
customObj
).
then
(
res
=>
{
},
if
(
res
.
Code
==
1
)
{
//新增协助人员
this
.
$q
.
notify
({
addAssist
()
{
icon
:
"iconfont icon-chenggong"
,
let
obj
=
{
color
:
"accent"
,
Id
:
0
,
//编号
timeout
:
2000
,
AssistId
:
1
,
//员工编号
message
:
"数据保存成功!"
,
AssistType
:
1
,
//类型
position
:
"top"
StuId
:
1
//学员编号
});
};
this
.
$emit
(
"success"
,
res
.
Data
,
0
);
this
.
customObj
.
AssistList
.
push
(
obj
);
}
},
});
//删除协助人员
},
delAssist
(
index
)
{
closeForm
()
{
this
.
customObj
.
AssistList
.
splice
(
index
,
1
);
this
.
$emit
(
"close"
);
},
//获取员工列表
getEmployeeList
()
{
queryEmployee
({
IsLeave
:
1
}).
then
(
res
=>
{
this
.
employeeList
=
res
.
Data
;
this
.
myEmployeeList
=
res
.
Data
;
});
},
//获取收客渠道
GetStuChannelList
()
{
GetStuChannelList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
StuChannelList
=
res
.
Data
;
}
});
},
//筛选员工
filterEmployee
(
val
,
update
,
abort
)
{
update
(()
=>
{
this
.
myEmployeeList
=
this
.
employeeList
.
filter
(
v
=>
v
.
EmployeeName
.
indexOf
(
val
)
>
-
1
);
});
},
//获取日语基础列表
getBasicList
()
{
getGuestBasicsEnumList
({}).
then
(
res
=>
{
this
.
basicList
=
res
.
Data
;
});
},
//获取学历列表
queryGuestEducationEnumList
()
{
getGuestEducationEnumList
({}).
then
(
res
=>
{
this
.
educationList
=
res
.
Data
;
});
},
//获取学习目的列表
queryGoalsList
()
{
getGuestLearningGoalsEnumList
({}).
then
(
res
=>
{
this
.
goalsList
=
res
.
Data
;
});
},
//获取客户阶段列表
getStuStageList
()
{
queryStuStageList
().
then
(
res
=>
{
this
.
customState
=
res
.
Data
;
});
},
//获取客户下拉数据
GetCustomerList
()
{
GetCustomerList
().
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customList
=
res
.
Data
;
}
})
},
//获取客户类型
getCustomTypeList
()
{
GetStudentTypeList
().
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customTypeList
=
res
.
Data
;
}
})
},
queryStuInfo
()
{
getStudentInfo
({
StuId
:
this
.
customMsg
.
StuId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customObj
=
res
.
Data
;
}
});
},
//新增协助人员
addAssist
()
{
let
obj
=
{
Id
:
0
,
//编号
AssistId
:
1
,
//员工编号
AssistType
:
1
,
//类型
StuId
:
1
//学员编号
};
this
.
customObj
.
AssistList
.
push
(
obj
);
},
//删除协助人员
delAssist
(
index
)
{
this
.
customObj
.
AssistList
.
splice
(
index
,
1
);
}
}
}
}
};
};
</
script
>
</
script
>
\ No newline at end of file
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