|
|
|
<template>
|
|
|
|
<el-card shadow="never" class="aui-card--fill">
|
|
|
|
<div class="mod-rent__rentContractInfo}">
|
|
|
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
|
|
|
<el-form-item label="所属网格"
|
|
|
|
prop="gridId">
|
|
|
|
<el-select
|
|
|
|
v-model.trim="dataForm.gridId"
|
|
|
|
placeholder="请选择"
|
|
|
|
size="small"
|
|
|
|
clearable
|
|
|
|
class="resi-cell-select"
|
|
|
|
@change="handleChangeGrid"
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
v-for="item in optionsG"
|
|
|
|
:key="item.value"
|
|
|
|
:label="item.label"
|
|
|
|
:value="item.value"
|
|
|
|
>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="所属房屋">
|
|
|
|
<div class="resi-cell-value">
|
|
|
|
<div class="resi-cell-col">
|
|
|
|
<el-form-item prop="villageId">
|
|
|
|
<el-select
|
|
|
|
v-model.trim="dataForm.villageId"
|
|
|
|
placeholder="请选择小区"
|
|
|
|
size="small"
|
|
|
|
clearable
|
|
|
|
class="resi-cell-select"
|
|
|
|
@clear="handleClearVillage"
|
|
|
|
@change="handleChangeV"
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
v-for="item in optionsV"
|
|
|
|
:key="item.value"
|
|
|
|
:label="item.label"
|
|
|
|
:value="item.value"
|
|
|
|
>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item prop="buildId">
|
|
|
|
<el-select
|
|
|
|
v-model.trim="dataForm.buildId"
|
|
|
|
placeholder="楼号"
|
|
|
|
size="small"
|
|
|
|
clearable
|
|
|
|
style="width: 120px;"
|
|
|
|
class="resi-cell-select"
|
|
|
|
:disabled="changeVDisabled"
|
|
|
|
@clear="handleClearBuild"
|
|
|
|
@change="handleChangeB"
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
v-for="item in optionsB"
|
|
|
|
:key="item.value"
|
|
|
|
:label="item.label"
|
|
|
|
:value="item.value"
|
|
|
|
>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item prop="unitId">
|
|
|
|
<el-select
|
|
|
|
v-model.trim="dataForm.unitId"
|
|
|
|
:disabled="changeBDisabled"
|
|
|
|
placeholder="单元"
|
|
|
|
size="small"
|
|
|
|
clearable
|
|
|
|
style="width: 120px;"
|
|
|
|
class="resi-cell-select"
|
|
|
|
@click="handleClearDan"
|
|
|
|
@change="handleChangeD"
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
v-for="item in optionsD"
|
|
|
|
:key="item.value"
|
|
|
|
:label="item.label"
|
|
|
|
:value="item.value"
|
|
|
|
>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item prop="homeId">
|
|
|
|
<el-select
|
|
|
|
v-model.trim="dataForm.homeId"
|
|
|
|
:disabled="changeDDisabled"
|
|
|
|
placeholder="房号"
|
|
|
|
size="small"
|
|
|
|
clearable
|
|
|
|
style="width: 120px;"
|
|
|
|
class="resi-cell-select"
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
v-for="item in optionsH"
|
|
|
|
:key="item.value"
|
|
|
|
:label="item.label"
|
|
|
|
:value="item.value"
|
|
|
|
>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%">
|
|
|
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
|
|
|
<el-table-column prop="gridName" label="网格" header-align="center" align="center"></el-table-column>
|
|
|
|
<el-table-column prop="buildName" label="楼号" header-align="center" align="center"></el-table-column>
|
|
|
|
<el-table-column prop="unitName" label="单元" header-align="center" align="center"></el-table-column>
|
|
|
|
<el-table-column prop="homeName" label="房屋" header-align="center" align="center"></el-table-column>
|
|
|
|
<el-table-column prop="ownerName" label="房主姓名" header-align="center" align="center"></el-table-column>
|
|
|
|
<el-table-column prop="state" label="状态:0未审核,1审核通过,2审核不通过" header-align="center" align="center"></el-table-column>
|
|
|
|
<el-table-column prop="lesseeName" label="承租人姓名" header-align="center" align="center"></el-table-column>
|
|
|
|
<el-table-column prop="lesseeIdCard" label="承租人身份证" header-align="center" align="center"></el-table-column>
|
|
|
|
<el-table-column prop="lesseeMobile" label="承租人手机" header-align="center" align="center"></el-table-column>
|
|
|
|
<el-table-column prop="isBlack" label="是否黑名单人员" header-align="center" align="center"></el-table-column>
|
|
|
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
|
|
|
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
<el-pagination
|
|
|
|
:current-page="page"
|
|
|
|
:page-sizes="[10, 20, 50, 100]"
|
|
|
|
:page-size="limit"
|
|
|
|
:total="total"
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
@size-change="pageSizeChangeHandle"
|
|
|
|
@current-change="pageCurrentChangeHandle">
|
|
|
|
</el-pagination>
|
|
|
|
<!-- 弹窗, 新增 / 修改 -->
|
|
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
|
|
|
</div>
|
|
|
|
</el-card>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import mixinViewModule from '@/mixins/view-module'
|
|
|
|
import AddOrUpdate from './rentcontractinfo-add-or-update'
|
|
|
|
export default {
|
|
|
|
mixins: [mixinViewModule],
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
mixinViewModuleOptions: {
|
|
|
|
getDataListURL: '/pli/power/rentContractInfo/page',
|
|
|
|
getDataListIsPage: true,
|
|
|
|
deleteURL: '/pli/power/rentContractInfo',
|
|
|
|
deleteIsBatch: true
|
|
|
|
},
|
|
|
|
optionsV: [],
|
|
|
|
optionsB: [],
|
|
|
|
optionsH: [],
|
|
|
|
optionsD: [],
|
|
|
|
optionsG: [],
|
|
|
|
dataForm: {
|
|
|
|
id: '',
|
|
|
|
gridId: '',
|
|
|
|
villageId: '',
|
|
|
|
buildId: '',
|
|
|
|
unitId: '',
|
|
|
|
homeId: ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
AddOrUpdate
|
|
|
|
},
|
|
|
|
created () {
|
|
|
|
this.getGridList()
|
|
|
|
this.getValiheList()
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
changeVDisabled() {
|
|
|
|
return !this.dataForm.villageId
|
|
|
|
},
|
|
|
|
changeBDisabled() {
|
|
|
|
return !this.dataForm.buildId
|
|
|
|
},
|
|
|
|
changeDDisabled() {
|
|
|
|
return !this.dataForm.unitId
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
handleClearVillage() {
|
|
|
|
this.dataForm.buildId = ''
|
|
|
|
this.dataForm.homeId = ''
|
|
|
|
},
|
|
|
|
handleClearBuild() {
|
|
|
|
this.dataForm.buildId = ''
|
|
|
|
this.dataForm.unitId = ''
|
|
|
|
this.dataForm.homeId = ''
|
|
|
|
},
|
|
|
|
handleClearDan() {
|
|
|
|
this.dataForm.unitId = ''
|
|
|
|
this.dataForm.homeId = ''
|
|
|
|
},
|
|
|
|
handleChangeGrid(val) {
|
|
|
|
console.log('val', val)
|
|
|
|
this.dataForm.villageId = ''
|
|
|
|
this.dataForm.buildId = ''
|
|
|
|
this.dataForm.unitId = ''
|
|
|
|
this.dataForm.homeId = ''
|
|
|
|
this.getValiheList()
|
|
|
|
},
|
|
|
|
getGridList() {
|
|
|
|
const { user } = this.$store.state
|
|
|
|
this.$http
|
|
|
|
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' })
|
|
|
|
.then(({ data: res }) => {
|
|
|
|
if (res.code !== 0) {
|
|
|
|
return this.$message.error(res.msg)
|
|
|
|
} else {
|
|
|
|
console.log('获取查询详情成功', res.data)
|
|
|
|
this.optionsG = res.data
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
return this.$message.error('网络错误')
|
|
|
|
})
|
|
|
|
},
|
|
|
|
getValiheList() {
|
|
|
|
const { user } = this.$store.state
|
|
|
|
this.$http
|
|
|
|
.post('/gov/org/icneighborhood/neighborhoodoption', {
|
|
|
|
gridId: this.dataForm.gridId,
|
|
|
|
agencyId: ''
|
|
|
|
// agencyId: user.agencyId
|
|
|
|
})
|
|
|
|
.then(({ data: res }) => {
|
|
|
|
if (res.code !== 0) {
|
|
|
|
return this.$message.error(res.msg)
|
|
|
|
} else {
|
|
|
|
console.log('获取查询详情成功', res.data)
|
|
|
|
this.optionsV = res.data
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
return this.$message.error('网络错误')
|
|
|
|
})
|
|
|
|
},
|
|
|
|
getBuildList() {
|
|
|
|
this.$http
|
|
|
|
.post('/gov/org/icbuilding/buildingoption', {
|
|
|
|
neighborHoodId: this.dataForm.villageId
|
|
|
|
})
|
|
|
|
.then(({ data: res }) => {
|
|
|
|
if (res.code !== 0) {
|
|
|
|
return this.$message.error(res.msg)
|
|
|
|
} else {
|
|
|
|
console.log('获取查询详情成功', res.data)
|
|
|
|
this.optionsB = res.data
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
return this.$message.error('网络错误')
|
|
|
|
})
|
|
|
|
},
|
|
|
|
getUniList() {
|
|
|
|
this.$http
|
|
|
|
.post('/gov/org/icbuildingunit/unitoption', {
|
|
|
|
buildingId: this.dataForm.buildId
|
|
|
|
})
|
|
|
|
.then(({ data: res }) => {
|
|
|
|
if (res.code !== 0) {
|
|
|
|
return this.$message.error(res.msg)
|
|
|
|
} else {
|
|
|
|
console.log('获取查询详情成功', res.data)
|
|
|
|
this.optionsD = res.data
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
return this.$message.error('网络错误')
|
|
|
|
})
|
|
|
|
},
|
|
|
|
getHouseList() {
|
|
|
|
this.$http
|
|
|
|
.post('/gov/org/ichouse/houseoption', { unitId: this.dataForm.unitId })
|
|
|
|
.then(({ data: res }) => {
|
|
|
|
if (res.code !== 0) {
|
|
|
|
return this.$message.error(res.msg)
|
|
|
|
} else {
|
|
|
|
console.log('获取查询详情成功', res.data)
|
|
|
|
this.optionsH = res.data
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
return this.$message.error('网络错误')
|
|
|
|
})
|
|
|
|
},
|
|
|
|
handleChangeV(val) {
|
|
|
|
console.log('val', val)
|
|
|
|
this.dataForm.buildId = ''
|
|
|
|
this.dataForm.unitId = ''
|
|
|
|
this.dataForm.homeId = ''
|
|
|
|
this.getBuildList()
|
|
|
|
},
|
|
|
|
handleChangeB(val) {
|
|
|
|
console.log('val', val)
|
|
|
|
this.dataForm.unitId = ''
|
|
|
|
this.dataForm.homeId = ''
|
|
|
|
this.getUniList()
|
|
|
|
},
|
|
|
|
handleChangeD(val) {
|
|
|
|
console.log('val', val)
|
|
|
|
this.dataForm.homeId = ''
|
|
|
|
this.getHouseList()
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|