Commit d4f8e508 authored by zhengke's avatar zhengke

修改

parent 41508a02
......@@ -655,3 +655,14 @@ export function IgnoreClassPlan(data) {
data
});
}
/**
* 获取客户类型下拉
*/
export function GetStudentTypeList(data) {
return request({
url: '/CustomerStudent/GetStudentTypeList',
method: 'post',
data
});
}
\ No newline at end of file
......@@ -27,6 +27,8 @@
color: #606266;
flex-shrink: 0;
margin-right: 10px;
width: 62px;
text-align: right;
}
.stage_value {
......@@ -59,9 +61,11 @@
width: 120px;
font-size: 14px;
}
.student_require{
color:red;
.student_require {
color: red;
}
</style>
<template>
<div>
......@@ -73,17 +77,38 @@
<span class="student_require">*</span>客户名称
</div>
<div class="stage_value">
<q-input filled v-model="customObj.StuName" style="width:182px;" ref="StuName" dense></q-input>
<q-input filled v-model="customObj.StuName" style="width:185px;" 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_value">
<q-input filled v-model="customObj.StuTel" style="width:185px;" @blur="CheckExistsStu()" ref="StuTel" dense>
</q-input>
</div>
</div>
</div>
<div class="customer_info_component">
<div class="customer_info_Stage">
<div class="stage_label">
QQ
</div>
<div class="stage_value">
<q-input filled v-model="customObj.QQ" style="width:185px;" @keyup.native="checkInteger(customObj,'QQ')" ref="QQ" dense></q-input>
</div>
</div>
</div>
<div class="customer_info_component">
<div class="customer_info_Stage">
<div class="stage_label">
<span class="student_require">*</span>客户电话
微信号
</div>
<div class="stage_value">
<q-input filled v-model="customObj.StuTel" style="width:182px;" @blur="CheckExistsStu()" ref="StuTel" dense></q-input>
<q-input filled v-model="customObj.WeChatNo" style="width:185px;" ref="WeChatNo" dense></q-input>
</div>
</div>
</div>
......@@ -92,8 +117,8 @@
<span class="student_require">*</span>客户来源
</div>
<div class="item_value">
<q-select filled v-model="customObj.CreateType" @input="resetStuSource()" dense :options="customFromList" option-label="Name" option-value="Id"
emit-value map-options label="客户来源" />
<q-select filled v-model="customObj.CreateType" @input="resetStuSource()" 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">
......@@ -104,14 +129,13 @@
</div>
</div>
<div class="info_item" v-if="customObj.CreateType==4">
<div class="item_label">转介人</div>
<div class="item_label" style="padding-left:20px;">转介人</div>
<div class="item_value">
<q-select filled v-model="customObj.StuSourceId" dense :options="customList" option-label="CustomerName"
option-value="CustomerId" emit-value map-options />
</div>
</div>
<div class="info_item">
<div class="info_item" v-if="customObj.CreateType==1">
<div class="item_label">
<span class="student_require">*</span>收客渠道
</div>
......@@ -120,6 +144,14 @@
option-value="Id" emit-value map-options />
</div>
</div>
<div class="info_item" v-if="customObj.CreateType==2">
<div class="item_label">关联同行</div>
<div class="item_value">
<q-select filled v-model="customObj.CustomerId" dense :options="customList" option-label="CustomerName"
option-value="CustomerId" emit-value map-options />
</div>
</div>
<template v-if="customObj.CreateType==1">
<div class="info_item" v-if="customObj.StuChannel==6">
<div class="item_label">第三方平台名称</div>
<div class="item_value">
......@@ -132,6 +164,14 @@
<q-input filled v-model="customObj.PlatformName" dense></q-input>
</div>
</div>
</template>
<div class="info_item">
<div class="item_label">客户类型</div>
<div class="item_value">
<q-select filled v-model="customObj.StuType" dense :options="customTypeList" option-label="Name"
option-value="Id" emit-value map-options label="客户类型" />
</div>
</div>
<div class="custom_Line"></div>
<div class="info_title">基本资料</div>
<div class="info_content">
......@@ -188,13 +228,6 @@
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.CustomerId" dense :options="customList" option-label="CustomerName"
option-value="CustomerId" emit-value map-options />
</div>
</div>
<div class="info_item">
<div class="item_label">创建人</div>
<div class="item_value">
......@@ -214,6 +247,7 @@
getStudentInfo, //获取学员客户信息
queryStuStageList, //获取客户阶段列表
saveStudent, //保存学员信息
GetStudentTypeList
} from '../../../api/school/index';
import {
getGuestBasicsEnumList,
......@@ -253,22 +287,25 @@
},
//客户对象
customObj: {
StuId:0,
StuName:'', //客户名称
StuTel:'', //客户电话
CreateType:'', //客户来源
StuSourceId:'', //介绍人
StuChannel:'', //收客渠道
PlatformName:'', //平台名称
StuSex:0, //性别
StuBirth:'', //出生日期
StuStage:'', //客户阶段状态
JapanBaseInfo:'', //日语基础
StuProfession:'', //职业
StuEducation:'', //学历
StuPurpose:'', //学习目的
CreateBy:'', //创建人
CustomerId:0
StuId: 0,
StuName: '', //客户名称
StuTel: '', //客户电话
CreateType: '', //客户来源
StuSourceId: '', //介绍人
StuChannel: '', //收客渠道
PlatformName: '', //平台名称
StuSex: 0, //性别
StuBirth: '', //出生日期
StuStage: '', //客户阶段状态
JapanBaseInfo: '', //日语基础
StuProfession: '', //职业
StuEducation: '', //学历
StuPurpose: '', //学习目的
CreateBy: '', //创建人
CustomerId: 0, //关联同行
QQ: '', //qq
WeChatNo: '', //微信号
StuType:'' //客户类型
},
//日语基础列表
basicList: [],
......@@ -282,10 +319,11 @@
StuChannelList: [], //收客渠道
AssistDropList: [], //协助人员
customFromList: [], //客户来源
customTypeList: [], //客户类型
customList: [],
checkMsg:{
StuId:0,
StuTel:''
checkMsg: {
StuId: 0,
StuTel: ''
}
}
},
......@@ -298,6 +336,7 @@
this.GetStuChannelList();
this.getCustomFrom();
this.GetCustomerList();
this.getCustomTypeList();
if (this.saveObj && this.saveObj.StuId > 0) {
this.customMsg.StuId = this.saveObj.StuId;
this.checkMsg.StuId = this.saveObj.StuId;
......@@ -308,7 +347,7 @@
methods: {
//保存学员信息
saveStu() {
if(this.customObj.StuName==''){
if (this.customObj.StuName == '') {
this.$q.notify({
type: 'negative',
position: "top",
......@@ -316,15 +355,15 @@
})
return
}
if(this.customObj.StuTel==''){
if (this.customObj.StuTel == '' && this.customObj.QQ == '' && this.customObj.WeChatNo == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请输入客户电话`
message: `请输入电话QQ微信至少一个`
})
return
}
if(this.customObj.CreateType==''){
if (this.customObj.CreateType == '') {
this.$q.notify({
type: 'negative',
position: "top",
......@@ -332,7 +371,7 @@
})
return
}
if(this.customObj.StuChannel==''){
if (this.customObj.StuChannel == '') {
this.$q.notify({
type: 'negative',
position: "top",
......@@ -340,6 +379,7 @@
})
return
}
if (this.customObj.StuTel != '') {
var myreg = /^[1][3-9][\d]{9}/;
if (!myreg.test(this.customObj.StuTel)) {
this.$q.notify({
......@@ -349,6 +389,7 @@
})
return
}
}
saveStudent(this.customObj).then(res => {
if (res.Code == 1) {
this.$q.notify({
......@@ -397,9 +438,9 @@
})
},
//获取客户来源
getCustomFrom(){
getCustomFrom() {
CreateTypeList({}).then(res => {
if(res.Code==1){
if (res.Code == 1) {
this.customFromList = res.Data;
}
})
......@@ -423,13 +464,21 @@
})
},
//获取客户下拉数据
GetCustomerList(){
GetCustomerList() {
GetCustomerList().then(res => {
if(res.Code==1){
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
......@@ -452,6 +501,7 @@
this.customObj.StuPurpose = tempDate.StuPurpose;
this.customObj.CreateBy = tempDate.CreateBy;
this.customObj.CustomerId = tempDate.CustomerId;
this.customObj.StuType = tempDate.StuType;
}
});
},
......@@ -470,14 +520,14 @@
this.customObj.AssistList.splice(index, 1);
},
//验证手机号
CheckExistsStu(){
CheckExistsStu() {
this.checkMsg.StuTel = this.customObj.StuTel
CheckExistsStu(this.checkMsg).then(res => {
})
},
//切换客户来源重置
resetStuSource(){
resetStuSource() {
this.customObj.StuSourceId = 0;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment