特约商户添加筛选

This commit is contained in:
HuskyOo 2022-05-12 10:22:10 +08:00
parent 046bf46262
commit c6e8e6f2e3
1 changed files with 94 additions and 6 deletions

View File

@ -1,5 +1,49 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-input
v-model="listQuery.params.name"
style="width:200px;margin-right:10px"
class="filter-item"
placeholder="姓名"
clearable
/>
<el-input
v-model="listQuery.params.phone"
style="width:200px;margin-right:10px"
class="filter-item"
placeholder="手机号"
clearable
/>
<el-input
v-model="listQuery.params.idCard"
style="width:200px;margin-right:10px"
class="filter-item"
placeholder="身份证号"
clearable
/>
<el-cascader
v-model="regionSearchVal"
class="filter-item"
style="width:240px"
:options="regions"
:props="{ checkStrictly: true }"
placeholder="行政区域"
clearable
/>
<el-checkbox
v-model="isStaff"
style="margin-left:10px"
@change="handleIsStaff"
>是否是便民工作人员</el-checkbox>
<el-button
type="primary"
style="margin-left:10px"
@click="handleSearch"
>搜索</el-button>
</div>
<!-- <el-button
type="primary"
size="mini"
@ -196,8 +240,13 @@ export default {
total: 0,
listQuery: {
lastPageIndex: 1,
// params: {},
size: 10
size: 10,
params: {
name: undefined,
phone: undefined,
idCard: undefined,
isConvenience: undefined
}
},
list: undefined,
@ -235,7 +284,10 @@ export default {
value: 'TEMPORARY'
}
],
regions: []
regions: [],
isStaff: undefined,
regionSearchVal: undefined
}
},
watch: {
@ -285,7 +337,7 @@ export default {
const countyArr = [] // ,1
tempData.map(county => {
const countyObj = {
value: county.root.id,
value: county.root.name,
label: county.root.name,
disabled: !county.root.check,
children: []
@ -293,7 +345,7 @@ export default {
countyArr.push(countyObj)
county.node.map(town => {
const townObj = {
value: town.root.id,
value: town.root.name,
label: town.root.name,
disabled: !town.root.check,
children: []
@ -301,7 +353,7 @@ export default {
countyObj.children.push(townObj)
town.node.map(country => {
townObj.children.push({
value: country.root.id,
value: country.root.name,
label: country.root.name,
disabled: !country.root.check
})
@ -392,6 +444,42 @@ export default {
// },
closeDia() {
this.diaVisible = false
},
handleIsStaff(val) {
if (val === false) {
this.listQuery.params.isConvenience === undefined
const temp = Object.assign({}, this.listQuery)
temp.params.isConvenience === undefined
this.listQuery = temp
}
},
handleSearch() {
this.listQuery.params.isConvenience = this.isStaff ? true : undefined
if (this.regionSearchVal) {
switch (this.regionSearchVal.length) {
case 1:
this.listQuery.params.PermanentResidenceRegion = this.regionSearchVal[0]
this.listQuery.params.PermanentResidenceTown = undefined
this.listQuery.params.PermanentResidenceTownShip = undefined
break
case 2:
this.listQuery.params.PermanentResidenceTown = this.regionSearchVal[1]
this.listQuery.params.PermanentResidenceRegion = undefined
this.listQuery.params.PermanentResidenceTownShip = undefined
break
case 3:
this.listQuery.params.PermanentResidenceTownShip = this.regionSearchVal[2]
this.listQuery.params.PermanentResidenceRegion = undefined
this.listQuery.params.PermanentResidenceTown = undefined
break
default:
this.listQuery.params.PermanentResidenceRegion = undefined
this.listQuery.params.PermanentResidenceTown = undefined
this.listQuery.params.PermanentResidenceTownShip = undefined
break
}
}
this.getList()
}
}
}