居民身份认证所属网格

This commit is contained in:
liuye
2023-04-13 10:36:43 +08:00
parent c08d40d471
commit fe9ff22748
2 changed files with 28 additions and 24 deletions

View File

@@ -48,18 +48,15 @@
<input class="item-right" v-else type="idNumber" v-model="userIdNumber" maxlength="18">
</div>
<div class="item">
<p>所属地区</p>
<div class="item-right" v-if="!editArea">
<p class="name">{{ user.areaName || '' }}</p>
<p>所属网格</p>
<div class="item-right" v-if="!editGird">
<p class="name">{{ user.girdName || '' }}</p>
</div>
<AiAreaPicker v-else :selectRoot="false" class="item-right" :areaId="$areaId" v-model="userAreaId" :fullName.sync="userAreaName">
<div class="ai-area__wrapper">
<span class="label" v-if="userAreaName">{{ userAreaName }}</span>
<i v-else>请选择</i>
<u-icon name="arrow-right" color="#ddd"/>
</div>
</AiAreaPicker>
<AiPagePicker type="gird" class="item-right" v-model="userGirdId" :params="{formType:2}" @select="handleSelectGrid" nodeKey="id" v-else>
<AiMore v-model="userGirdName" />
</AiPagePicker>
</div>
</div>
<div class="btn-wrapper btn-edit">
<b class="btn" @click="btnText? submit(): editBtn()">{{ btnText? '提交': '修改' }}</b>
@@ -90,14 +87,14 @@ export default {
editPhone: false,
editRealName: false,
editIdNumber: false,
editArea: false,
editGird: false,
avatar: '',
userName: '',
userPhone: '',
userRealName: '',
userIdNumber: '',
userAreaId: '',
userAreaName: '',
userGirdId: '',
userGirdName: '',
btnText: false,
isFromTabbar: '',
path: '',
@@ -117,9 +114,9 @@ export default {
this.userRealName = this.user.realName
this.editIdNumber = true;
this.userIdNumber = this.user.idNumber
this.editArea = true;
this.userAreaId = this.user.areaId
this.userAreaName = this.user.areaName
this.editGird = true
this.userGirdId = this.user.girdId
this.userGirdName = this.user.girdName
},
submit() {
if(this.flag) return
@@ -141,12 +138,15 @@ export default {
if (!this.$idCardNoUtil.checkIdCardNo(this.userIdNumber)) {
return this.$u.toast('请输入正确的身份证号码')
}
if (!this.userAreaId) {
return this.$u.toast('请选择所属地区')
}
if (!/[^0]0{0,2}$/.test(this.userAreaId)) {
return this.$u.toast('所属地区必须选到村级')
if (!this.userGirdId) {
return this.$u.toast('请选择所属网格')
}
// if (!this.userAreaId) {
// return this.$u.toast('请选择所属地区')
// }
// if (!/[^0]0{0,2}$/.test(this.userAreaId)) {
// return this.$u.toast('所属地区必须选到村级')
// }
this.flag = true
this.$instance.post(`/app/appwechatuserqujing/idNumberAttestation`, {
avatarUrl: this.avatar,
@@ -154,8 +154,8 @@ export default {
phone: this.userPhone,
name: this.userRealName,
idNumber: this.userIdNumber,
areaId: this.userAreaId,
areaName: this.userAreaName
girdId: this.userGirdId,
girdName: this.userGirdName
}).then(res=> {
if(res?.code==0) {
this.$u.toast('提交成功')
@@ -198,6 +198,10 @@ export default {
if(avatarUrl?.length) {
this.upLoad(avatarUrl)
}
},
handleSelectGrid(v) {
this.userGirdName = v.girdName
this.userGirdId = v.id
}
}
}

View File

@@ -102,7 +102,7 @@ export default {
},
getList() {
this.$instance.post(`/app/appintegralsupermarketgoods/list`).then(res => {
this.$instance.post(`/app/appintegralsupermarketshop/goodsListXCX`).then(res => {
if (res.code === 0) {
this.flowList = res.data.records
if(res.data && res.data.records.length) {