2023-12-19 16:17:25 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="formEdit">
|
|
|
|
|
|
<div class="title">
|
|
|
|
|
|
<span></span>请确认并校准您输入的内容:
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="list">
|
|
|
|
|
|
<div class="item">
|
|
|
|
|
|
<div class="label">
|
2023-12-25 09:48:56 +08:00
|
|
|
|
<span>户主姓名</span>
|
|
|
|
|
|
<div class="edit" @click="editName=true">
|
2023-12-19 16:17:25 +08:00
|
|
|
|
<img src="./img/edit.png" alt="">修改
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2023-12-25 09:48:56 +08:00
|
|
|
|
<div class="value">
|
|
|
|
|
|
<u-input type="text" class="right" placeholder="请输入" height="44" input-align="center" v-model="info.name" :clearable="false" v-if="editName"></u-input>
|
|
|
|
|
|
<span v-else>{{info.name || '请输入'}}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="item">
|
|
|
|
|
|
<div class="label">
|
|
|
|
|
|
<span>性别</span>
|
|
|
|
|
|
<div class="edit" @click="showSex=true">
|
|
|
|
|
|
<img src="./img/edit.png" alt="">修改
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="value">
|
|
|
|
|
|
<span>{{ $dict.getLabel('sex', info.sex) || '请选择'}}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="item">
|
|
|
|
|
|
<div class="label">
|
|
|
|
|
|
<span>联系电话</span>
|
|
|
|
|
|
<div class="edit" @click="editPhone=true">
|
|
|
|
|
|
<img src="./img/edit.png" alt="">修改
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="value">
|
|
|
|
|
|
<u-input type="text" class="right" placeholder="请输入" height="44" input-align="center" v-model="info.phone" :clearable="false" v-if="editPhone"></u-input>
|
|
|
|
|
|
<span v-else>{{info.phone || '请输入'}}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="item">
|
|
|
|
|
|
<div class="label">
|
|
|
|
|
|
<span>出生日期</span>
|
|
|
|
|
|
<div class="edit" @click="showDate=true">
|
|
|
|
|
|
<img src="./img/edit.png" alt="">修改
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="value">
|
|
|
|
|
|
<span>{{info.birthday || '请选择'}}</span>
|
|
|
|
|
|
</div>
|
2023-12-19 16:17:25 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="item">
|
|
|
|
|
|
<div class="label">
|
2023-12-25 09:48:56 +08:00
|
|
|
|
<span>民族</span>
|
|
|
|
|
|
<div class="edit" @click="showNation=true">
|
2023-12-19 16:17:25 +08:00
|
|
|
|
<img src="./img/edit.png" alt="">修改
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2023-12-25 09:48:56 +08:00
|
|
|
|
<div class="value">
|
|
|
|
|
|
<span>{{ $dict.getLabel('nation', info.nation) || '请选择'}}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="item">
|
|
|
|
|
|
<div class="label">
|
|
|
|
|
|
<span>家庭人口数</span>
|
|
|
|
|
|
<div class="edit" @click="editHouseholdNumber=true">
|
|
|
|
|
|
<img src="./img/edit.png" alt="">修改
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="value">
|
|
|
|
|
|
<u-input type="text" class="right" placeholder="请输入" height="44" input-align="center" v-model="info.householdNumber" :clearable="false" v-if="editHouseholdNumber"></u-input>
|
|
|
|
|
|
<span v-else>{{info.householdNumber || '请输入'}}</span>
|
|
|
|
|
|
</div>
|
2023-12-19 16:17:25 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="bottom-btn">
|
2023-12-25 09:48:56 +08:00
|
|
|
|
<div class="confirm" @click="toConfirm">确认使用</div>
|
|
|
|
|
|
<div class="cancel" @click="back">取消输入</div>
|
2023-12-19 16:17:25 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import {mapState} from "vuex";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'formEdit',
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2023-12-25 09:48:56 +08:00
|
|
|
|
word: '',
|
|
|
|
|
|
info: {},
|
|
|
|
|
|
showSex: false,
|
|
|
|
|
|
showNation: false,
|
|
|
|
|
|
showDate: false,
|
|
|
|
|
|
deteParams: {year: true, month: true, day: true, hour: false, minute: false, second: false},
|
|
|
|
|
|
editName: false,
|
|
|
|
|
|
editPhone: false,
|
|
|
|
|
|
editHouseholdNumber: false
|
2023-12-19 16:17:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
...mapState(['user']),
|
|
|
|
|
|
},
|
2023-12-25 09:48:56 +08:00
|
|
|
|
onLoad(option) {
|
|
|
|
|
|
uni.showLoading({title: '加载中'})
|
|
|
|
|
|
this.word = option.word
|
|
|
|
|
|
this.$dict.load('sex', 'nation').then(() => {
|
|
|
|
|
|
this.getInfo()
|
|
|
|
|
|
})
|
2023-12-19 16:17:25 +08:00
|
|
|
|
},
|
|
|
|
|
|
onShow() {
|
|
|
|
|
|
document.title = '婚姻家庭纠纷入户登记表'
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2023-12-25 09:48:56 +08:00
|
|
|
|
getInfo() {
|
|
|
|
|
|
this.$http.post(`/app/appbaiduai/queryByInfo?word=${this.word}`).then((res) => {
|
|
|
|
|
|
if (res.code === 0) {
|
|
|
|
|
|
this.info = {...res.data}
|
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
|
}
|
|
|
|
|
|
}).catch(res => {
|
|
|
|
|
|
this.$u.toast(res)
|
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
confirmSex(e) {
|
|
|
|
|
|
this.info.sex = e[0].value
|
|
|
|
|
|
},
|
|
|
|
|
|
confirmNation(e) {
|
|
|
|
|
|
this.info.nation = e[0].value
|
|
|
|
|
|
},
|
|
|
|
|
|
dateConfirm(e) {
|
|
|
|
|
|
this.info.birthday = `${e.year}-${e.month}-${e.day}`
|
|
|
|
|
|
},
|
|
|
|
|
|
toConfirm() {
|
|
|
|
|
|
if(this.info.name == null || !this.info.name) {
|
|
|
|
|
|
return this.$u.toast('请输入户主姓名')
|
|
|
|
|
|
}
|
|
|
|
|
|
if(this.info.sex == null) {
|
|
|
|
|
|
return this.$u.toast('请选择性别')
|
|
|
|
|
|
}
|
|
|
|
|
|
if(this.info.phone == null || !this.info.phone) {
|
|
|
|
|
|
return this.$u.toast('请输入联系电话')
|
|
|
|
|
|
}
|
|
|
|
|
|
if(this.info.birthday == null) {
|
|
|
|
|
|
return this.$u.toast('请选择出生日期')
|
|
|
|
|
|
}
|
|
|
|
|
|
if(this.info.nation == null) {
|
|
|
|
|
|
return this.$u.toast('请选择民族')
|
|
|
|
|
|
}
|
|
|
|
|
|
if(this.info.householdNumber == null || !this.info.householdNumber) {
|
|
|
|
|
|
return this.$u.toast('请输入家庭人口数')
|
|
|
|
|
|
}
|
|
|
|
|
|
uni.navigateTo({url: `./formConfirm?word=${this.word}`})
|
|
|
|
|
|
},
|
|
|
|
|
|
back() {
|
|
|
|
|
|
uni.navigateBack()
|
|
|
|
|
|
}
|
2023-12-19 16:17:25 +08:00
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
uni-page-body {
|
|
|
|
|
|
min-height: 100%;
|
|
|
|
|
|
// height: 100vh;
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
padding-top: 26px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.formEdit {
|
|
|
|
|
|
.title {
|
|
|
|
|
|
padding-left: 32px;
|
|
|
|
|
|
font-family: PingFangSC-Medium;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
font-size: 32px;
|
|
|
|
|
|
color: #000;
|
|
|
|
|
|
line-height: 48px;
|
|
|
|
|
|
margin-bottom: 22px;
|
|
|
|
|
|
span {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: 6px;
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
background: #3399FF;
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
margin-right: 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.list {
|
|
|
|
|
|
padding-bottom: 272px;
|
|
|
|
|
|
.item {
|
|
|
|
|
|
text-align: center;
|
2023-12-25 09:48:56 +08:00
|
|
|
|
margin-bottom: 64px;
|
2023-12-19 16:17:25 +08:00
|
|
|
|
.label {
|
2023-12-25 09:48:56 +08:00
|
|
|
|
margin-bottom: 18px;
|
|
|
|
|
|
span {
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
font-size: 40px;
|
|
|
|
|
|
font-family: PingFangSC;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
line-height: 60px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
2023-12-19 16:17:25 +08:00
|
|
|
|
.edit {
|
|
|
|
|
|
display: inline-block;
|
2023-12-25 09:48:56 +08:00
|
|
|
|
width: 150px;
|
|
|
|
|
|
text-align: right;
|
2023-12-19 16:17:25 +08:00
|
|
|
|
font-family: PingFangSC-Regular;
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
color: #3072F5;
|
2023-12-25 09:48:56 +08:00
|
|
|
|
vertical-align: text-bottom;
|
2023-12-19 16:17:25 +08:00
|
|
|
|
img {
|
|
|
|
|
|
width: 28px;
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
margin: 0 12px 0 32px;
|
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.value {
|
2023-12-25 09:48:56 +08:00
|
|
|
|
width: calc(100% - 150px);
|
|
|
|
|
|
.u-input, span{
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
color: #3975c6;
|
|
|
|
|
|
font-size: 40px;
|
|
|
|
|
|
font-family: PingFangSC;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
line-height: 60px;
|
|
|
|
|
|
}
|
|
|
|
|
|
::v-deep .uni-input-input {
|
|
|
|
|
|
color: #3975c6;
|
|
|
|
|
|
font-size: 40px;
|
|
|
|
|
|
font-family: PingFangSC;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
line-height: 60px;
|
|
|
|
|
|
}
|
2023-12-19 16:17:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.bottom-btn {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
div {
|
|
|
|
|
|
margin-left: 32px;
|
|
|
|
|
|
width: 686px;
|
|
|
|
|
|
height: 88px;
|
|
|
|
|
|
border-radius: 44px;
|
|
|
|
|
|
font-family: PingFangSC-Medium;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
font-size: 34px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
line-height: 86px;
|
|
|
|
|
|
margin-bottom: 32px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.confirm {
|
|
|
|
|
|
background: #3975C6;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.cancel {
|
|
|
|
|
|
color: #666;
|
|
|
|
|
|
border: 1px solid #CCC;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|