以房找人
This commit is contained in:
@@ -24,21 +24,21 @@
|
|||||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item" v-if="houseInfo.livingStatus == 1">
|
||||||
<span class="label">承租情况</span>
|
<span class="label">承租情况</span>
|
||||||
<div class="value" @click="selectClick('houselivingStatus', 'livingStatus')">
|
<div class="value" @click="selectClick('houseLeaseSituation', 'leaseSituation')">
|
||||||
<span :class="houseInfo.livingStatus === '' ? 'color-999' : ''">{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) || '请选择'}}</span>
|
<span :class="houseInfo.leaseSituation === '' ? 'color-999' : ''">{{ $dict.getLabel('houseLeaseSituation', houseInfo.leaseSituation) || '请选择'}}</span>
|
||||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item" v-if="houseInfo.livingStatus == 1">
|
||||||
<span class="label">起租日期</span>
|
<span class="label">起租日期</span>
|
||||||
<div class="value">
|
<div class="value" @click="dateShow=true">
|
||||||
<span :class="houseInfo.startDate === '' ? 'color-999' : ''">{{ houseInfo.startDate }}</span>
|
<span :class="houseInfo.startDate === '' ? 'color-999' : ''">{{ houseInfo.startDate || '请选择'}}</span>
|
||||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item" v-if="houseInfo.livingStatus == 1">
|
||||||
<span class="label">租房备案证明</span>
|
<span class="label">租房备案证明</span>
|
||||||
<div class="value" @click="selectClick('isFilingCertificateStatus', 'isFilingCertificate')">
|
<div class="value" @click="selectClick('isFilingCertificateStatus', 'isFilingCertificate')">
|
||||||
<span :class="houseInfo.isFilingCertificate === '' ? 'color-999' : ''">{{ $dict.getLabel('isFilingCertificateStatus', houseInfo.isFilingCertificate) || '请选择'}}</span>
|
<span :class="houseInfo.isFilingCertificate === '' ? 'color-999' : ''">{{ $dict.getLabel('isFilingCertificateStatus', houseInfo.isFilingCertificate) || '请选择'}}</span>
|
||||||
@@ -49,20 +49,13 @@
|
|||||||
<div class="line-bg"></div>
|
<div class="line-bg"></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="tips"></span>房主信息
|
<span class="tips"></span>房主信息
|
||||||
<span class="select">选择人员</span>
|
<span class="select" @click="handleSelectUser('owner')">选择人员</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="pad-l32">
|
<div class="pad-l32">
|
||||||
<div class="item">
|
<div class="item" v-for="(item, index) in houseInfo.owner" :key="index">
|
||||||
<span class="label">林珊珊</span>
|
<span class="label">{{item.name}}</span>
|
||||||
<div class="value">
|
<div class="value" @click="tableRelationSelect('owner', index)">
|
||||||
<span class="color-999">请选择</span>
|
<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 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-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,20 +63,13 @@
|
|||||||
<div class="line-bg"></div>
|
<div class="line-bg"></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="tips"></span>承租人信息
|
<span class="tips"></span>承租人信息
|
||||||
<span class="select">选择人员</span>
|
<span class="select" @click="handleSelectUser('renter')">选择人员</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="pad-l32">
|
<div class="pad-l32">
|
||||||
<div class="item">
|
<div class="item" v-for="(item, index) in houseInfo.renter" :key="index">
|
||||||
<span class="label">林珊珊</span>
|
<span class="label">{{item.name}}</span>
|
||||||
<div class="value">
|
<div class="value" @click="tableRelationSelect('renter', index)">
|
||||||
<span class="color-999">请选择</span>
|
<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 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-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -91,34 +77,29 @@
|
|||||||
<div class="line-bg"></div>
|
<div class="line-bg"></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="tips"></span>实际居住人员
|
<span class="tips"></span>实际居住人员
|
||||||
<span class="select">选择人员</span>
|
<span class="select" @click="handleSelectUser('live')">选择人员</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="pad-l32">
|
<div class="pad-l32">
|
||||||
<div class="item">
|
<div class="item" v-for="(item, index) in houseInfo.live" :key="index">
|
||||||
<span class="label">林珊珊</span>
|
<span class="label">{{item.name}}</span>
|
||||||
<div class="value">
|
<div class="value" @click="tableRelationSelect('live', index)">
|
||||||
<span class="color-999">请选择</span>
|
<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 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-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer" @click="submit">
|
||||||
<div class="btn">保存</div>
|
<div class="btn">保存</div>
|
||||||
</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="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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
import { mapState, mapActions } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@@ -127,12 +108,19 @@ export default {
|
|||||||
houseInfo: {},
|
houseInfo: {},
|
||||||
showSelect: false,
|
showSelect: false,
|
||||||
selectList: [],
|
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']) },
|
computed: { ...mapState(['user']) },
|
||||||
mounted() {
|
mounted() {
|
||||||
this.id = '1603004d26ad4e739b79ad5ba9f8d777'
|
this.id = this.params.id
|
||||||
|
this.communityId = this.params.communityId
|
||||||
this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
|
this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
|
||||||
'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType').then(() => {
|
'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType').then(() => {
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
@@ -140,6 +128,25 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
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() {
|
getDetail() {
|
||||||
this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${this.id}`).then(res => {
|
this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${this.id}`).then(res => {
|
||||||
if (res.code == 0) {
|
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) {
|
selectClick(dictName, formName) {
|
||||||
console.log(123)
|
console.log(123)
|
||||||
this.selectList = this.$dict.getDict(dictName)
|
this.selectList = this.$dict.getDict(dictName)
|
||||||
@@ -158,6 +180,9 @@ export default {
|
|||||||
},
|
},
|
||||||
confirmSelect(e) {
|
confirmSelect(e) {
|
||||||
this.houseInfo[this.formName] = e[0].value
|
this.houseInfo[this.formName] = e[0].value
|
||||||
|
},
|
||||||
|
dateConfirm(e) {
|
||||||
|
this.houseInfo.startDate = `${e.year}-${e.month}-${e.day}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row-info">
|
<div class="row-info">
|
||||||
<div class="row-item left">
|
<div class="row-item left">
|
||||||
<h3>{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) }}</h3>
|
<h3>{{ $dict.getLabel('houseLeaseSituation', houseInfo.leaseSituation) }}</h3>
|
||||||
<p>承租情况</p>
|
<p>承租情况</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-item center">
|
<div class="row-item center">
|
||||||
|
|||||||
Reference in New Issue
Block a user