From d1f9ab884cdeec6adf1a28a6b7d22da0a58020da Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 25 Apr 2022 15:58:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E7=BD=91=E6=A0=BC=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/plugins/rent/rentcontractinfo.vue | 286 ++++++++++++++++-- 1 file changed, 265 insertions(+), 21 deletions(-) diff --git a/src/views/modules/plugins/rent/rentcontractinfo.vue b/src/views/modules/plugins/rent/rentcontractinfo.vue index 84924539..00102b44 100644 --- a/src/views/modules/plugins/rent/rentcontractinfo.vue +++ b/src/views/modules/plugins/rent/rentcontractinfo.vue @@ -2,6 +2,101 @@
+ + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+
@@ -60,8 +155,8 @@ @@ -93,14 +188,24 @@ export default { deleteURL: '/pli/power/rentContractInfo', deleteIsBatch: true }, + optionsV: [], + optionsB: [], + optionsH: [], + optionsD: [], + optionsG: [], dataForm: { id: '', - lesseeIdCard: '', - state: '', - lesseeMobile: '', - lesseeName: '', - startTime: '', - endTime: '' + gridId: '', + villageId: '', + buildId: '', + unitId: '', + homeId: '', + lesseeIdCard: '', + state: '', + lesseeMobile: '', + lesseeName: '', + startTime: '', + endTime: '' }, stateArr: [ { dictValue: '0', dictName: '未审核' }, @@ -128,19 +233,158 @@ export default { components: { AddOrUpdate }, - methods: { - btKeyUpLesseeIdCard (e) { - e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') - this.dataForm.lesseeIdCard = e.target.value - }, - btKeyUpLesseeMobile (e) { - e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') - this.dataForm.lesseeMobile = e.target.value - }, - btKeyUpLesseeName (e) { - e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') - this.dataForm.lesseeName = e.target.value - }, + created () { + this.getGridList() + this.getValiheList() + }, + computed: { + changeVDisabled() { + return !this.dataForm.villageId + }, + changeBDisabled() { + return !this.dataForm.buildId + }, + changeDDisabled() { + return !this.dataForm.unitId } + }, + methods: { + btKeyUpLesseeIdCard (e) { + e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') + this.dataForm.lesseeIdCard = e.target.value + }, + btKeyUpLesseeMobile (e) { + e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') + this.dataForm.lesseeMobile = e.target.value + }, + btKeyUpLesseeName (e) { + e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') + this.dataForm.lesseeName = e.target.value + }, + 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() + }, + }, }