|
@@ -2,33 +2,15 @@
|
|
|
<div class="binding">
|
|
<div class="binding">
|
|
|
<span class="title">完善业主信息</span>
|
|
<span class="title">完善业主信息</span>
|
|
|
<div class="label">
|
|
<div class="label">
|
|
|
- <span class="small-title">业主基本信息</span>
|
|
|
|
|
- <input type="text" placeholder="姓名" class="input" v-model="form.name">
|
|
|
|
|
|
|
+ <span class="small-title">房屋信息</span>
|
|
|
|
|
+ <houseSelect class="input" @on-select="onSelect"></houseSelect>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="label">
|
|
<div class="label">
|
|
|
- <span class="small-title">房屋信息</span>
|
|
|
|
|
- <input type="text" placeholder="房产证号码" class="input" v-model="form.certificateNo">
|
|
|
|
|
- <van-field
|
|
|
|
|
- class="input-a"
|
|
|
|
|
- v-model="fieldValue"
|
|
|
|
|
- is-link
|
|
|
|
|
- readonly
|
|
|
|
|
- label="具体房屋信息"
|
|
|
|
|
- placeholder="请选择具体位置"
|
|
|
|
|
- @click="show = true"
|
|
|
|
|
- />
|
|
|
|
|
- <van-popup v-model="show" round position="bottom">
|
|
|
|
|
- <van-cascader
|
|
|
|
|
- :field-names="fieldNames"
|
|
|
|
|
- v-model="cascaderValue"
|
|
|
|
|
- title="请选择具体位置"
|
|
|
|
|
- :options="options"
|
|
|
|
|
- @change="onChange"
|
|
|
|
|
- @close="show = false"
|
|
|
|
|
- @finish="onFinish"
|
|
|
|
|
- />
|
|
|
|
|
- </van-popup>
|
|
|
|
|
|
|
+ <span class="small-title">业主基本信息</span>
|
|
|
|
|
+ <input type="text" placeholder="姓名" class="input" v-model="form.name">
|
|
|
|
|
+ <input type="text" placeholder="身份证号码" class="input" v-model="form.idNumber">
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
<div class="label">
|
|
<div class="label">
|
|
|
<span class="small-title">产证信息</span>
|
|
<span class="small-title">产证信息</span>
|
|
|
<van-uploader :max-count="1" v-model="fileList" :after-read="afterRead" />
|
|
<van-uploader :max-count="1" v-model="fileList" :after-read="afterRead" />
|
|
@@ -38,93 +20,66 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { Dialog } from 'vant';
|
|
|
|
|
|
|
+import {Dialog, Notify} from 'vant';
|
|
|
|
|
+import houseSelect from "@/components/houseSelect";
|
|
|
|
|
+import reg from "@/util/reg";
|
|
|
export default {
|
|
export default {
|
|
|
name: "binding",
|
|
name: "binding",
|
|
|
|
|
+ components:{
|
|
|
|
|
+ houseSelect
|
|
|
|
|
+ },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
form:{
|
|
form:{
|
|
|
certificateNo:'',
|
|
certificateNo:'',
|
|
|
certificatePhoto:'',
|
|
certificatePhoto:'',
|
|
|
houseId:'',
|
|
houseId:'',
|
|
|
- name:''
|
|
|
|
|
|
|
+ name:'',
|
|
|
|
|
+ idNumber:''
|
|
|
},
|
|
},
|
|
|
fileList:[],
|
|
fileList:[],
|
|
|
- show: false,
|
|
|
|
|
- fieldValue: '',
|
|
|
|
|
- cascaderValue: '',
|
|
|
|
|
- fieldNames:{
|
|
|
|
|
- text:'name',
|
|
|
|
|
- value:'id',
|
|
|
|
|
- children:'children'
|
|
|
|
|
- },
|
|
|
|
|
- // 选项列表,children 代表子选项,支持多级嵌套
|
|
|
|
|
- options: [
|
|
|
|
|
- ],
|
|
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- mounted() {
|
|
|
|
|
- this.getEstates();
|
|
|
|
|
- },
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
- onChange(target){
|
|
|
|
|
- if(target.selectedOptions[target.tabIndex].leaf == true){
|
|
|
|
|
- this.form.houseId = String(target.value)
|
|
|
|
|
- }else{
|
|
|
|
|
- let params = {
|
|
|
|
|
- estateUnitId:target.value
|
|
|
|
|
- }
|
|
|
|
|
- this.$api.getEstates(params).then(res=>{
|
|
|
|
|
- target.selectedOptions[target.tabIndex].children = res.content.subs.map(x=>{
|
|
|
|
|
- if(!x.leaf){
|
|
|
|
|
- return {
|
|
|
|
|
- ...x,
|
|
|
|
|
- name:x.name+(x.exp?x.exp:''),
|
|
|
|
|
- children:[]
|
|
|
|
|
- }
|
|
|
|
|
- }else{
|
|
|
|
|
- return {
|
|
|
|
|
- ...x,
|
|
|
|
|
- name:x.name+(x.exp?x.exp:''),
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- getEstates(){
|
|
|
|
|
|
|
+ onSelect(v){
|
|
|
|
|
+ this.form.houseId = v
|
|
|
let params = {
|
|
let params = {
|
|
|
- estateUnitId:1
|
|
|
|
|
|
|
+ houseId:String(v),
|
|
|
|
|
+ name:this.name,
|
|
|
|
|
+ idNumber:this.idNumber,
|
|
|
}
|
|
}
|
|
|
- this.$api.getEstates(params).then(res=>{
|
|
|
|
|
- console.log(res)
|
|
|
|
|
- this.options = res.content.subs.map(x=>{
|
|
|
|
|
- if(!x.leaf){
|
|
|
|
|
- return {
|
|
|
|
|
- ...x,
|
|
|
|
|
- name:x.name+(x.exp?x.exp:''),
|
|
|
|
|
- children:[]
|
|
|
|
|
- }
|
|
|
|
|
- }else{
|
|
|
|
|
- return {
|
|
|
|
|
- ...x,
|
|
|
|
|
- name:x.name+(x.exp?x.exp:''),
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.$api.houseBlindAuto(params).then(res=>{
|
|
|
|
|
+ Dialog.confirm({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ message: '该房产的预留号码与该账号配对成功,无需审核,已绑定',
|
|
|
})
|
|
})
|
|
|
- })
|
|
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.$router.go(-1)
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ // on cancel
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ }).catch(err=>{})
|
|
|
},
|
|
},
|
|
|
submit(){
|
|
submit(){
|
|
|
-
|
|
|
|
|
- this.$api.houseBlind(this.form).then(res=>{
|
|
|
|
|
- Dialog.alert({
|
|
|
|
|
- title: '提交成功',
|
|
|
|
|
- message: '请等待管理员审核通过后,参能参与实名后的活动',
|
|
|
|
|
- theme: 'round-button',
|
|
|
|
|
|
|
+ if(this.form.certificatePhoto == '' || this.houseId == '' || this.name == ''){
|
|
|
|
|
+ Notify({ type: 'warning', message: '请填写完整的审核信息' });
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ reg.regIDNumber(this.form.idNumber).then(x=>{
|
|
|
|
|
+ this.$api.houseBlind(this.form).then(res=>{
|
|
|
|
|
+ Dialog.confirm({
|
|
|
|
|
+ title: '提交成功',
|
|
|
|
|
+ message: '请等待管理员审核通过后,参能参与实名后的活动',
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.$router.go(-1)
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ // on cancel
|
|
|
|
|
+ });
|
|
|
})
|
|
})
|
|
|
- this.$router.go(-1)
|
|
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
afterRead(file) {
|
|
afterRead(file) {
|
|
@@ -134,11 +89,7 @@ export default {
|
|
|
this.form.certificatePhoto = res.content
|
|
this.form.certificatePhoto = res.content
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- // 全部选项选择完毕后,会触发 finish 事件
|
|
|
|
|
- onFinish({ selectedOptions }) {
|
|
|
|
|
- this.show = false;
|
|
|
|
|
- this.fieldValue = selectedOptions.map((option) => option.name).join('/');
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|