修改bug
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
<scroll-view scroll-y class="form-box">
|
||||
<view class="form-item">
|
||||
<text class="label">住户名称</text>
|
||||
<input class="input" v-model="form.name" placeholder="请输入真实姓名" placeholder-class="ph" maxlength="20"/>
|
||||
<input class="input" v-model="form.name" @input="onNameInput" placeholder="请输入真实姓名" placeholder-class="ph" maxlength="20"/>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">证件号码</text>
|
||||
<input class="input" v-model="form.cardNo" placeholder="请输入证件号码" placeholder-class="ph" maxlength="18"/>
|
||||
<input class="input" v-model="form.cardNo" @input="onCardNoInput" placeholder="请输入证件号码" placeholder-class="ph" maxlength="18"/>
|
||||
</view>
|
||||
|
||||
<view class="form-item arrow-item" @click="openRelation">
|
||||
@@ -507,6 +507,24 @@
|
||||
}
|
||||
|
||||
|
||||
// 住户名称输入过滤:只允许中文和字母
|
||||
const onNameInput = (e) => {
|
||||
const val = e.detail.value || ''
|
||||
const filtered = val.replace(/[^一-龥a-zA-Z]/g, '')
|
||||
if (filtered !== val) {
|
||||
form.name = filtered
|
||||
}
|
||||
}
|
||||
|
||||
// 证件号码输入过滤:只允许字母和数字
|
||||
const onCardNoInput = (e) => {
|
||||
const val = e.detail.value || ''
|
||||
const filtered = val.replace(/[^a-zA-Z0-9]/g, '')
|
||||
if (filtered !== val) {
|
||||
form.cardNo = filtered
|
||||
}
|
||||
}
|
||||
|
||||
const openCardType = () => {
|
||||
showCardType.value = true
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<view class="info-row">
|
||||
<text class="info-label">证件类型</text>
|
||||
<text
|
||||
class="info-value">{{form.idCardType=='0'?'居民身份证':form.idCardType=='1'?'护照':form.idCardType=='2'?'其他':''}}</text>
|
||||
class="info-value">{{form.idCardType=='0'?'居民身份证':form.idCardType=='1'?'护照':form.idCardType=='2'?'港澳通行证':''}}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">证件号码</text>
|
||||
@@ -79,7 +79,7 @@
|
||||
<view class="info-row">
|
||||
<text class="info-label">与业主关系</text>
|
||||
<text
|
||||
class="info-value">{{form.ownerRelationship=='0'?'本人':form.ownerRelationship=='1'?'配偶':form.ownerRelationship=='2'?'父母':form.ownerRelationship=='3'?'子女':form.ownerRelationship=='4'?'亲属':form.ownerRelationship=='5'?'租户':form.ownerRelationship=='6'?'其他':''}}</text>
|
||||
class="info-value">{{form.ownerRelationship=='0'?'业主本人':form.ownerRelationship=='1'?'亲属':form.ownerRelationship=='2'?'租户':form.ownerRelationship=='3'?'朋友':''}}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">手机号码</text>
|
||||
|
||||
Reference in New Issue
Block a user