Commit bdf51e2a authored by 罗超's avatar 罗超

确认提交

parent c4e36ac6
......@@ -23,20 +23,35 @@
></q-input>
</div>
<div class="q-mt-xs row q-col-gutter-md">
<div class="col-6">
<q-select
filled
v-model="customObj.cusfrom"
dense
:options="customFrom"
option-label="Name"
option-value="Id"
emit-value
map-options
label="客户来源"
behavior="menu"
/>
</div>
<q-select
filled
v-model="customObj.CreateType"
dense
:options="customFromList"
option-label="Name"
option-value="Id"
emit-value
map-options
label="客户来源"
behavior="menu"
class="col-6"
/>
<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"
/>
</div>
<div class="q-mt-xs row q-col-gutter-md">
<q-select
......@@ -161,7 +176,13 @@
</div>
<q-separator class="q-my-md" />
<div class="text-right q-py-xs">
<q-btn flat color="dark" @click="closeForm" class="q-mr-md q-px-xs" label="取消"></q-btn>
<q-btn
flat
color="dark"
@click="closeForm"
class="q-mr-md q-px-xs"
label="取消"
></q-btn>
<q-btn
unelevated
color="primary"
......@@ -183,9 +204,10 @@ import {
getGuestBasicsEnumList,
getGuestEducationEnumList,
getGuestLearningGoalsEnumList,
GetStuChannelList
GetStuChannelList,
CreateTypeList
} from "../../../api/sale/sale";
import { queryEmployee,queryStudentByTel } from "../../../api/users/user";
import { queryEmployee, queryStudentByTel } from "../../../api/users/user";
export default {
meta: {
title: "学员管理"
......@@ -199,16 +221,6 @@ export default {
},
data() {
return {
customFrom: [
{
Name: "个人录入",
Id: 1
},
{
Name: "同业录入",
Id: 2
}
],
//客户阶段状态列表
customState: [],
customMsg: {
......@@ -235,6 +247,7 @@ export default {
//员工列表
employeeList: [],
myEmployeeList: [],
customFromList: [],
StuChannelList: [], //收客渠道
AssistDropList: [] //协助人员
};
......@@ -246,6 +259,7 @@ export default {
this.queryGoalsList();
this.getEmployeeList();
this.GetStuChannelList();
this.getCustomFrom();
if (this.saveObj && this.saveObj.StuId > 0) {
this.customMsg.StuId = this.saveObj.StuId;
this.queryStuInfo();
......@@ -253,23 +267,31 @@ export default {
},
mounted() {},
methods: {
checkStuTel(){
if (this.customObj.StuTel && this.customObj.StuTel.length == 11){
queryStudentByTel({StuTel:this.customObj.StuTel}).then(r=>{
if(r.Data){
this.$emit("success",r.Data,1);
//获取客户来源
getCustomFrom() {
CreateTypeList({}).then(res => {
if (res.Code == 1) {
this.customFromList = res.Data;
}
});
},
checkStuTel() {
if (this.customObj.StuTel && this.customObj.StuTel.length == 11) {
queryStudentByTel({ StuTel: this.customObj.StuTel }).then(r => {
if (r.Data) {
this.$emit("success", r.Data, 1);
}
})
});
}
},
validate() {
let msg = "";
console.log(this.customObj)
console.log(this.customObj);
if (!this.customObj.StuName) {
msg = "请输入客户名称";
} else if (!this.customObj.StuTel || this.customObj.StuTel.length != 11) {
msg = "请输入正确的客户手机号";
} else if (!this.customObj.cusfrom) {
} else if (!this.customObj.CreateType) {
msg = "请选择客户来源";
} else if (!this.customObj.StuChannel) {
msg = "请选择客户获客渠道";
......@@ -303,12 +325,12 @@ export default {
message: "数据保存成功!",
position: "top"
});
this.$emit("success",res.Data,0);
this.$emit("success", res.Data, 0);
}
});
},
closeForm(){
this.$emit("close")
closeForm() {
this.$emit("close");
},
//获取员工列表
getEmployeeList() {
......
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