After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 730 B |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 4.1 KiB |
@ -0,0 +1,292 @@ |
|||
// subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.js
|
|||
import {getResidentBaseInfo} from "../../../../../utils/api" |
|||
import api from "../../../../../utils/api" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
selectVal:'search', |
|||
|
|||
keyWord:'张三', |
|||
lowerThreshold:'10', |
|||
loadMoreVisible:false, |
|||
loadMoreType: "none", |
|||
nodata:false, |
|||
pageNo:1, |
|||
pageSize:10, |
|||
tableData:[], |
|||
|
|||
selectedRadio:null, |
|||
resiId:"", |
|||
resiName:"", |
|||
resiMobile:"", |
|||
|
|||
villageList:[],//小区
|
|||
villageName:'', |
|||
buildingList:[], |
|||
buildingName:'', |
|||
unitList:[], |
|||
unitName:'', |
|||
houseList:[], |
|||
houseName:'', |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad(options) { |
|||
this.getTable() |
|||
this.getQuartersOptions() |
|||
|
|||
}, |
|||
getTable(){ |
|||
this.setData({ |
|||
loadMoreVisible: true, |
|||
nodata: false, |
|||
loadMoreType: "more", |
|||
}) |
|||
let parm ={ |
|||
searchKey:this.data.keyWord, |
|||
pageSize:this.data.pageSize, |
|||
pageNo:this.data.pageNo |
|||
} |
|||
getResidentBaseInfo(parm).then(res=>{ |
|||
this.setData({ |
|||
loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none', |
|||
tableData: this.data.tableData.concat(res.data.list), |
|||
}) |
|||
if (this.data.tableData.length == 0) { |
|||
this.setData({ |
|||
loadMoreVisible: false, |
|||
nodata: true |
|||
}) |
|||
} |
|||
}).catch(err=>{ |
|||
this.setData({ |
|||
loadMoreVisible: false, |
|||
nodata: true, |
|||
}) |
|||
}) |
|||
}, |
|||
onScrollToLower(e){ |
|||
if (this.data.loadMoreType === 'more') { |
|||
this.setData({ |
|||
loadMoreVisible: true, |
|||
}) |
|||
this.data.pageNo += 1 |
|||
this.getTable() |
|||
} |
|||
}, |
|||
getQuartersOptions(){ |
|||
|
|||
api.getQuartersOptions().then(res=>{ |
|||
this.setData({ |
|||
villageList:res.data |
|||
}) |
|||
}).catch(err=>{ |
|||
console.log(err); |
|||
}) |
|||
}, |
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage() { |
|||
|
|||
}, |
|||
chosseTabBar(e){ |
|||
this.setData({ |
|||
selectVal:e.currentTarget.dataset.type |
|||
}) |
|||
}, |
|||
handelBlurKeyWord(e){ |
|||
this.setData({ |
|||
keyWord:e.detail.value |
|||
}) |
|||
}, |
|||
handelClickSearch(){ |
|||
this.setData({ |
|||
pageNo:1, |
|||
tableData:[] |
|||
}) |
|||
this.getTable() |
|||
}, |
|||
toAddResi(){ |
|||
wx.navigateTo({ |
|||
url: '/subpages/addResi/pages/addResi/addResi', |
|||
}) |
|||
}, |
|||
radioChange(e) { |
|||
console.log(e); |
|||
this.setData({ |
|||
selectedRadio: e.detail.value, |
|||
resiId:e.currentTarget.dataset.item.resiId, |
|||
resiName:e.currentTarget.dataset.item.name, |
|||
resiMobile:e.currentTarget.dataset.item.mobile, |
|||
}); |
|||
}, |
|||
bindPickerChangevillageId(e) { |
|||
const selectedIndex = e.detail.value; |
|||
const selectedVillage = this.data.villageList[selectedIndex]; |
|||
this.setData({ |
|||
villageName: selectedVillage.label, |
|||
"form.villageId": selectedVillage.value, |
|||
'form.buildId':'', |
|||
'form.unitId':'', |
|||
'form.homeId':'', |
|||
buildingName:'', |
|||
buildingList:[], |
|||
unitName:'', |
|||
unitList:[], |
|||
houseName:'', |
|||
houseList:[], |
|||
}); |
|||
this.getBuildingoption(selectedVillage.value); |
|||
}, |
|||
|
|||
bindPickerChangebuilding(e){ |
|||
|
|||
const selectedIndex = e.detail.value; |
|||
const selectedVillage = this.data.buildingList[selectedIndex]; |
|||
this.setData({ |
|||
buildingName: selectedVillage.label, |
|||
"form.buildId": selectedVillage.value, |
|||
'form.unitId':'', |
|||
'form.homeId':'', |
|||
unitName:'', |
|||
unitList:[], |
|||
houseName:'', |
|||
houseList:[], |
|||
}); |
|||
this.getUnitoption(selectedVillage.value); |
|||
}, |
|||
bindPickerChangeUnit(e){ |
|||
|
|||
const selectedIndex = e.detail.value; |
|||
const selectedVillage = this.data.unitList[selectedIndex]; |
|||
this.setData({ |
|||
unitName: selectedVillage.label, |
|||
"form.unitId": selectedVillage.value, |
|||
'form.homeId':'', |
|||
houseName:'', |
|||
houseList:[], |
|||
}); |
|||
this.getHouseoption(selectedVillage.value); |
|||
}, |
|||
bindPickerChangeHouse(e){ |
|||
const selectedIndex = e.detail.value; |
|||
console.log( this.data.houseList); |
|||
const selectedVillage = this.data.houseList[selectedIndex]; |
|||
this.setData({ |
|||
houseName: selectedVillage.label, |
|||
"form.homeId": selectedVillage.value |
|||
}); |
|||
this.getResidentBaseInfo() |
|||
}, |
|||
bindPickerChangeResi(e){ |
|||
const selectedIndex = e.detail.value; |
|||
const selectedVillage = this.data.resiList[selectedIndex]; |
|||
console.log(selectedVillage); |
|||
this.setData({ |
|||
resiName: selectedVillage.name, |
|||
resiMobile:selectedVillage.mobile, |
|||
resiId:selectedVillage.resiId, |
|||
}); |
|||
}, |
|||
// 获取楼栋列表
|
|||
getBuildingoption(villageId){ |
|||
api.getBuildingoption(villageId).then(res=>{ |
|||
this.setData({ |
|||
buildingList:res.data |
|||
}) |
|||
}).catch(err=>{ |
|||
console.log(err); |
|||
}) |
|||
}, |
|||
// 获取单元列表
|
|||
getUnitoption(buildingId){ |
|||
api.getUnitoption(buildingId).then(res=>{ |
|||
this.setData({ |
|||
unitList:res.data |
|||
}) |
|||
}).catch(err=>{ |
|||
console.log(err); |
|||
}) |
|||
}, |
|||
// 获取房屋列表
|
|||
getHouseoption(unitId){ |
|||
api.getHouseoption(unitId).then(res=>{ |
|||
this.setData({ |
|||
houseList:res.data |
|||
}) |
|||
}).catch(err=>{ |
|||
console.log(err); |
|||
}) |
|||
}, |
|||
getResidentBaseInfo(){ |
|||
let parm = { |
|||
pageNo:1, |
|||
pageSize:1000, |
|||
villageId:this.data.form.villageId, |
|||
buildId:this.data.form.buildId, |
|||
unitId:this.data.form.unitId, |
|||
homeId:this.data.form.homeId, |
|||
} |
|||
api.getResidentBaseInfoPage(parm).then(res=>{ |
|||
this.setData({ |
|||
resiList:res.data.list |
|||
}) |
|||
}).catch(err=>{ |
|||
console.log(err); |
|||
}) |
|||
}, |
|||
toDemandCheck(){ |
|||
console.log(111); |
|||
wx.navigateTo({ |
|||
url: '/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck?resiId=' + this.data.resiId + '&mobile=' + this.data.resiMobile + "&resiName=" + this.data.resiName, |
|||
}) |
|||
} |
|||
}) |
@ -0,0 +1,7 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"load-more": "../../../../../components/loadMore/loadMore", |
|||
"no-data": "../../../../../components/noData/nodata" |
|||
}, |
|||
"navigationBarTitleText": "选择居民" |
|||
} |
@ -0,0 +1,109 @@ |
|||
<view class="header"> |
|||
<view class="selectBar"> |
|||
<view bind:tap="chosseTabBar" class="{{selectVal == 'search'?'search-select':''}}" data-type="search" hover-stay-time="300" hover-class="hover-tabbar">查询居民</view> |
|||
<view bind:tap="chosseTabBar" class="{{selectVal == 'filter'?'filter-select':''}}" data-type="filter" hover-stay-time="300" hover-class="hover-tabbar">选择居民</view> |
|||
<view bind:tap="chosseTabBar" class="{{selectVal == 'card'?'card-select':''}}" data-type="card" hover-stay-time="300" hover-class="hover-tabbar">身份证识别</view> |
|||
<image class="selectBarImg {{selectVal=='search'?'search-select':selectVal == 'filter'?'filter-select':'card-select'}}" src="../../../images/selct.png" mode=""/> |
|||
</view> |
|||
<view class="inout_box" wx:if="{{selectVal == 'search'}}"> |
|||
<image src="../../../../../images/work/search.png" mode=""/> |
|||
<input type="text" placeholder="姓名/手机/身份证/住址等任意组合关键词" bindinput="handelBlurKeyWord" bindblur="handelBlurKeyWord" value="{{keyWord}}" /> |
|||
<view class="btn_box" bind:tap="handelClickSearch"><text>搜索</text></view> |
|||
</view> |
|||
</view> |
|||
<view wx:if="{{selectVal == 'search'}}"> |
|||
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower"> |
|||
<view class="card"> |
|||
<view class="list_card" wx:for="{{tableData}}" wx:key="index" data-item="{{item}}"> |
|||
<view class="radio" style="margin-right: 30rpx;"> |
|||
<!-- <radio value="{{index}}" color="#3f92fe"/> --> |
|||
<radio-group bindchange="radioChange" data-item="{{item}}"> |
|||
<radio name="userRadioGroup" value="{{index}}" checked="{{selectedRadio == index}}" color="#3f92fe" /> |
|||
</radio-group> |
|||
</view> |
|||
<view class="left"> |
|||
<view > {{item.name}} {{item.mobile}}</view> |
|||
<view class="address">地址:{{item.homeName}}</view> |
|||
</view> |
|||
<view class="right"> |
|||
<image src="../../../../../../images/right.png" mode=""/> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view wx:if="{{loadMoreVisible}}" class="loadVisible">{{loadMoreVisible?'如果找不到该居民的信息,您也可以先':'加载中...'}}<text wx:if="{{loadMoreVisible}}" style="color: #3A80E7;" bind:tap="toAddResi">新增居民</text></view> |
|||
</scroll-view> |
|||
</view> |
|||
<view wx:if="{{selectVal == 'filter'}}" > |
|||
<view class="form_card"> |
|||
<view class="form_item"> |
|||
<view class="label" style="width: 240rpx;"> |
|||
<view class="title">需求人所在小区</view> |
|||
</view> |
|||
<view class="input"> |
|||
<picker bindchange="bindPickerChangevillageId" range-key="label" value="{{index}}" range="{{villageList}}"> |
|||
<view class="{{villageName?'':'gray'}}"> |
|||
{{villageName?villageName:'请选择'}} |
|||
</view> |
|||
</picker> |
|||
<image src="../../../../../images/right.png" mode=""/> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label"> |
|||
<view class="title">所在楼栋</view> |
|||
</view> |
|||
<view class="input"> |
|||
<picker bindchange="bindPickerChangebuilding" range-key="label" value="{{index}}" range="{{buildingList}}"> |
|||
<view class="{{buildingName?'':'gray'}}"> |
|||
{{buildingName?buildingName:'请选择'}} |
|||
</view> |
|||
</picker> |
|||
<image src="../../../../../images/right.png" mode=""/> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label"> |
|||
<view class="title">所在单元</view> |
|||
</view> |
|||
<view class="input"> |
|||
<picker bindchange="bindPickerChangeUnit" range-key="label" value="{{index}}" range="{{unitList}}"> |
|||
<view class="{{unitName?'':'gray'}}"> |
|||
{{unitName?unitName:'请选择'}} |
|||
</view> |
|||
</picker> |
|||
<image src="../../../../../images/right.png" mode=""/> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label "> |
|||
<view class="title">门牌号</view> |
|||
</view> |
|||
<view class="input"> |
|||
<picker bindchange="bindPickerChangeHouse" range-key="label" value="{{index}}" range="{{houseList}}"> |
|||
<view class="{{houseName?'':'gray'}}"> |
|||
{{houseName?houseName:'请选择'}} |
|||
</view> |
|||
</picker> |
|||
<image src="../../../../../images/right.png" mode=""/> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label "> |
|||
<view class="title">居民姓名</view> |
|||
</view> |
|||
<view class="input"> |
|||
<picker bindchange="bindPickerChangeResi" range-key="name" value="{{index}}" range="{{resiList}}"> |
|||
<view class="{{resiName?'':'gray'}}"> |
|||
{{resiName?resiName:'请选择'}} |
|||
</view> |
|||
</picker> |
|||
<image src="../../../../../images/right.png" mode=""/> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view wx:if="{{loadMoreVisible}}" class="loadVisible">{{loadMoreVisible?'如果找不到该居民的信息,您也可以先':'加载中...'}}<text wx:if="{{loadMoreVisible}}" style="color: #3A80E7;" bind:tap="toAddResi">新增居民</text></view> |
|||
</view> |
|||
<view wx:if="{{selectVal == 'card'}}"> |
|||
身份证识别 |
|||
</view> |
|||
<button class="fixed_btn" bind:tap="toDemandCheck" hover-class="white">{{type=='card'?'开始识别':'确 定'}}</button> |
@ -0,0 +1,251 @@ |
|||
/* subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxss */ |
|||
page{ |
|||
width: 100%; |
|||
height: 100%; |
|||
overflow: hidden; |
|||
background-color: #f7f7f7; |
|||
} |
|||
.white{ |
|||
color: white; |
|||
} |
|||
.header{ |
|||
min-height: 90rpx; |
|||
display: flex; |
|||
flex-direction: column; |
|||
background-color: #ffff; |
|||
padding: 0 20rpx; |
|||
box-sizing: border-box; |
|||
overflow: hidden; |
|||
} |
|||
.header .selectBar{ |
|||
display: flex; |
|||
justify-content: space-around; |
|||
position: relative; |
|||
align-items: center; |
|||
} |
|||
.header .selectBarImg{ |
|||
position: absolute; |
|||
bottom: -15rpx; |
|||
left: 0; |
|||
width: 140rpx; |
|||
height: 14rpx; |
|||
transition: left 0.5s ease; |
|||
} |
|||
.header .selectBar .search-select{ |
|||
left: 6%; |
|||
transition: left 0.5s ease; |
|||
color: #3A80E7; |
|||
} |
|||
.header .selectBar .filter-select{ |
|||
left: 38%; |
|||
transition: left 0.5s ease; |
|||
color: #3A80E7; |
|||
} |
|||
.header .selectBar .card-select{ |
|||
left: 72%; |
|||
transition: left 0.5s ease; |
|||
color: #3A80E7; |
|||
} |
|||
.header .inout_box { |
|||
position: relative; |
|||
margin: 40rpx 0 20rpx; |
|||
} |
|||
.header .inout_box input{ |
|||
width: auto; |
|||
background: #F5F5FA; |
|||
border-radius: 47rpx; |
|||
padding:0 100rpx 0 69rpx; |
|||
height: 76rpx; |
|||
font-size: 26rpx; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
} |
|||
.header .inout_box image{ |
|||
position: absolute; |
|||
left: 21rpx; |
|||
top: 24rpx; |
|||
width: 30rpx; |
|||
height: 30rpx; |
|||
} |
|||
.header .inout_box .btn_box{ |
|||
width: 110rpx; |
|||
height: 50rpx; |
|||
position: absolute; |
|||
top: 15rpx; |
|||
right:-10rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
.header .inout_box .btn_box text{ |
|||
width: 80rpx; |
|||
height: 30rpx; |
|||
line-height: 30rpx; |
|||
font-size: 28rpx; |
|||
box-sizing: border-box; |
|||
color:#3A80E7; |
|||
padding-left: 15rpx; |
|||
border-left:2rpx #3A80E7 solid ; |
|||
} |
|||
.scroll { |
|||
height: calc(100vh - 250rpx); |
|||
overflow-y: scroll; |
|||
margin-top: 20rpx; |
|||
} |
|||
.scroll .card{ |
|||
background-color: #fff; |
|||
border-radius: 20rpx; |
|||
padding: 0 30rpx; |
|||
box-sizing: border-box; |
|||
} |
|||
button{ |
|||
width: 360rpx; |
|||
height: 76rpx; |
|||
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%); |
|||
border-radius: 76rpx !important; |
|||
font-size: 32rpx; |
|||
font-weight: 400 !important; |
|||
font-family: PingFang SC; |
|||
color: #FFFFFF; |
|||
position: fixed; |
|||
bottom: 63rpx; |
|||
left: 50%; |
|||
transform: translateX(-180rpx); |
|||
} |
|||
.fixed_btn{ |
|||
position: fixed; |
|||
bottom: 30rpx; |
|||
left: 50%; |
|||
transform: translateX(-184rpx); |
|||
} |
|||
|
|||
.scroll .card{ |
|||
background-color: #fff; |
|||
border-radius: 0 0 20rpx 20rpx; |
|||
padding: 0 30rpx; |
|||
box-sizing: border-box; |
|||
} |
|||
.card .list_card{ |
|||
display: flex; |
|||
justify-content: space-around; |
|||
padding: 30rpx 0; |
|||
align-items: center; |
|||
color: #333333; |
|||
border-top: 1px solid #f7f7f7; |
|||
} |
|||
.card .list_card .left{ |
|||
flex: 1; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: space-between; |
|||
font-size: 32rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
} |
|||
.card .list_card .left :nth-child(1), |
|||
.card .list_card .left :nth-child(2){ |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
} |
|||
.card .list_card .left .address{ |
|||
font-size: 28rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #999999; |
|||
margin-top: 29rpx; |
|||
} |
|||
.list_card .right image{ |
|||
width: 20rpx; |
|||
height: 20rpx; |
|||
} |
|||
.loadVisible{ |
|||
color: #c1c1c1; |
|||
font-size: 24rpx; |
|||
width: 100%; |
|||
text-align: center; |
|||
margin-top: 20rpx; |
|||
} |
|||
|
|||
.form_card { |
|||
background-color: #fff; |
|||
border-radius: 10rpx; |
|||
padding: 0 30rpx; |
|||
box-sizing: border-box; |
|||
height: auto; |
|||
} |
|||
.form_card > .title{ |
|||
height: 90rpx; |
|||
line-height: 90rpx; |
|||
font-size: 34rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
position: relative; |
|||
} |
|||
.form_card .title .tag{ |
|||
width: 10rpx; |
|||
height: 28rpx; |
|||
background: #3A80E7; |
|||
border-radius: 4rpx; |
|||
position: absolute; |
|||
left: -30rpx; |
|||
top: 50%; |
|||
transform: translateY(-14rpx); |
|||
} |
|||
.form_card .form_item{ |
|||
display: flex; |
|||
align-items: center; |
|||
border-top: 1px solid #EAEAEA; |
|||
height: 100rpx; |
|||
} |
|||
.form_card .form_house{ |
|||
height: 139rpx; |
|||
display: flex; |
|||
flex-direction: column; |
|||
} |
|||
.form_card .form_house .form_bottom{ |
|||
font-size: 24rpx; |
|||
color:#C1C1C1; |
|||
position: relative; |
|||
top: -10rpx; |
|||
} |
|||
|
|||
.form_card .form_item .label{ |
|||
width: 130rpx; |
|||
height: 100%; |
|||
line-height: 100rpx; |
|||
font-size: 32rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #666666; |
|||
position: relative; |
|||
} |
|||
|
|||
.form_card .form_item .input{ |
|||
flex: 1; |
|||
display: flex; |
|||
justify-content: space-around; |
|||
align-items: center; |
|||
margin-left: 51rpx; |
|||
overflow: hidden; |
|||
|
|||
} |
|||
.form_card .form_item .input .residentCategorySty{ |
|||
flex: 1; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
} |
|||
.form_card .form_item .input picker, |
|||
.form_card .form_item .input input{ |
|||
flex: 1; |
|||
} |
|||
.form_card .form_item .input image{ |
|||
height: 22rpx; |
|||
width: 22rpx; |
|||
} |