mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-22 11:46:44 +08:00
添加搜索,loading
This commit is contained in:
@@ -3,7 +3,11 @@
|
|||||||
<div>
|
<div>
|
||||||
<van-sticky>
|
<van-sticky>
|
||||||
<div class="list-header">
|
<div class="list-header">
|
||||||
<van-search placeholder="请输入保单号/投保人" v-model="searchVal" @search="search" />
|
<van-search placeholder="请输入保单号/投保人" v-model="searchVal" show-action>
|
||||||
|
<template slot="action">
|
||||||
|
<div @click="search">搜索</div>
|
||||||
|
</template>
|
||||||
|
</van-search>
|
||||||
</div>
|
</div>
|
||||||
<FieldDatePicter
|
<FieldDatePicter
|
||||||
@confirm="onDateConfirm"
|
@confirm="onDateConfirm"
|
||||||
@@ -78,7 +82,6 @@ export default {
|
|||||||
// 搜索内容
|
// 搜索内容
|
||||||
searchVal: '',
|
searchVal: '',
|
||||||
list: [],
|
list: [],
|
||||||
searchList: [],
|
|
||||||
active: 0,
|
active: 0,
|
||||||
isShow: false,
|
isShow: false,
|
||||||
maxDate: new Date(),
|
maxDate: new Date(),
|
||||||
@@ -99,14 +102,14 @@ export default {
|
|||||||
otherNo: this.searchVal,
|
otherNo: this.searchVal,
|
||||||
payFlag: this.active
|
payFlag: this.active
|
||||||
}
|
}
|
||||||
|
this.$toast.loading('加载中...')
|
||||||
let result = await getList(param)
|
let result = await getList(param)
|
||||||
this.list.splice(0)
|
this.list.splice(0)
|
||||||
this.list = result.list ? result.list : []
|
this.list = result.list ? result.list : []
|
||||||
},
|
},
|
||||||
// 搜索
|
// 搜索
|
||||||
search(val) {
|
search() {
|
||||||
this.searchVal = val
|
this.getpolicyList()
|
||||||
this.searchList = this.NewItems(this.active)
|
|
||||||
},
|
},
|
||||||
// 选定日期
|
// 选定日期
|
||||||
onDateConfirm(val) {
|
onDateConfirm(val) {
|
||||||
@@ -127,33 +130,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 切换扣款状态tab
|
// 切换扣款状态tab
|
||||||
tabChange(name) {
|
tabChange(name) {
|
||||||
console.log(name)
|
this.searchVal = ''
|
||||||
this.active = name
|
this.active = name
|
||||||
this.getpolicyList()
|
this.getpolicyList()
|
||||||
},
|
|
||||||
// 筛选排序list
|
|
||||||
NewItems(name) {
|
|
||||||
let _this = this
|
|
||||||
let type = ''
|
|
||||||
switch (name) {
|
|
||||||
case 'wait':
|
|
||||||
type = '0'
|
|
||||||
break
|
|
||||||
case 'success':
|
|
||||||
type = '1'
|
|
||||||
break
|
|
||||||
case 'fail':
|
|
||||||
type = '2'
|
|
||||||
}
|
|
||||||
var NewItems = []
|
|
||||||
this.list.renewallist.map(function(item) {
|
|
||||||
if (item.contNo.search(_this.searchVal) != -1 || item.applicant.search(_this.searchVal) != -1) {
|
|
||||||
if (item.deductionStatus === type) {
|
|
||||||
NewItems.push(item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return NewItems
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user