mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-25 07:12:53 +08:00
健康险续保搜索栏操作逻辑修改
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
<template>
|
||||
<div class="sale-list-container pb50">
|
||||
<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 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 class="topsearch" style="display: flex;background:#fff;align-items: center;">
|
||||
<div style="width: 50%;padding: 10px 5px;">
|
||||
<van-field @click="openchooseagent" v-model="searchName" style="background: #f7f8fa;padding:5px 10px;" label="业务员" right-icon="arrow" placeholder="请选择"/>
|
||||
</div>
|
||||
<div style="width: 50%;padding: 10px 5px;">
|
||||
<van-field @click="openshowDataPicker" v-model="showChooseDate" style="background: #f7f8fa;padding:5px 10px;" label="日期" right-icon="arrow" placeholder="请选择"/>
|
||||
</div>
|
||||
</div>
|
||||
<van-sticky>
|
||||
<van-tabs :line-width="45" v-model="active" @change="tabChange" sticky>
|
||||
@@ -75,6 +72,7 @@ export default {
|
||||
return {
|
||||
agentType: '',
|
||||
searchName: '',
|
||||
agentCode: '',
|
||||
active: '0',
|
||||
listData: [],
|
||||
loading: false,
|
||||
@@ -89,39 +87,28 @@ export default {
|
||||
maxDate: new Date(2100, 12),
|
||||
cvaliStartDate: '',
|
||||
currentDate: '',
|
||||
showChooseDate: '',
|
||||
cvaliEndDate: '',
|
||||
oldOptionsData:[],
|
||||
allcolumns: ['G0000007 唐军1', 'G0000008 唐军2', 'G0000009 唐军3', 'G0000010 唐军4', 'G0000011 唐军5', 'G0000026 冯莹', 'G0000027 唐丽',
|
||||
columns: ['G0000007 唐军1', 'G0000008 唐军2', 'G0000009 唐军3', 'G0000010 唐军4', 'G0000011 唐军5', 'G0000026 冯莹', 'G0000027 唐丽',
|
||||
'J0000039 胡杰', 'G0000079 考核测试09', 'G0000094 考核测试21'],
|
||||
columns:[],
|
||||
popupShow: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initDate()
|
||||
this.getAgentManager()
|
||||
},
|
||||
methods: {
|
||||
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.agentCode = val.slice(0, thisIndex)
|
||||
this.searchName = val.slice(thisIndex).trim()
|
||||
this.popupShow = false
|
||||
this.getOrderList(thisagentCode)
|
||||
this.getOrderList()
|
||||
},
|
||||
getAgentManager() {
|
||||
let params = {
|
||||
@@ -136,7 +123,7 @@ export default {
|
||||
}
|
||||
if(res.content.getAgentListResDTOList && res.content.getAgentListResDTOList.length != 0){
|
||||
res.content.getAgentListResDTOList.forEach(item => {
|
||||
this.allcolumns.push(item.agentCode + ' ' + item.name)
|
||||
this.columns.push(item.agentCode + ' ' + item.name)
|
||||
})
|
||||
}
|
||||
this.getOrderList()
|
||||
@@ -146,12 +133,12 @@ export default {
|
||||
})
|
||||
},
|
||||
//列表查询
|
||||
getOrderList(agentCode) {
|
||||
getOrderList() {
|
||||
let params = {
|
||||
renewalFlag: this.active,
|
||||
agentCode: agentCode,
|
||||
cvaliStartDate: '2023-12-01',
|
||||
cvaliEndDate: '2023-12-10',
|
||||
agentCode: this.agentCode,
|
||||
cvaliStartDate: this.cvaliStartDate,
|
||||
cvaliEndDate: this.cvaliEndDate,
|
||||
}
|
||||
healthgetRenewalList(params).then(res => {
|
||||
if (res.result == '0') {
|
||||
@@ -206,6 +193,29 @@ export default {
|
||||
this.currentDate = new Date()
|
||||
this.showDataPicker = true
|
||||
},
|
||||
initDate(){
|
||||
let thisDate = new Date()
|
||||
let thisYear = thisDate.getFullYear()
|
||||
let thisMonth = thisDate.getMonth()+1
|
||||
if(thisMonth < 10){
|
||||
thisMonth = '0'+thisMonth
|
||||
}
|
||||
this.currentDate = thisYear + '-' + thisMonth
|
||||
this.showChooseDate = thisYear + '-' + thisMonth
|
||||
let date = new Date(this.currentDate);
|
||||
date.setDate(1);
|
||||
let firstDay1 = date.toLocaleDateString();
|
||||
this.cvaliStartDate = firstDay1.replaceAll('/','-')
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
date.setDate(0);
|
||||
let lastDay1 = date.toLocaleDateString();
|
||||
this.cvaliEndDate = lastDay1.replaceAll('/','-')
|
||||
},
|
||||
//打开日期选择
|
||||
openshowDataPicker(){
|
||||
this.currentDate = new Date()
|
||||
this.showDataPicker = true
|
||||
},
|
||||
//日期选择
|
||||
onConfirmDate(value){
|
||||
let thisDate = new Date(value)
|
||||
@@ -215,6 +225,8 @@ export default {
|
||||
thisMonth = '0'+thisMonth
|
||||
}
|
||||
this.currentDate = thisYear + '-' + thisMonth
|
||||
this.showChooseDate = thisYear + '-' + thisMonth
|
||||
console.log(this.currentDate)
|
||||
|
||||
let date = new Date(this.currentDate);
|
||||
date.setDate(1);
|
||||
@@ -226,10 +238,15 @@ export default {
|
||||
let lastDay1 = date.toLocaleDateString();
|
||||
this.cvaliEndDate = lastDay1.replaceAll('/','-')
|
||||
this.showDataPicker = false
|
||||
this.getOrderList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.topsearch{
|
||||
/deep/ .van-field__label{
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user