20 changed files with 1270 additions and 24 deletions
@ -1,3 +1,4 @@ |
|||
{ |
|||
"usingComponents": {} |
|||
"usingComponents": {}, |
|||
"navigationStyle": "custom" |
|||
} |
@ -1,2 +1,173 @@ |
|||
<!--subpages/addhouse/pages/addhouse/addhouse.wxml--> |
|||
<text>subpages/addhouse/pages/addhouse/addhouse.wxml</text> |
|||
<view class="header"> |
|||
<image src="../../../../images/back.png" class="back" style=" top: {{statusHeight}}px;width: 30rpx;height: 30rpx;" bindtap="back" mode=""/> |
|||
<image class="header-bg" src="../images/header.png" mode="widthFix" /> |
|||
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;"> |
|||
{{formType == 'edit'?'修改房屋信息':'新增房屋信息'}} |
|||
</view> |
|||
<view class="content"> |
|||
<view class="h2">填写房屋信息</view> |
|||
<view class="tag"> 带 <b>*</b> 号为必填项</view> |
|||
</view> |
|||
</view> |
|||
<view class="content"> |
|||
<view class="form_card"> |
|||
<view class="title"><text class="tag"></text> 基本信息</view> |
|||
<view class="form_item"> |
|||
<view class="label"> |
|||
<text class="must">*</text> |
|||
<view class="title">所在网格</view> |
|||
</view> |
|||
<view class="input"> |
|||
<picker bindchange="bindPickerChangeGrid" range-key="label" value="{{index}}" range="{{gridList}}"> |
|||
<view class="{{gridName?'':'gray'}}"> |
|||
{{gridName?gridName:'请选择'}} |
|||
</view> |
|||
</picker> |
|||
<image src="../../../../images/right.png" mode=""/> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label"> |
|||
<text class="must">*</text> |
|||
<view class="title">所在小区</view> |
|||
</view> |
|||
<view class="input"> |
|||
<picker bindchange="bindPickerChangeneighborHoodId" range-key="label" value="{{index}}" range="{{neighborHoodIdList}}"> |
|||
<view class="{{neighborHoodIdName?'':'gray'}}"> |
|||
{{neighborHoodIdName?neighborHoodIdName:'请选择'}} |
|||
</view> |
|||
</picker> |
|||
<image src="../../../../images/right.png" mode=""/> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label"> |
|||
<text class="must">*</text> |
|||
<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"> |
|||
<text class="must">*</text> |
|||
<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 "> |
|||
<text class="must">*</text> |
|||
<view class="title">门牌号</view> |
|||
</view> |
|||
<view class="input"> |
|||
<input confirm-type="next" bindblur="bindDoorNameInput" bindinput="bindDoorNameInput" value="{{form.doorName}}" placeholder-class="gray" placeholder="请输入" /> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label "> |
|||
<text class="must">*</text> |
|||
<view class="title">房屋编码</view> |
|||
</view> |
|||
<view class="input"> |
|||
<input confirm-type="next" bindblur="bindsysCodingInput" bindinput="bindsysCodingInput" value="{{form.coding}}" placeholder-class="gray" placeholder="请输入" /> |
|||
<view class="right_btn" bind:tap="handelClickSysCoding">生成</view> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label"> |
|||
<text class="must">*</text> |
|||
<view class="title">房屋类型</view> |
|||
</view> |
|||
<view class="input"> |
|||
<picker bindchange="bindPickerChangehouseType" range-key="label" value="{{index}}" range="{{houseTypeList}}"> |
|||
<view class="{{form.houseType?'':'gray'}}"> |
|||
{{form.houseType?houseTypeList[form.houseType - 1].label:'请选择'}} |
|||
</view> |
|||
</picker> |
|||
<image src="../../../../images/right.png" mode=""/> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label"> |
|||
<text class="must">*</text> |
|||
<view class="title">房屋用途</view> |
|||
</view> |
|||
<view class="input"> |
|||
<picker bindchange="bindPickerChangePurpose" range-key="label" value="{{index}}" range="{{purposeList}}"> |
|||
<view class="{{form.purpose?'':'gray'}}"> |
|||
{{form.purpose?purposeList[form.purpose - 1].label:'请选择'}} |
|||
</view> |
|||
</picker> |
|||
<image src="../../../../images/right.png" mode=""/> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label"> |
|||
<text class="must">*</text> |
|||
<view class="title">房屋状态</view> |
|||
</view> |
|||
<view class="input"> |
|||
<picker bindchange="bindPickerChangeRentFlag" range-key="label" value="{{index}}" range="{{rentFlagList}}"> |
|||
<view class="{{form.rentFlag!=null?'':'gray'}}"> |
|||
{{form.rentFlag!=null?rentFlagList[form.rentFlag].label:'请选择'}} |
|||
</view> |
|||
</picker> |
|||
<image src="../../../../images/right.png" mode=""/> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label"> |
|||
<!-- <text class="must">*</text> --> |
|||
<view class="title">房主姓名</view> |
|||
</view> |
|||
<view class="input"> |
|||
<input confirm-type="next" bindblur="bindOwnerNameInput" bindinput="bindOwnerNameInput" value="{{form.ownerName}}" placeholder-class="gray" placeholder="请输入" /> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label"> |
|||
<!-- <text class="must">*</text> --> |
|||
<view class="title">房主电话</view> |
|||
</view> |
|||
<view class="input"> |
|||
<input confirm-type="next" bindblur="bindOwnerPhoneInput" bindinput="bindOwnerPhoneInput" value="{{form.ownerPhone}}" placeholder-class="gray" placeholder="请输入" /> |
|||
</view> |
|||
</view> |
|||
<view class="form_item"> |
|||
<view class="label"> |
|||
<!-- <text class="must">*</text> --> |
|||
<view class="title">证件号</view> |
|||
</view> |
|||
<view class="input"> |
|||
<input confirm-type="next" bindblur="bindOwnerIdCardInput" bindinput="bindOwnerIdCardInput" value="{{form.ownerIdCard}}" placeholder-class="gray" placeholder="请输入" /> |
|||
</view> |
|||
</view> |
|||
<view class="form_textarea"> |
|||
<view class="label"> |
|||
<view class="title">备注</view> |
|||
</view> |
|||
<view class="1"> |
|||
<view class="textarea"> |
|||
<textarea class="input" placeholder-style="color: #C1C1C1;" value="{{form.remark}}" bindblur="bindRemarkInput" bindinput="bindRemarkInput" maxlength="100" placeholder-class="gray" placeholder="不超过100字" /> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
</view> |
|||
<view class="bottom_btn" bind:tap="submit">提交</view> |
|||
</view> |
|||
|
@ -1 +1,193 @@ |
|||
/* subpages/addhouse/pages/addhouse/addhouse.wxss */ |
|||
page { |
|||
width: 100%; |
|||
min-height: 100vh; |
|||
overflow-y: auto; |
|||
background-color: #f7f7f7; |
|||
} |
|||
.gray{ |
|||
color: #C1C1C1; |
|||
} |
|||
.m-top20{ |
|||
margin-top: 20rpx; |
|||
} |
|||
.header { |
|||
width: 100%; |
|||
height: 444rpx; |
|||
overflow: hidden; |
|||
/* position: fixed; |
|||
top: 0; |
|||
left: 0; |
|||
z-index: 1000; */ |
|||
} |
|||
.header .header-bg { |
|||
width: 100%; |
|||
height: 444rpx; |
|||
position: absolute; |
|||
height: 100%; |
|||
z-index: -999; |
|||
} |
|||
.back { |
|||
width: 30rpx; |
|||
height: 30rpx; |
|||
margin-left: 20rpx; |
|||
position: absolute; |
|||
margin-top: 20rpx; |
|||
border-radius: 0rpx; |
|||
z-index: 101; |
|||
} |
|||
.header .navigation { |
|||
width: 100%; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
color: #333333; |
|||
font-size: 32rpx; |
|||
position: relative; |
|||
z-index: 100; |
|||
} |
|||
.header .content{ |
|||
margin: 140rpx 0 0 69rpx; |
|||
} |
|||
.header .content .h2{ |
|||
font-size: 44rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 800; |
|||
color: #333333; |
|||
margin-bottom: 28rpx; |
|||
} |
|||
.header .content .tag{ |
|||
width: 200rpx; |
|||
height: 50rpx; |
|||
position: relative; |
|||
line-height: 48rpx; |
|||
font-size: 28rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #94A6C2; |
|||
padding-left: 15rpx; |
|||
} |
|||
.header .content .tag b { |
|||
color: #FF2A00; |
|||
} |
|||
.header .content .tag image { |
|||
width: 170rpx; |
|||
height: 50rpx; |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
z-index: -888; |
|||
} |
|||
.content{ |
|||
width: 100%; |
|||
height: auto; |
|||
padding: 0 20rpx; |
|||
box-sizing: border-box; |
|||
position: relative; |
|||
top: -60rpx; |
|||
} |
|||
.form_card { |
|||
background-color: #fff; |
|||
border-radius: 10rpx; |
|||
padding: 0 30rpx 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_textarea{ |
|||
border-top: 1px solid #EAEAEA; |
|||
} |
|||
.form_card .form_textarea .input{ |
|||
background-color: #f7f7f7; |
|||
border-radius: 20rpx; |
|||
padding:27rpx ; |
|||
} |
|||
.form_card .form_item .label, |
|||
.form_card .form_textarea .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 .label .must{ |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: #FF2A00; |
|||
position: absolute; |
|||
left: -18rpx; |
|||
top: 50%; |
|||
transform: translateY(-50rpx); |
|||
} |
|||
.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 .right_btn{ |
|||
height: 56rpx; |
|||
line-height: 26rpx; |
|||
font-size: 28rpx; |
|||
padding: 15rpx 27rpx; |
|||
width: fit-content; |
|||
color: #fff; |
|||
background-color: #3A80E7; |
|||
border-radius: 27rpx; |
|||
box-sizing: border-box; |
|||
} |
|||
.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; |
|||
} |
|||
.bottom_btn{ |
|||
width: 600rpx; |
|||
height: 86rpx; |
|||
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%); |
|||
border-radius: 43rpx; |
|||
text-align: center; |
|||
color: #fff; |
|||
margin: 30rpx auto 0; |
|||
line-height: 86rpx; |
|||
} |
After Width: | Height: | Size: 359 KiB |
@ -0,0 +1,117 @@ |
|||
// subpages/searchResult/pages/searchRecords/searchRecords.js
|
|||
const app = getApp() |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
SearchRecordsList:[], |
|||
keyWord:'' |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad(options) { |
|||
this.setData({ |
|||
statusHeight: app.globalData.deviceInfo.statusHeight, |
|||
navigationHeight: app.globalData.deviceInfo.navigationHeight, |
|||
}) |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow() { |
|||
this.setData({ |
|||
SearchRecordsList:wx.getStorageSync('searchRecords') || [] |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage() { |
|||
|
|||
}, |
|||
handelClickSearch(e){ |
|||
if(!this.data.keyWord) { |
|||
wx.showToast({ |
|||
title: '请输入查询内容', |
|||
icon:'none' |
|||
}) |
|||
return |
|||
} |
|||
wx.navigateTo({ |
|||
url: `/subpages/searchResult/pages/searchResult/searchResult?type='house&keyWord=${this.data.keyWord}`, |
|||
}) |
|||
// 获取当前的搜索记录
|
|||
let records = wx.getStorageSync('searchRecords') || []; |
|||
// 检查关键词是否已存在于记录中,如果存在,则先移除它(这样我们可以将其放到数组的前面)
|
|||
const index = records.indexOf(this.data.keyWord); |
|||
if (index > -1) { |
|||
records.splice(index, 1); |
|||
} |
|||
// 将新的关键词添加到记录的开始
|
|||
records.unshift(this.data.keyWord); |
|||
// 为了避免本地存储数据太大,您可以限制记录的数量,例如最多保存10条
|
|||
if (records.length > 10) { |
|||
records.pop(); |
|||
} |
|||
// 保存更新后的搜索记录
|
|||
wx.setStorageSync('searchRecords', records); |
|||
}, |
|||
handelBlurKeyWord(e){ |
|||
this.setData({ |
|||
keyWord: e.detail.value |
|||
}) |
|||
}, |
|||
handelClickSearchRecordsList(e){ |
|||
wx.navigateTo({ |
|||
url: `/subpages/searchResult/pages/searchResult/searchResult?type=house&keyWord=${e.currentTarget.dataset.value}`, |
|||
}) |
|||
}, |
|||
handelDelete(){ |
|||
wx.removeStorageSync('searchRecords'); |
|||
this.setData({ |
|||
SearchRecordsList:[] |
|||
}) |
|||
} |
|||
}) |
@ -0,0 +1,4 @@ |
|||
{ |
|||
"usingComponents": {}, |
|||
"navigationStyle": "custom" |
|||
} |
@ -0,0 +1,15 @@ |
|||
<view class="header"> |
|||
<image src="../../../../images/back.png" class="back" style=" top: {{statusHeight}}px;width: 30rpx;height: 30rpx;" bindtap="back" mode=""/> |
|||
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;"> |
|||
搜索历史 |
|||
</view> |
|||
</view> |
|||
<view class="inout_box"> |
|||
<image src="../../../../images/work/search.png" mode=""/> |
|||
<input type="text" placeholder="{{setlectVal == 'resi'?'姓名/手机/身份证/住址等任意组合关键词':'输入小区/楼栋/单元/门牌号/房主等任意组合关键词'}}" bindblur="handelBlurKeyWord" value="{{keyWord}}" /> |
|||
<view class="btn_box" bind:tap="handelClickSearch">搜索</view> |
|||
</view> |
|||
<view class="h2"> <view>搜索历史</view> <view class="right" bind:tap="handelDelete"><image src="../../../../images/delete.png" mode=""/>清空记录</view></view> |
|||
<view class="flex"> |
|||
<view class="item" wx:for="{{SearchRecordsList}}" wx:key="index" bind:tap="handelClickSearchRecordsList" data-value='{{item}}'> {{item}}</view> |
|||
</view> |
@ -0,0 +1,126 @@ |
|||
/* subpages/searchResult/pages/searchRecords/searchRecords.wxss */ |
|||
page { |
|||
width: 100%; |
|||
min-height: 100vh; |
|||
overflow: hidden; |
|||
background-color: #f7f7f7; |
|||
} |
|||
.header { |
|||
width: 100%; |
|||
height: 150rpx; |
|||
background: linear-gradient(180deg, #7DB5FF 0%,#F7F7F7 100%); |
|||
box-sizing: border-box; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.header .header-bg { |
|||
width: 100%; |
|||
height: 100%; |
|||
/* position: absolute; |
|||
z-index: 10; |
|||
left: 0; |
|||
top: 0; */ |
|||
position: absolute; |
|||
height: 100%; |
|||
z-index: -999; |
|||
} |
|||
|
|||
.header .navigation { |
|||
width: 100%; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
font-size: 32rpx; |
|||
position: relative; |
|||
z-index: 1; |
|||
} |
|||
.inout_box { |
|||
position: relative; |
|||
margin-top: 47rpx; |
|||
padding: 0 20rpx; |
|||
box-sizing: border-box; |
|||
} |
|||
.inout_box input{ |
|||
width: auto; |
|||
border-radius: 47rpx; |
|||
padding:0 110rpx 0 69rpx; |
|||
height: 76rpx; |
|||
font-size: 26rpx; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
border:1rpx #1472eb solid; |
|||
} |
|||
.inout_box image{ |
|||
position: absolute; |
|||
left: 40rpx; |
|||
top: 24rpx; |
|||
width: 30rpx; |
|||
height: 30rpx; |
|||
} |
|||
.inout_box .btn_box{ |
|||
width: 69rpx; |
|||
height: 30rpx; |
|||
line-height: 30rpx; |
|||
position: absolute; |
|||
top: 24rpx; |
|||
right:30rpx; |
|||
font-size: 28rpx; |
|||
color:#3A80E7; |
|||
padding-left: 15rpx; |
|||
border-left:2rpx #3A80E7 solid ; |
|||
} |
|||
.back { |
|||
width: 30rpx; |
|||
height: 30rpx; |
|||
margin-left: 20rpx; |
|||
position: absolute; |
|||
margin-top: 25rpx; |
|||
border-radius: 0rpx; |
|||
z-index: 2; |
|||
} |
|||
.h2{ |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
width: 100%; |
|||
padding: 0 20rpx; |
|||
margin-top: 20rpx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
box-sizing: border-box; |
|||
} |
|||
|
|||
.h2 .right { |
|||
display: flex; |
|||
align-items: center; |
|||
color:#d8d8d8 ; |
|||
} |
|||
.h2 .right image{ |
|||
width: 40rpx; |
|||
height: 40rpx; |
|||
} |
|||
|
|||
.flex{ |
|||
width: 100%; |
|||
height: auto; |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
margin-top:30rpx ; |
|||
padding: 0 20rpx; |
|||
} |
|||
.flex view{ |
|||
padding: 10rpx 16rpx; |
|||
height: 40rpx; |
|||
line-height: 20rpx; |
|||
width: fit-content; |
|||
text-overflow: ellipsis; |
|||
font-size: 28rpx; |
|||
white-space: nowrap; |
|||
background: linear-gradient(0deg, #579EFD 0%, #408DF3 100%); |
|||
opacity: 0.9; |
|||
border-radius: 20rpx; |
|||
box-sizing: border-box; |
|||
margin:0 0rpx 10rpx 20rpx; |
|||
color: #fff; |
|||
} |
Loading…
Reference in new issue