mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 10:26:44 +08:00
健康险续保列表页面搜索框功能修改并新增模糊搜索营业部经理下的代理人列表数据
This commit is contained in:
@@ -24,3 +24,11 @@ export function reasonForNonRenewalSubmitted(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getAgentManager(data) {
|
||||
return request({
|
||||
url: getUrl('/sale/health/getAgentManager', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<div class="sale-list-container pb50">
|
||||
<van-search placeholder="请选择客户经理姓名" v-model="searchName" show-action @change="searchList" @keyup.enter="searchList">
|
||||
<van-search v-if="agentType == '营业部经理'" placeholder="请选择客户经理姓名" v-model="searchName" show-action @keyup.enter="searchList">
|
||||
<template #action>
|
||||
<div style="display: flex;">
|
||||
<div @click="openchooseagent" style="padding: 0px 10px;border: 1px solid #eee;border-radius: 5px;">选择</div>
|
||||
<div @click="openchooseagent" style="padding: 0px 10px;border: 1px solid #eee;border-radius: 5px;">搜索</div>
|
||||
<div style="padding: 0px 10px;border: 1px solid #eee;border-radius: 5px;margin-left: 15px;" @click="openshowDataPicker">日期</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<!-- <div v-if="agentType == '服务经理'" style="display: flex;line-height: 36px;background:#fff;padding: 10px;">-->
|
||||
<!-- <div style="padding: 0px 10px;border: 1px solid #eee;border-radius: 5px;margin-left: 15px;" @click="openshowDataPicker">日期</div>-->
|
||||
<!-- </div>-->
|
||||
<div v-if="agentType == '服务经理'" style="display: flex;line-height: 36px;background:#fff;padding: 10px;">
|
||||
<div style="padding: 0px 10px;border: 1px solid #eee;border-radius: 5px;margin-left: 15px;" @click="openshowDataPicker">日期</div>
|
||||
</div>
|
||||
<van-sticky>
|
||||
<van-tabs :line-width="45" v-model="active" @change="tabChange" sticky>
|
||||
<van-tab name="0" title="未续保"></van-tab>
|
||||
@@ -50,15 +50,15 @@
|
||||
<van-datetime-picker type="year-month" v-model="currentDate" title="选择日期" @confirm="onConfirmDate" @cancel="showDataPicker = false" :min-date="minDate" :max-date="maxDate"/>
|
||||
</van-popup>
|
||||
<van-popup v-model="popupShow" position="bottom">
|
||||
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @change="onChange" @cancel="popupShow = false" />
|
||||
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false" />
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Search, Tabs, Tab, List, Tag, Sticky, Field, Icon } from 'vant'
|
||||
import { healthgetRenewalList } from '@/api/ebiz/healthInsuranceRenewal/healthInsuranceRenewal'
|
||||
import { getAgentInfo } from '@/api/ebiz/my/my.js'
|
||||
import { healthgetRenewalList, getAgentManager } from '@/api/ebiz/healthInsuranceRenewal/healthInsuranceRenewal'
|
||||
|
||||
export default {
|
||||
name: 'saleList',
|
||||
components: {
|
||||
@@ -91,45 +91,54 @@ export default {
|
||||
currentDate: '',
|
||||
cvaliEndDate: '',
|
||||
oldOptionsData:[],
|
||||
columns: [],
|
||||
allcolumns: ['G0000007 唐军1', 'G0000008 唐军2', 'G0000009 唐军3', 'G0000010 唐军4', 'G0000011 唐军5', 'G0000026 冯莹', 'G0000027 唐丽',
|
||||
'J0000039 胡杰', 'G0000079 考核测试09', 'G0000094 考核测试21'],
|
||||
columns:[],
|
||||
popupShow: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.oldOptionsData = {
|
||||
唐军: ['G0000007'],
|
||||
冯莹: ['G0000026'],
|
||||
唐丽: ['G0000026'],
|
||||
胡杰: ['J0000039'],
|
||||
考核测试09: ['G0000079'],
|
||||
考核测试19: ['G0000091'],
|
||||
考核测试21: ['G0000094']
|
||||
}
|
||||
this.columns = [{ values: Object.keys(this.oldOptionsData) }, { values: this.oldOptionsData['唐军'] }]
|
||||
this.getAgentInfo()
|
||||
this.getAgentManager()
|
||||
},
|
||||
methods: {
|
||||
onChange(picker, values) {
|
||||
picker.setColumnValues(1, this.oldOptionsData[values[0]]);
|
||||
},
|
||||
openchooseagent(){
|
||||
if(this.searchName){
|
||||
this.columns = []
|
||||
this.allcolumns.forEach(item=>{
|
||||
if(item.indexOf(this.searchName)!= -1){
|
||||
this.columns.push(item)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.columns = this.allcolumns
|
||||
}
|
||||
this.popupShow = true
|
||||
},
|
||||
onConfirm(val){
|
||||
console.log(val)
|
||||
let thisIndex = val.indexOf(' ')
|
||||
console.log(thisIndex)
|
||||
let thisagentCode = val.slice(0, thisIndex)
|
||||
console.log(thisagentCode)
|
||||
this.popupShow = false
|
||||
this.getOrderList(thisagentCode)
|
||||
},
|
||||
getAgentInfo(){
|
||||
getAgentManager() {
|
||||
let params = {
|
||||
|
||||
agentCode: 'G0000011'
|
||||
}
|
||||
getAgentInfo(params).then(res=>{
|
||||
if (res.result == 0) {
|
||||
if(res.agentGrade == 'G200' || res.agentGrade == 'G201' || res.agentGrade == 'G202' || res.agentGrade == 'G202' || res.agentGrade == 'G204'){
|
||||
getAgentManager(params).then(res=>{
|
||||
if(res.result == '0') {
|
||||
if(res.content.agentManagerFlag == '1') {
|
||||
this.agentType = '营业部经理'
|
||||
} else {
|
||||
this.agentType = '服务经理'
|
||||
}
|
||||
if(res.content.getAgentListResDTOList && res.content.getAgentListResDTOList.length != 0){
|
||||
res.content.getAgentListResDTOList.forEach(item => {
|
||||
this.allcolumns.push(item.agentCode + ' ' + item.name)
|
||||
})
|
||||
}
|
||||
this.getOrderList()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
@@ -137,10 +146,10 @@ export default {
|
||||
})
|
||||
},
|
||||
//列表查询
|
||||
getOrderList() {
|
||||
getOrderList(agentCode) {
|
||||
let params = {
|
||||
renewalFlag: this.active,
|
||||
agentCode: 'G0000025',
|
||||
agentCode: agentCode,
|
||||
cvaliStartDate: '2023-12-01',
|
||||
cvaliEndDate: '2023-12-10',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user