diff --git a/src/views/modules/plugins/rent/rentcontractreview.vue b/src/views/modules/plugins/rent/rentcontractreview.vue index 593c21a0..fc6f9502 100644 --- a/src/views/modules/plugins/rent/rentcontractreview.vue +++ b/src/views/modules/plugins/rent/rentcontractreview.vue @@ -2,8 +2,110 @@
- - + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
{{ $t('query') }} @@ -59,13 +161,164 @@ export default { deleteURL: '/pli/power/rentContractInfo', deleteIsBatch: true }, + optionsV: [], + optionsB: [], + optionsH: [], + optionsD: [], + optionsG: [], dataForm: { - id: '' + 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() + }, } }