Commit cba1b2ad authored by 黄奎's avatar 黄奎
parents ce9a57de fd4df924
......@@ -30,7 +30,7 @@
<div>
<table style="margin-left:10px;">
<tr>
<td style="width:42px;text-align:right;">
<td style="width:70px;text-align:right;">
卖价
</td>
<td colspan="2">
......@@ -39,6 +39,15 @@
@keyup.native="checkPrice(priceObj.courseObj, 'SellPrice')" :rules="[val => !!val || '请填写卖价']" />
</td>
</tr>
<tr>
<td style="width:70px;text-align:right;">
返佣设置
</td>
<td colspan="2">
<q-radio v-model="priceObj.courseObj.CommissionReType" :val="1" label="课耗返佣 " />
<q-radio v-model="priceObj.courseObj.CommissionReType" :val="2" label="付款返佣" />
</td>
</tr>
</table>
</div>
<div class="text-caption q-mb-lg q-mt-lg text-grey-6">
......@@ -219,6 +228,7 @@
CourseId: 0, //课程编号
OriginalPrice: 0, //原价
SellPrice: 0, //售价
CommissionReType:1,//1课耗返佣 2付款返佣
B2CRatio: 0, //直客首次报名优惠比例
B2CReNewRatio: 0, //直客续费优惠比例
B2BRebateRatio: 0, //一般同行首次报名返佣比例
......@@ -281,6 +291,7 @@
this.priceObj.courseObj.CourseId = res.Data.CourseId;
this.priceObj.courseObj.OriginalPrice = res.Data.OriginalPrice;
this.priceObj.courseObj.SellPrice = res.Data.SellPrice;
this.priceObj.courseObj.CommissionReType = res.Data.CommissionReType;
this.priceObj.courseObj.B2CRatio = res.Data.B2CRatio;
this.priceObj.courseObj.B2CReNewRatio = res.Data.B2CReNewRatio;
this.priceObj.courseObj.B2BRebateRatio = res.Data.B2BRebateRatio;
......
......@@ -351,6 +351,18 @@
label: "客户电话",
align: "left"
},
{
name: "QQ",
field: "QQ",
label: "QQ",
align: "left"
},
{
name: "WeChatNo",
field: "WeChatNo",
label: "微信",
align: "left"
},
{
name: "StuStageName",
field: "StuStageName",
......
......@@ -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,28 @@
full-mask
mask="###########"
label="客户电话"
@input="checkStuTel"
@blur="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"
@blur="checkStuTel(2)"
></q-input>
<q-input
class="col-6"
filled
v-model="customObj.WeChatNo"
dense
full-mask
label="客户微信号"
@blur="checkStuTel(3)"
></q-input>
</div>
<div class="q-mt-xs row q-col-gutter-md">
......@@ -36,6 +57,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 +101,44 @@
behavior="menu"
class="col-6"
/>
<q-select
v-if="customObj.CreateType == 4"
filled
v-model="customObj.StuSourceId"
dense
:options="customList"
option-label="CustomerName"
option-value="CustomerId"
emit-value
map-options
label="转介人"
behavior="menu"
class="col-6"
/>
</div>
<div class="q-mt-xs row q-col-gutter-md">
<q-select
filled
v-model="customObj.StuChannel"
label="获客渠道"
v-model="customObj.StuType"
dense
:options="StuChannelList"
:options="customTypeList"
option-label="Name"
option-value="Id"
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>
......@@ -198,14 +263,16 @@
import {
getStudentInfo, //获取学员客户信息
queryStuStageList, //获取客户阶段列表
saveStudent //保存学员信息
saveStudent, //保存学员信息
GetStudentTypeList
} from "../../../api/school/index";
import {
getGuestBasicsEnumList,
getGuestEducationEnumList,
getGuestLearningGoalsEnumList,
GetStuChannelList,
CreateTypeList
CreateTypeList,
GetCustomerList
} from "../../../api/sale/sale";
import { queryEmployee, queryStudentByTel } from "../../../api/users/user";
export default {
......@@ -249,7 +316,9 @@ export default {
myEmployeeList: [],
customFromList: [],
StuChannelList: [], //收客渠道
AssistDropList: [] //协助人员
AssistDropList: [], //协助人员
customList:[],
customTypeList:[] //客户类型
};
},
created() {
......@@ -260,6 +329,8 @@ export default {
this.getEmployeeList();
this.GetStuChannelList();
this.getCustomFrom();
this.GetCustomerList();
this.getCustomTypeList();
if (this.saveObj && this.saveObj.StuId > 0) {
this.customMsg.StuId = this.saveObj.StuId;
this.queryStuInfo();
......@@ -275,13 +346,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 +383,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 +475,22 @@ export default {
this.customState = res.Data;
});
},
//获取客户下拉数据
GetCustomerList() {
GetCustomerList().then(res => {
if (res.Code == 1) {
this.customList = res.Data;
}
})
},
//获取客户类型
getCustomTypeList(){
GetStudentTypeList().then(res => {
if (res.Code == 1) {
this.customTypeList = res.Data;
}
})
},
queryStuInfo() {
getStudentInfo({
StuId: this.customMsg.StuId
......
......@@ -153,6 +153,18 @@
field: "StuTel",
align: "left"
},
{
name: "QQ",
label: "QQ",
field: "QQ",
align: "left"
},
{
name: "WeChatNo",
label: "微信",
field: "WeChatNo",
align: "left"
},
{
name: "StuStageName",
label: "客户阶段",
......
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