Commit 65142fce authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/luochao/confucius into master

parents a4273200 7ff7c0e1
......@@ -87,7 +87,7 @@
客户电话
</div>
<div class="stage_value">
<q-input filled v-model="customObj.StuTel" style="width:185px;" @blur="CheckExistsStu()" ref="StuTel" dense>
<q-input filled v-model="customObj.StuTel" style="width:185px;" @blur="CheckExistsStu(1)" ref="StuTel" dense>
</q-input>
</div>
</div>
......@@ -98,7 +98,7 @@
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>
<q-input filled v-model="customObj.QQ" style="width:185px;" @blur="CheckExistsStu(2)" @keyup.native="checkInteger(customObj,'QQ')" ref="QQ" dense></q-input>
</div>
</div>
</div>
......@@ -108,7 +108,7 @@
微信号
</div>
<div class="stage_value">
<q-input filled v-model="customObj.WeChatNo" style="width:185px;" ref="WeChatNo" dense></q-input>
<q-input filled v-model="customObj.WeChatNo" @blur="CheckExistsStu(3)" style="width:185px;" ref="WeChatNo" dense></q-input>
</div>
</div>
</div>
......@@ -323,7 +323,9 @@
customList: [],
checkMsg: {
StuId: 0,
StuTel: ''
StuTel: '',
QQ:'',
WeChatNo:''
}
}
},
......@@ -502,6 +504,8 @@
this.customObj.CreateBy = tempDate.CreateBy;
this.customObj.CustomerId = tempDate.CustomerId;
this.customObj.StuType = tempDate.StuType;
this.customObj.QQ = tempDate.QQ;
this.customObj.WeChatNo = tempDate.WeChatNo;
}
});
},
......@@ -520,11 +524,34 @@
this.customObj.AssistList.splice(index, 1);
},
//验证手机号
CheckExistsStu() {
this.checkMsg.StuTel = this.customObj.StuTel
CheckExistsStu(this.checkMsg).then(res => {
})
CheckExistsStu(type) {
if(type==1){
if (this.customObj.StuTel && this.customObj.StuTel.length == 11) {
this.checkMsg.StuTel = this.customObj.StuTel
this.checkMsg.QQ = '';
this.checkMsg.WeChatNo = '';
CheckExistsStu(this.checkMsg).then(r => {
});
}
}
if(type==2){
if (this.customObj.QQ) {
this.checkMsg.StuTel = '';
this.checkMsg.QQ = this.customObj.QQ;
this.checkMsg.WeChatNo = '';
CheckExistsStu(this.checkMsg).then(r => {
});
}
}
if(type==3){
if (this.customObj.WeChatNo) {
this.checkMsg.StuTel = ''
this.checkMsg.QQ = '';
this.checkMsg.WeChatNo = this.customObj.WeChatNo;
CheckExistsStu(this.checkMsg).then(r => {
});
}
}
},
//切换客户来源重置
resetStuSource() {
......
......@@ -19,7 +19,29 @@
full-mask
mask="###########"
label="客户电话"
@input="checkStuTel"
@input="checkStuTel(1)"
></q-input>
</div>
<div class="q-mt-xs row q-col-gutter-md">
<q-input
class="col-6"
filled
v-model="customObj.QQ"
dense
full-mask
mask="###########"
label="客户QQ"
@input="checkStuTel(2)"
></q-input>
<q-input
class="col-6"
filled
v-model="customObj.WeChatNo"
dense
full-mask
mask="###########"
label="客户微信号"
@input="checkStuTel(3)"
></q-input>
</div>
<div class="q-mt-xs row q-col-gutter-md">
......@@ -36,6 +58,34 @@
behavior="menu"
class="col-6"
/>
<q-select
filled
v-model="customObj.StuChannel"
v-if="customObj.CreateType==1"
label="获客渠道"
dense
:options="StuChannelList"
option-label="Name"
option-value="Id"
emit-value
map-options
class="col-6"
behavior="menu"
/>
<q-select
filled
v-model="customObj.CustomerId"
v-if="customObj.CreateType==2"
label="关联同行"
dense
:options="customList"
option-label="CustomerName"
option-value="CustomerId"
emit-value
map-options
class="col-6"
behavior="menu"
/>
<q-select
v-if="customObj.CreateType == 3"
filled
......@@ -52,28 +102,29 @@
behavior="menu"
class="col-6"
/>
</div>
<div class="q-mt-xs row q-col-gutter-md">
<q-select
v-if="customObj.CreateType == 4"
filled
v-model="customObj.StuChannel"
label="获客渠道"
v-model="customObj.StuSourceId"
dense
:options="StuChannelList"
option-label="Name"
option-value="Id"
:options="customList"
option-label="CustomerName"
option-value="CustomerId"
emit-value
map-options
class="col-6"
label="转介人"
behavior="menu"
class="col-6"
/>
</div>
<div class="q-mt-xs row q-col-gutter-md">
<q-input
filled
v-model="customObj.PlatformName"
:label="customObj.StuChannel == 6 ? '平台名称' : '其他渠道名称'"
dense
class="col-6"
v-if="customObj.StuChannel == 6 || customObj.StuChannel == 7"
v-if="customObj.CreateType==1&&(customObj.StuChannel == 6 || customObj.StuChannel == 7)"
></q-input>
</div>
<div style="font-size:12px;" class="text-grey-6 q-my-md">补充资料</div>
......@@ -205,7 +256,8 @@ import {
getGuestEducationEnumList,
getGuestLearningGoalsEnumList,
GetStuChannelList,
CreateTypeList
CreateTypeList,
GetCustomerList
} from "../../../api/sale/sale";
import { queryEmployee, queryStudentByTel } from "../../../api/users/user";
export default {
......@@ -249,7 +301,8 @@ export default {
myEmployeeList: [],
customFromList: [],
StuChannelList: [], //收客渠道
AssistDropList: [] //协助人员
AssistDropList: [], //协助人员
customList:[]
};
},
created() {
......@@ -260,6 +313,7 @@ export default {
this.getEmployeeList();
this.GetStuChannelList();
this.getCustomFrom();
this.GetCustomerList();
if (this.saveObj && this.saveObj.StuId > 0) {
this.customMsg.StuId = this.saveObj.StuId;
this.queryStuInfo();
......@@ -275,13 +329,36 @@ export default {
}
});
},
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);
}
});
checkStuTel(type) {
//验证手机
if(type==1){
if (this.customObj.StuTel && this.customObj.StuTel.length == 11) {
queryStudentByTel({ StuTel: this.customObj.StuTel, QQ:'', WeChatNo:'' }).then(r => {
if (r.Data) {
this.$emit("success", r.Data, 1);
}
});
}
}
//验证QQ
if(type==2){
if (this.customObj.QQ) {
queryStudentByTel({ StuTel: '', QQ:this.customObj.QQ , WeChatNo:'' }).then(r => {
if (r.Data) {
this.$emit("success", r.Data, 1);
}
});
}
}
//验证微信
if(type==3){
if (this.customObj.WeChatNo) {
queryStudentByTel({ StuTel: '', QQ:'' , WeChatNo:this.customObj.WeChatNo }).then(r => {
if (r.Data) {
this.$emit("success", r.Data, 1);
}
});
}
}
},
validate() {
......@@ -289,8 +366,8 @@ export default {
console.log(this.customObj);
if (!this.customObj.StuName) {
msg = "请输入客户名称";
} else if (!this.customObj.StuTel || this.customObj.StuTel.length != 11) {
msg = "请输入正确的客户手机号";
} else if (!this.customObj.StuTel && !this.customObj.QQ && !this.customObj.WeChatNo) {
msg = "请至少输入一个手机号QQ号微信号";
} else if (!this.customObj.CreateType) {
msg = "请选择客户来源";
} else if (!this.customObj.StuChannel) {
......@@ -381,6 +458,14 @@ export default {
this.customState = res.Data;
});
},
//获取客户下拉数据
GetCustomerList() {
GetCustomerList().then(res => {
if (res.Code == 1) {
this.customList = res.Data;
}
})
},
queryStuInfo() {
getStudentInfo({
StuId: this.customMsg.StuId
......
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