Commit df6945a2 authored by zhengke's avatar zhengke

修改

parent e1b00863
......@@ -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
});
}
......@@ -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,8 @@
employeeList: [],
myEmployeeList: [],
StuChannelList: [], //收客渠道
AssistDropList: [] //协助人员
AssistDropList: [], //协助人员
customFromList: [], //客户来源
}
},
created() {
......@@ -246,21 +268,72 @@
this.queryGoalsList();
this.getEmployeeList();
this.GetStuChannelList();
this.getCustomFrom();
if (this.saveObj && this.saveObj.StuId > 0) {
this.customMsg.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
}
}
console.log(this.customObj,'11111');
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 +351,11 @@
position: 'top'
})
this.$emit('success');
if(this.AddType == 1){
if (this.AddType == 1) {
this.$emit('close');
}
}
})
}
},
//获取员工列表
getEmployeeList() {
......@@ -295,9 +367,9 @@
})
},
//获取收客渠道
GetStuChannelList(){
GetStuChannelList() {
GetStuChannelList({}).then(res => {
if(res.Code==1){
if (res.Code == 1) {
this.StuChannelList = res.Data;
}
})
......@@ -316,6 +388,14 @@
this.basicList = res.Data;
})
},
//获取客户来源
getCustomFrom(){
CreateTypeList({}).then(res => {
if(res.Code==1){
this.customFromList = res.Data;
}
})
},
//获取学历列表
queryGuestEducationEnumList() {
getGuestEducationEnumList({}).then(res => {
......@@ -339,24 +419,50 @@
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(){
let msg = {
StuId: this.saveObj.StuId,
StuTel: this.customObj.StuTel
}
CheckExistsStu(msg).then(res => {
})
}
}
}
</script>
......@@ -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;">
......@@ -189,9 +189,9 @@
this.getList();
let userInfo = this.getLocalStorage();
if(userInfo){
this.VisitMsg.ReceptionPersion = parseInt(userInfo.AccountId);
this.VisitMsg.ReceptionPersion = Number(userInfo.AccountId);
this.$forceUpdate();
}
},
methods: {
//点击到访
......
......@@ -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;">
......
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