以房找人
This commit is contained in:
@@ -21,7 +21,7 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
component: 'Detail',
|
||||
component: 'Add',
|
||||
params: {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2,48 +2,46 @@
|
||||
<div class="add">
|
||||
<div class="title">
|
||||
<span class="tips"></span>房屋信息
|
||||
<span class="select">选择人员</span>
|
||||
</div>
|
||||
<div class="pad-l32">
|
||||
<div class="item">
|
||||
<span class="label">房屋面积</span>
|
||||
<div class="value">
|
||||
<span class="color-999">请选择</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
<u-input type="digit" placeholder="请输入" v-model="houseInfo.houseArea" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="7" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">居住现状</span>
|
||||
<div class="value">
|
||||
<span class="color-999">请选择</span>
|
||||
<div class="value" @click="selectClick('houselivingStatus', 'livingStatus')">
|
||||
<span :class="houseInfo.livingStatus === '' ? 'color-999' : ''">{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) || '请选择'}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">房屋用途</span>
|
||||
<div class="value">
|
||||
<span class="color-999">请选择</span>
|
||||
<span :class="houseInfo.houseUse === '' ? 'color-999' : ''">{{$dict.getLabel('houseUseStatus', houseInfo.houseUse) || '请选择'}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">承租情况</span>
|
||||
<div class="value">
|
||||
<span class="color-999">请选择</span>
|
||||
<span :class="houseInfo.livingStatus === '' ? 'color-999' : ''">{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) || '请选择'}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">起租日期</span>
|
||||
<div class="value">
|
||||
<span class="color-999">请选择</span>
|
||||
<span :class="houseInfo.startDate === '' ? 'color-999' : ''">{{ houseInfo.startDate }}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">租房备案证明</span>
|
||||
<div class="value">
|
||||
<span class="color-999">请选择</span>
|
||||
<span :class="houseInfo.isFilingCertificate === '' ? 'color-999' : ''">{{ $dict.getLabel('isFilingCertificateStatus', houseInfo.isFilingCertificate) || '请选择'}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
@@ -114,6 +112,8 @@
|
||||
<div class="footer">
|
||||
<div class="btn">保存</div>
|
||||
</div>
|
||||
|
||||
<u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue" @confirm="confirmSelect"></u-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -123,17 +123,42 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
||||
id: '',
|
||||
houseInfo: {},
|
||||
showSelect: false,
|
||||
selectList: [],
|
||||
formName: ''
|
||||
}
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
mounted() {
|
||||
|
||||
this.id = '1603004d26ad4e739b79ad5ba9f8d777'
|
||||
this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
|
||||
'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType').then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
|
||||
getDetail() {
|
||||
this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${this.id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
if(res.data.startDate) {
|
||||
res.data.startDate = res.data.startDate.substring(0, 10)
|
||||
}
|
||||
this.houseInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
selectClick(dictName, formName) {
|
||||
console.log(123)
|
||||
this.selectList = this.$dict.getDict(dictName)
|
||||
this.formName = formName
|
||||
this.showSelect = true
|
||||
},
|
||||
confirmSelect(e) {
|
||||
this.houseInfo[this.formName] = e[0].value
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -43,45 +43,45 @@
|
||||
<u-popup v-model="show" mode="bottom" border-radius="14">
|
||||
<div class="popup">
|
||||
<div class="bg"></div>
|
||||
<div class="title">{{itemInfo.createAddress}}</div>
|
||||
<div class="title">{{houseInfo.createAddress}}</div>
|
||||
<div class="row-info">
|
||||
<div class="row-item left">
|
||||
<h3>{{itemInfo.houseArea}} ㎡</h3>
|
||||
<h3>{{houseInfo.houseArea}} ㎡</h3>
|
||||
<p>房屋面积</p>
|
||||
</div>
|
||||
<div class="row-item center">
|
||||
<span class="right-line"></span>
|
||||
<span class="left-line"></span>
|
||||
<h3>{{$dict.getLabel('houseUseStatus', itemInfo.houseUse)}} </h3>
|
||||
<h3>{{$dict.getLabel('houseUseStatus', houseInfo.houseUse)}} </h3>
|
||||
<p>房屋用途</p>
|
||||
</div>
|
||||
<div class="row-item right">
|
||||
<h3>{{ $dict.getLabel('houselivingStatus', itemInfo.livingStatus) }}</h3>
|
||||
<h3>{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) }}</h3>
|
||||
<p>居住现状</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-info">
|
||||
<div class="row-item left">
|
||||
<h3>{{ $dict.getLabel('houselivingStatus', itemInfo.livingStatus) }}</h3>
|
||||
<h3>{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) }}</h3>
|
||||
<p>承租情况</p>
|
||||
</div>
|
||||
<div class="row-item center">
|
||||
<span class="right-line"></span>
|
||||
<span class="left-line"></span>
|
||||
<h3>{{itemInfo.startDate}}</h3>
|
||||
<h3>{{houseInfo.startDate}}</h3>
|
||||
<p>起租日期</p>
|
||||
</div>
|
||||
<div class="row-item right">
|
||||
<h3>{{ itemInfo.isFilingCertificate == 1 ? '有' : '无'}}</h3>
|
||||
<h3>{{ houseInfo.isFilingCertificate == 1 ? '有' : '无'}}</h3>
|
||||
<p>租房备案证明</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="itemInfo.owner.length || itemInfo.renter.length">
|
||||
<div v-if="houseInfo.owner.length || houseInfo.renter.length">
|
||||
<div class="line-bg"></div>
|
||||
<div class="popup" v-if="itemInfo.owner.length">
|
||||
<div class="popup" v-if="houseInfo.owner.length">
|
||||
<div class="title pad-t32">房主信息</div>
|
||||
<div class="info-flex" v-for="(item, index) in itemInfo.owner" :key="index">
|
||||
<div class="info-flex" v-for="(item, index) in houseInfo.owner" :key="index">
|
||||
<div class="item">
|
||||
<span class="label">房主:</span>
|
||||
<span class="value">{{item.name}}</span>
|
||||
@@ -91,9 +91,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup" v-if="itemInfo.renter.length">
|
||||
<div class="popup" v-if="houseInfo.renter.length">
|
||||
<div class="title pad-t32">承租人信息</div>
|
||||
<div class="info-flex" v-for="(item, index) in itemInfo.renter" :key="index">
|
||||
<div class="info-flex" v-for="(item, index) in houseInfo.renter" :key="index">
|
||||
<div class="item">
|
||||
<span class="label">房主:</span>
|
||||
<span class="value">{{item.name}}</span>
|
||||
@@ -104,11 +104,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="itemInfo.live.length">
|
||||
<div v-if="houseInfo.live.length">
|
||||
<div class="line-bg"></div>
|
||||
<div class="popup">
|
||||
<div class="title pad-t32">实际居住人员</div>
|
||||
<div v-for="(item, index) in itemInfo.live" :key="index">
|
||||
<div v-for="(item, index) in houseInfo.live" :key="index">
|
||||
<div class="info-flex">
|
||||
<div class="item">
|
||||
<span class="label">居住人:</span>
|
||||
@@ -138,9 +138,9 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
buildingId: '',
|
||||
communityId: '',
|
||||
list: [],
|
||||
itemInfo: {
|
||||
houseInfo: {
|
||||
owner: [],
|
||||
renter: [],
|
||||
live: []
|
||||
@@ -187,18 +187,18 @@ export default {
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
// this.$http.post(`app/appcommunityhouseinfo/list`, null, {
|
||||
// params: {
|
||||
// current: 1,
|
||||
// size: 1000,
|
||||
// houseCode: this.houseCode,
|
||||
// buildingId: this.buildingId
|
||||
// }
|
||||
// }).then(res => {
|
||||
// if (res.code == 0) {
|
||||
// this.list = res.data.records
|
||||
// }
|
||||
// })
|
||||
this.$http.post(`app/appcommunityhouseinfo/list`, null, {
|
||||
params: {
|
||||
current: 1,
|
||||
size: 1000,
|
||||
buildingId: this.selectList[this.selectCellIndex].id,
|
||||
unitNumber: this.selectList[this.selectCellIndex].unitNumber
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.list = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
getHouseDetail(id) {
|
||||
this.houseId = id
|
||||
@@ -207,7 +207,7 @@ export default {
|
||||
if(res.data.startDate) {
|
||||
res.data.startDate = res.data.startDate.substring(0, 10)
|
||||
}
|
||||
this.itemInfo = res.data
|
||||
this.houseInfo = res.data
|
||||
|
||||
this.show = true
|
||||
}
|
||||
@@ -219,6 +219,8 @@ export default {
|
||||
this.selectCellIndex = index
|
||||
}
|
||||
})
|
||||
this.getStatistics()
|
||||
this.getList()
|
||||
},
|
||||
toAdd() {
|
||||
this.$emit('change', {
|
||||
|
||||
Reference in New Issue
Block a user