Commit df6945a2 authored by zhengke's avatar zhengke

修改

parent e1b00863
...@@ -439,5 +439,24 @@ export function RemoveStudentAssist(data) { ...@@ -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 @@ ...@@ -59,6 +59,7 @@
width: 120px; width: 120px;
font-size: 14px; font-size: 14px;
} }
</style> </style>
<template> <template>
<div> <div>
...@@ -68,61 +69,82 @@ ...@@ -68,61 +69,82 @@
<div class="customer_info_Stage"> <div class="customer_info_Stage">
<div class="stage_label" style="margin-top:-16px;">客户名称</div> <div class="stage_label" style="margin-top:-16px;">客户名称</div>
<div class="stage_value"> <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>
</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> <div class="stage_label" style="margin-top:-16px;">客户电话</div>
<div class="stage_value"> <div class="stage_value">
<q-radio v-model="customObj.StuSex" :val="0" label="男" /> <q-input filled v-model="customObj.StuTel" style="width:182px;" @blur="CheckExistsStu()" ref="StuTel" dense></q-input>
<q-radio v-model="customObj.StuSex" :val="1" label="女" />
</div> </div>
</div> </div>
</div> </div>
<div class="customer_info_component"> <div class="info_item">
<div class="customer_info_Stage"> <div class="item_label">客户来源</div>
<div class="stage_label" style="margin-top:-16px;">电话</div> <div class="item_value">
<div class="stage_value"> <q-select filled v-model="customObj.CreateType" dense :options="customFromList" option-label="Name" option-value="Id"
<q-input filled v-model="customObj.StuTel" style="width:182px;" :rules="[val => !!val || '请输入电话号码']" ref="StuTel" dense></q-input> 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>
<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> </div>
<div class="custom_Line"></div> <div class="custom_Line"></div>
<div class="info_title">基本资料</div> <div class="info_title">基本资料</div>
<div class="info_content"> <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="info_item studentDate">
<div class="item_label">出生日期</div> <div class="item_label">出生日期</div>
<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 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> </el-date-picker>
</template> </template>
</q-field> </q-field>
</div> </div>
</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="info_item">
<div class="item_label">客户阶段状态</div> <div class="item_label">客户阶段状态</div>
<div class="item_value"> <div class="item_value">
<q-select filled v-model="customObj.StuStage" dense :options="customState" option-label="Name" option-value="Id" <q-select filled v-model="customObj.StuStage" dense :options="customState" option-label="Name"
emit-value map-options label="客户状态" /> option-value="Id" emit-value map-options label="客户状态" />
</div> </div>
</div> </div>
<div class="info_item"> <div class="info_item">
...@@ -148,27 +170,15 @@ ...@@ -148,27 +170,15 @@
<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 filled v-model="customObj.StuPurpose" dense :options="goalsList" option-label="Name" option-value="Id" <q-select filled v-model="customObj.StuPurpose" dense :options="goalsList" option-label="Name"
emit-value map-options /> 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">
<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"> <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> </div>
<div class="info_item"> <div class="info_item">
...@@ -188,7 +198,9 @@ ...@@ -188,7 +198,9 @@
getGuestBasicsEnumList, getGuestBasicsEnumList,
getGuestEducationEnumList, getGuestEducationEnumList,
getGuestLearningGoalsEnumList, getGuestLearningGoalsEnumList,
GetStuChannelList GetStuChannelList,
CreateTypeList,
CheckExistsStu
} from '../../../api/sale/sale' } from '../../../api/sale/sale'
import { import {
queryEmployee queryEmployee
...@@ -212,20 +224,29 @@ ...@@ -212,20 +224,29 @@
}, },
data() { data() {
return { return {
customFrom: [{
Name: '员工录入',
Id: 1
}, {
Name: '同业录入',
Id: 2
}],
//客户阶段状态列表 //客户阶段状态列表
customState: [], customState: [],
customMsg: { customMsg: {
StuId: 0, StuId: 0,
}, },
//客户对象 //客户对象
customObj: {}, customObj: {
StuId:0,
StuName:'', //客户名称
StuTel:'', //客户电话
CreateType:'', //客户来源
StuSourceId:'', //介绍人
StuChannel:'', //收客渠道
PlatformName:'', //平台名称
StuSex:0, //性别
StuBirth:'', //出生日期
StuStage:'', //客户阶段状态
JapanBaseInfo:'', //日语基础
StuProfession:'', //职业
StuEducation:'', //学历
StuPurpose:'', //学习目的
CreateBy:'' //创建人
},
//日语基础列表 //日语基础列表
basicList: [], basicList: [],
//学历列表 //学历列表
...@@ -236,7 +257,8 @@ ...@@ -236,7 +257,8 @@
employeeList: [], employeeList: [],
myEmployeeList: [], myEmployeeList: [],
StuChannelList: [], //收客渠道 StuChannelList: [], //收客渠道
AssistDropList: [] //协助人员 AssistDropList: [], //协助人员
customFromList: [], //客户来源
} }
}, },
created() { created() {
...@@ -246,21 +268,72 @@ ...@@ -246,21 +268,72 @@
this.queryGoalsList(); this.queryGoalsList();
this.getEmployeeList(); this.getEmployeeList();
this.GetStuChannelList(); this.GetStuChannelList();
this.getCustomFrom();
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.queryStuInfo(); this.queryStuInfo();
} }
}, },
mounted() { mounted() {},
},
methods: { methods: {
//保存学员信息 //保存学员信息
saveStu() { saveStu() {
this.$refs.StuName.validate(); if(this.customObj.StuName==''){
this.$refs.StuTel.validate(); this.$q.notify({
if (!this.$refs.StuName.hasError&&!this.$refs.StuTel.hasError){ 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})$/; 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({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -278,12 +351,11 @@ ...@@ -278,12 +351,11 @@
position: 'top' position: 'top'
}) })
this.$emit('success'); this.$emit('success');
if(this.AddType == 1){ if (this.AddType == 1) {
this.$emit('close'); this.$emit('close');
} }
} }
}) })
}
}, },
//获取员工列表 //获取员工列表
getEmployeeList() { getEmployeeList() {
...@@ -295,9 +367,9 @@ ...@@ -295,9 +367,9 @@
}) })
}, },
//获取收客渠道 //获取收客渠道
GetStuChannelList(){ GetStuChannelList() {
GetStuChannelList({}).then(res => { GetStuChannelList({}).then(res => {
if(res.Code==1){ if (res.Code == 1) {
this.StuChannelList = res.Data; this.StuChannelList = res.Data;
} }
}) })
...@@ -316,6 +388,14 @@ ...@@ -316,6 +388,14 @@
this.basicList = res.Data; this.basicList = res.Data;
}) })
}, },
//获取客户来源
getCustomFrom(){
CreateTypeList({}).then(res => {
if(res.Code==1){
this.customFromList = res.Data;
}
})
},
//获取学历列表 //获取学历列表
queryGuestEducationEnumList() { queryGuestEducationEnumList() {
getGuestEducationEnumList({}).then(res => { getGuestEducationEnumList({}).then(res => {
...@@ -339,24 +419,50 @@ ...@@ -339,24 +419,50 @@
StuId: this.customMsg.StuId StuId: this.customMsg.StuId
}).then(res => { }).then(res => {
if (res.Code == 1) { 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 = { let obj = {
Id:0,//编号 Id: 0, //编号
AssistId:1,//员工编号 AssistId: 1, //员工编号
AssistType:1,//类型 AssistType: 1, //类型
StuId:1,//学员编号 StuId: 1, //学员编号
} }
this.customObj.AssistList.push(obj); this.customObj.AssistList.push(obj);
}, },
//删除协助人员 //删除协助人员
delAssist(index){ delAssist(index) {
this.customObj.AssistList.splice(index,1); this.customObj.AssistList.splice(index, 1);
},
//验证手机号
CheckExistsStu(){
let msg = {
StuId: this.saveObj.StuId,
StuTel: this.customObj.StuTel
}
CheckExistsStu(msg).then(res => {
})
} }
} }
} }
</script> </script>
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<q-banner v-if="isShowEdit"> <q-banner v-if="isShowEdit">
<div class="row wrap" style="margin-top:10px;width:300px;"> <div class="row wrap" style="margin-top:10px;width:300px;">
<q-input filled v-model="feedBackMsg.Feedback" :rows="3" type="textarea" <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> </q-input>
</div> </div>
<div class="row wrap" style="margin-top:10px;width:300px;"> <div class="row wrap" style="margin-top:10px;width:300px;">
...@@ -189,9 +189,9 @@ ...@@ -189,9 +189,9 @@
this.getList(); this.getList();
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
if(userInfo){ if(userInfo){
this.VisitMsg.ReceptionPersion = parseInt(userInfo.AccountId); this.VisitMsg.ReceptionPersion = Number(userInfo.AccountId);
this.$forceUpdate();
} }
}, },
methods: { methods: {
//点击到访 //点击到访
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<q-banner v-if="isShowEdit"> <q-banner v-if="isShowEdit">
<div class="row wrap" style="margin-top:10px;width:300px;"> <div class="row wrap" style="margin-top:10px;width:300px;">
<q-input filled v-model="feedBackMsg.Feedback" :rows="3" type="textarea" <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> </q-input>
</div> </div>
<div class="row wrap" style="float:right;margin-bottom:10px;"> <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