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

1

parent f2c12751
......@@ -114,18 +114,18 @@
</div>
</div>
</div>
<div class="customer_info_component">
<div class="customer_info_component">
<div class="customer_info_Stage items-center">
<div class="stage_label">
<span class="student_require">*</span>客户状态
</div>
<div class="stage_value">
<q-select filled v-model="customObj.StuStage" dense :options="customState" option-label="Name" style="width:185px;"
option-value="Id" emit-value map-options label="客户状态" />
<q-select filled v-model="customObj.StuStage" dense :options="customState" option-label="Name"
style="width:185px;" option-value="Id" emit-value map-options label="客户状态" />
</div>
</div>
</div>
<div class="customer_info_component">
<div class="customer_info_Stage">
<div class="stage_label">
......@@ -141,7 +141,7 @@
<div class="customer_info_component" v-if="customObj.CreateType==3">
<div class="customer_info_Stage">
<div class="stage_label">
介绍人
<span class="student_require">*</span>介绍人
</div>
<div class="stage_value">
<q-select filled v-model="customObj.StuSourceId" style="width:185px;" dense @filter="filterEmployee"
......@@ -153,7 +153,7 @@
<div class="customer_info_component" v-if="customObj.CreateType==4">
<div class="customer_info_Stage">
<div class="stage_label">
转介人
<span class="student_require">*</span>转介人
</div>
<div class="stage_value">
<q-select filled v-model="customObj.StuSourceId" style="width:185px;" use-input @filter="filterStudent"
......@@ -164,22 +164,38 @@
<div class="customer_info_component" v-if="customObj.CreateType==1">
<div class="customer_info_Stage">
<div class="stage_label">
收客渠道
<span class="student_require">*</span>收客渠道
</div>
<div class="stage_value">
<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 class="customer_info_component" v-if="customObj.CreateType==2">
<div class="customer_info_Stage">
<div class="stage_label">
关联同行
<span class="student_require">*</span>关联同行
</div>
<div class="stage_value">
<q-select filled v-model="customObj.CustomerId" style="width:185px" dense :options="customList"
option-label="CustomerName" option-value="CustomerId" emit-value map-options />
<q-select filled v-model="customObj.CustomerId" style="width:185px" dense :options="customList" use-input
@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>
......@@ -200,7 +216,7 @@
<div class="customer_info_component">
<div class="customer_info_Stage">
<div class="stage_label">
<span class="student_require">*</span>客户类型
<span class="student_require">*</span>客户类型
</div>
<div class="stage_value">
<q-select filled v-model="customObj.StuType" style="width:185px" dense :options="customTypeList"
......@@ -348,10 +364,12 @@
employeeList: [],
myEmployeeList: [],
StuChannelList: [], //收客渠道
allStuChannelList:[],//所有收客渠道
AssistDropList: [], //协助人员
customFromList: [], //客户来源
customTypeList: [], //客户类型
customList: [],
customList: [], //同行列表
allCustomList: [], //所有同行列表
TransListData: [], //转介人数据
MyTransListData: [],
checkMsg: {
......@@ -407,7 +425,39 @@
})
return
}
if (this.customObj.StuStage == '') {
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 == '') {
this.$q.notify({
type: 'negative',
position: "top",
......@@ -415,7 +465,7 @@
})
return
}
if (this.customObj.StuType == '') {
if (this.customObj.StuType == '') {
this.$q.notify({
type: 'negative',
position: "top",
......@@ -465,9 +515,23 @@
GetStuChannelList({}).then(res => {
if (res.Code == 1) {
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) {
update(() => {
......@@ -513,9 +577,23 @@
GetCustomerList().then(res => {
if (res.Code == 1) {
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() {
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