Commit d4f8e508 authored by zhengke's avatar zhengke

修改

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