以房找人
This commit is contained in:
@@ -24,21 +24,21 @@
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item" v-if="houseInfo.livingStatus == 1">
|
||||
<span class="label">承租情况</span>
|
||||
<div class="value" @click="selectClick('houselivingStatus', 'livingStatus')">
|
||||
<span :class="houseInfo.livingStatus === '' ? 'color-999' : ''">{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) || '请选择'}}</span>
|
||||
<div class="value" @click="selectClick('houseLeaseSituation', 'leaseSituation')">
|
||||
<span :class="houseInfo.leaseSituation === '' ? 'color-999' : ''">{{ $dict.getLabel('houseLeaseSituation', houseInfo.leaseSituation) || '请选择'}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item" v-if="houseInfo.livingStatus == 1">
|
||||
<span class="label">起租日期</span>
|
||||
<div class="value">
|
||||
<span :class="houseInfo.startDate === '' ? 'color-999' : ''">{{ houseInfo.startDate }}</span>
|
||||
<div class="value" @click="dateShow=true">
|
||||
<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">
|
||||
<div class="item" v-if="houseInfo.livingStatus == 1">
|
||||
<span class="label">租房备案证明</span>
|
||||
<div class="value" @click="selectClick('isFilingCertificateStatus', 'isFilingCertificate')">
|
||||
<span :class="houseInfo.isFilingCertificate === '' ? 'color-999' : ''">{{ $dict.getLabel('isFilingCertificateStatus', houseInfo.isFilingCertificate) || '请选择'}}</span>
|
||||
@@ -49,20 +49,13 @@
|
||||
<div class="line-bg"></div>
|
||||
<div class="title">
|
||||
<span class="tips"></span>房主信息
|
||||
<span class="select">选择人员</span>
|
||||
<span class="select" @click="handleSelectUser('owner')">选择人员</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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">李益民</span>
|
||||
<div class="value">
|
||||
<span class="color-999">请选择</span>
|
||||
<div class="item" v-for="(item, index) in houseInfo.owner" :key="index">
|
||||
<span class="label">{{item.name}}</span>
|
||||
<div class="value" @click="tableRelationSelect('owner', index)">
|
||||
<span :class=" item.relation === '' ? 'color-999' : ''">{{$dict.getLabel('householdRelation', item.relation) || '与户主关系'}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
@@ -70,20 +63,13 @@
|
||||
<div class="line-bg"></div>
|
||||
<div class="title">
|
||||
<span class="tips"></span>承租人信息
|
||||
<span class="select">选择人员</span>
|
||||
<span class="select" @click="handleSelectUser('renter')">选择人员</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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">李益民</span>
|
||||
<div class="value">
|
||||
<span class="color-999">请选择</span>
|
||||
<div class="item" v-for="(item, index) in houseInfo.renter" :key="index">
|
||||
<span class="label">{{item.name}}</span>
|
||||
<div class="value" @click="tableRelationSelect('renter', index)">
|
||||
<span :class=" item.relation === '' ? 'color-999' : ''">{{$dict.getLabel('householdRelation', item.relation) || '与户主关系'}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
@@ -91,34 +77,29 @@
|
||||
<div class="line-bg"></div>
|
||||
<div class="title">
|
||||
<span class="tips"></span>实际居住人员
|
||||
<span class="select">选择人员</span>
|
||||
<span class="select" @click="handleSelectUser('live')">选择人员</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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">李益民</span>
|
||||
<div class="value">
|
||||
<span class="color-999">请选择</span>
|
||||
<div class="item" v-for="(item, index) in houseInfo.live" :key="index">
|
||||
<span class="label">{{item.name}}</span>
|
||||
<div class="value" @click="tableRelationSelect('live', index)">
|
||||
<span :class=" item.relation === '' ? 'color-999' : ''">{{$dict.getLabel('householdRelation', item.relation) || '与户主关系'}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer" @click="submit">
|
||||
<div class="btn">保存</div>
|
||||
</div>
|
||||
|
||||
<u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="2010" @confirm="dateConfirm" >请选择</u-picker>
|
||||
<u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue" @confirm="confirmSelect"></u-select>
|
||||
<u-select v-model="showRelation" :list="$dict.getDict('householdRelation')" label-name="dictName" value-name="dictValue" @confirm="confirmRelation"></u-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import { mapState, mapActions } from 'vuex'
|
||||
export default {
|
||||
|
||||
data() {
|
||||
@@ -127,12 +108,19 @@ export default {
|
||||
houseInfo: {},
|
||||
showSelect: false,
|
||||
selectList: [],
|
||||
formName: ''
|
||||
formName: '',
|
||||
dateShow: false,
|
||||
deteParams: { year: true, month: true, day: true, hour: false, minute: false, second: false},
|
||||
showRelation: false,
|
||||
tableName: '',
|
||||
tableIndex: '',
|
||||
communityId: ''
|
||||
}
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
mounted() {
|
||||
this.id = '1603004d26ad4e739b79ad5ba9f8d777'
|
||||
this.id = this.params.id
|
||||
this.communityId = this.params.communityId
|
||||
this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
|
||||
'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType').then(() => {
|
||||
this.getDetail()
|
||||
@@ -140,6 +128,25 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions(['selectEnterpriseContact']),
|
||||
handleSelectUser(fieldDbName) {
|
||||
this.selectEnterpriseContact({
|
||||
fromDepartmentId: 0,
|
||||
type: ["user"],
|
||||
selectedUserIds: this.houseInfo[fieldDbName]?.map(e => e.id)
|
||||
}).then(res => {
|
||||
this.houseInfo[fieldDbName] = res?.userList || []
|
||||
})
|
||||
},
|
||||
tableRelationSelect(name, index) {
|
||||
this.tableName = name
|
||||
this.tableIndex = index
|
||||
this.showRelation = true
|
||||
},
|
||||
confirmRelation(e) {
|
||||
console.log(this.houseInfo[this.tableName][this.tableIndex])
|
||||
this.houseInfo[this.tableName][this.tableIndex].relation = e[0].value
|
||||
},
|
||||
getDetail() {
|
||||
this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${this.id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
@@ -150,6 +157,21 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.$http.post(`app/appcommunityhouseinfo/update`, this.houseInfo).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('提交成功')
|
||||
setTimeout(() => {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: this.communityId
|
||||
}
|
||||
})
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
},
|
||||
selectClick(dictName, formName) {
|
||||
console.log(123)
|
||||
this.selectList = this.$dict.getDict(dictName)
|
||||
@@ -158,6 +180,9 @@ export default {
|
||||
},
|
||||
confirmSelect(e) {
|
||||
this.houseInfo[this.formName] = e[0].value
|
||||
},
|
||||
dateConfirm(e) {
|
||||
this.houseInfo.startDate = `${e.year}-${e.month}-${e.day}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</div>
|
||||
<div class="row-info">
|
||||
<div class="row-item left">
|
||||
<h3>{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) }}</h3>
|
||||
<h3>{{ $dict.getLabel('houseLeaseSituation', houseInfo.leaseSituation) }}</h3>
|
||||
<p>承租情况</p>
|
||||
</div>
|
||||
<div class="row-item center">
|
||||
|
||||
Reference in New Issue
Block a user