Commit 242770b1 authored by 罗超's avatar 罗超

1

parent f2c12751
...@@ -120,8 +120,8 @@ ...@@ -120,8 +120,8 @@
<span class="student_require">*</span>客户状态 <span class="student_require">*</span>客户状态
</div> </div>
<div class="stage_value"> <div class="stage_value">
<q-select filled v-model="customObj.StuStage" dense :options="customState" option-label="Name" style="width:185px;" <q-select filled v-model="customObj.StuStage" dense :options="customState" option-label="Name"
option-value="Id" emit-value map-options label="客户状态" /> style="width:185px;" option-value="Id" emit-value map-options label="客户状态" />
</div> </div>
</div> </div>
</div> </div>
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<div class="customer_info_component" v-if="customObj.CreateType==3"> <div class="customer_info_component" v-if="customObj.CreateType==3">
<div class="customer_info_Stage"> <div class="customer_info_Stage">
<div class="stage_label"> <div class="stage_label">
介绍人 <span class="student_require">*</span>介绍人
</div> </div>
<div class="stage_value"> <div class="stage_value">
<q-select filled v-model="customObj.StuSourceId" style="width:185px;" dense @filter="filterEmployee" <q-select filled v-model="customObj.StuSourceId" style="width:185px;" dense @filter="filterEmployee"
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
<div class="customer_info_component" v-if="customObj.CreateType==4"> <div class="customer_info_component" v-if="customObj.CreateType==4">
<div class="customer_info_Stage"> <div class="customer_info_Stage">
<div class="stage_label"> <div class="stage_label">
转介人 <span class="student_require">*</span>转介人
</div> </div>
<div class="stage_value"> <div class="stage_value">
<q-select filled v-model="customObj.StuSourceId" style="width:185px;" use-input @filter="filterStudent" <q-select filled v-model="customObj.StuSourceId" style="width:185px;" use-input @filter="filterStudent"
...@@ -164,22 +164,38 @@ ...@@ -164,22 +164,38 @@
<div class="customer_info_component" v-if="customObj.CreateType==1"> <div class="customer_info_component" v-if="customObj.CreateType==1">
<div class="customer_info_Stage"> <div class="customer_info_Stage">
<div class="stage_label"> <div class="stage_label">
收客渠道 <span class="student_require">*</span>收客渠道
</div> </div>
<div class="stage_value"> <div class="stage_value">
<q-select filled v-model="customObj.StuChannel" style="width:185px;" dense :options="StuChannelList" <q-select filled v-model="customObj.StuChannel" style="width:185px;" dense :options="StuChannelList"
option-label="Name" option-value="Id" emit-value map-options /> option-label="Name" option-value="Id" emit-value map-options use-input @filter="filterStuChannel">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div> </div>
</div> </div>
</div> </div>
<div class="customer_info_component" v-if="customObj.CreateType==2"> <div class="customer_info_component" v-if="customObj.CreateType==2">
<div class="customer_info_Stage"> <div class="customer_info_Stage">
<div class="stage_label"> <div class="stage_label">
关联同行 <span class="student_require">*</span>关联同行
</div> </div>
<div class="stage_value"> <div class="stage_value">
<q-select filled v-model="customObj.CustomerId" style="width:185px" dense :options="customList" <q-select filled v-model="customObj.CustomerId" style="width:185px" dense :options="customList" use-input
option-label="CustomerName" option-value="CustomerId" emit-value map-options /> @filter="filterFn" option-label="CustomerName" option-value="CustomerId" emit-value map-options>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div> </div>
</div> </div>
</div> </div>
...@@ -348,10 +364,12 @@ ...@@ -348,10 +364,12 @@
employeeList: [], employeeList: [],
myEmployeeList: [], myEmployeeList: [],
StuChannelList: [], //收客渠道 StuChannelList: [], //收客渠道
allStuChannelList:[],//所有收客渠道
AssistDropList: [], //协助人员 AssistDropList: [], //协助人员
customFromList: [], //客户来源 customFromList: [], //客户来源
customTypeList: [], //客户类型 customTypeList: [], //客户类型
customList: [], customList: [], //同行列表
allCustomList: [], //所有同行列表
TransListData: [], //转介人数据 TransListData: [], //转介人数据
MyTransListData: [], MyTransListData: [],
checkMsg: { checkMsg: {
...@@ -407,6 +425,38 @@ ...@@ -407,6 +425,38 @@
}) })
return return
} }
if (this.customObj.CreateType == 1&&!this.customObj.StuChannel) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择收客渠道`
})
return
}
if (this.customObj.CreateType == 2&&!this.customObj.CustomerId) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择关联同行`
})
return
}
if (this.customObj.CreateType == 3&&!this.customObj.StuSourceId) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择介绍人`
})
return
}
if (this.customObj.CreateType == 4&&!this.customObj.StuSourceId) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择转介人`
})
return
}
if (this.customObj.StuStage == '') { if (this.customObj.StuStage == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
...@@ -465,9 +515,23 @@ ...@@ -465,9 +515,23 @@
GetStuChannelList({}).then(res => { GetStuChannelList({}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.StuChannelList = res.Data; this.StuChannelList = res.Data;
this.allStuChannelList = res.Data;
} }
}) })
}, },
//筛选渠道
filterStuChannel(val, update,){
update(() => {
if (val === "") {
this.StuChannelList = JSON.parse(JSON.stringify(this.allStuChannelList));
} else {
const needle = val.toLowerCase();
this.StuChannelList = this.allStuChannelList.filter(
(v) => v.Name.toLowerCase().indexOf(needle) > -1
);
}
});
},
//筛选员工 //筛选员工
filterEmployee(val, update, abort) { filterEmployee(val, update, abort) {
update(() => { update(() => {
...@@ -513,9 +577,23 @@ ...@@ -513,9 +577,23 @@
GetCustomerList().then(res => { GetCustomerList().then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.customList = res.Data; this.customList = res.Data;
this.allCustomList = res.Data;
} }
}) })
}, },
//筛选客户
filterFn(val, update) {
update(() => {
if (val === "") {
this.customList = JSON.parse(JSON.stringify(this.allCustomList));
} else {
const needle = val.toLowerCase();
this.customList = this.allCustomList.filter(
(v) => v.CustomerName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//获取客户类型 //获取客户类型
getCustomTypeList() { getCustomTypeList() {
GetStudentTypeList().then(res => { GetStudentTypeList().then(res => {
......
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