Commit bdf51e2a authored by 罗超's avatar 罗超

确认提交

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