From 5b8b917193c4b0e18c1161586ebe64f5da07ad67 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Tue, 9 Jan 2024 15:26:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=BF=E5=B1=8Bbug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis/mapper/house/house-mapper.xml | 38 +++++++++++++ .../resources/templates/house/list-popu.html | 2 +- src/main/resources/templates/house/save.html | 45 ++++++++++++++- .../resources/templates/house/update.html | 56 ++++++++++++++++++- 4 files changed, 136 insertions(+), 5 deletions(-) diff --git a/src/main/resources/mybatis/mapper/house/house-mapper.xml b/src/main/resources/mybatis/mapper/house/house-mapper.xml index db2348f..73cf3eb 100644 --- a/src/main/resources/mybatis/mapper/house/house-mapper.xml +++ b/src/main/resources/mybatis/mapper/house/house-mapper.xml @@ -477,6 +477,44 @@ custodian_phone = #{custodianPhone}, + + + owner_population_id = '', + + + homeowner = '', + + + document_id = '', + + + document_name = '', + + + document_num = '', + + + phone = '', + + + custodian_population_id = '', + + + custodian = '', + + + custodian_document_id = '', + + + custodian_document_name = '', + + + custodian_document_num = '', + + + custodian_phone = '', + + relationship_homeowner = #{relationshipHomeowner}, diff --git a/src/main/resources/templates/house/list-popu.html b/src/main/resources/templates/house/list-popu.html index 96c9bd7..54052e7 100644 --- a/src/main/resources/templates/house/list-popu.html +++ b/src/main/resources/templates/house/list-popu.html @@ -264,7 +264,7 @@ console.log(data) var loadLayerIndex; top.restAjax.get(top.restAjax.path('api/populationinfo/get/{populationInfoId}', [data.populationInfoId]), {}, null, function(code, data) { - top.dialog.dialogData.popuData = checkData; + top.dialog.dialogData.popuData = data; var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引 parent.layer.close(index); }, function(code, data) { diff --git a/src/main/resources/templates/house/save.html b/src/main/resources/templates/house/save.html index 530704d..c6cba4f 100644 --- a/src/main/resources/templates/house/save.html +++ b/src/main/resources/templates/house/save.html @@ -280,11 +280,16 @@
房主
-
+
+
+ +
@@ -327,11 +332,16 @@
托管人
-
+
+
+ +
@@ -545,12 +555,23 @@ var popuData = top.dialog.dialogData.popuData; $('#homeowner').val(popuData.name); $('#documentId').val('b7d74045-d984-4822-b0f3-711b15b933ca'); + $('#documentName').val('居民身份证'); $('#documentNum').val(popuData.idcard); $('#phone').val(popuData.phone); + $('#ownerPopulationId').val(popuData.populationInfoId); } }); } + function clearOwner() { + $('#homeowner').val(''); + $('#documentId').val(''); + $('#documentName').val(''); + $('#documentNum').val(''); + $('#phone').val(''); + $('#ownerPopulationId').val(''); + } + var cohabitArray = new Array(); // 同住人搜索 function cohabitSearch() { @@ -650,12 +671,23 @@ var popuData = top.dialog.dialogData.popuData; $('#custodian').val(popuData.name); $('#custodianDocumentId').val('b7d74045-d984-4822-b0f3-711b15b933ca'); + $('#custodianDocumentName').val('居民身份证'); $('#custodianDocumentNum').val(popuData.idcard); $('#custodianPhone').val(popuData.phone); + $('#custodianPopulationId').val(popuData.populationInfoId); } }); } + function clearCustodian() { + $('#custodian').val(''); + $('#custodianDocumentId').val(''); + $('#custodianDocumentName').val(''); + $('#custodianDocumentNum').val(''); + $('#custodianPhone').val(''); + $('#custodianPopulationId').val(''); + } + // 初始化单元/列数下拉列表 function initAffiliationUnit(num) { var html = ''; @@ -946,10 +978,19 @@ homeownerSearch(); }); + // 清除数据 + $('.clearOwner').on('click', function() { + clearOwner(); + }); + $('.custodianSearch').on('click', function() { custodianSearch(); }); + $('.clearCustodian').on('click', function() { + clearCustodian(); + }); + $('.cohabitSearch').on('click', function() { cohabitSearch(); }); diff --git a/src/main/resources/templates/house/update.html b/src/main/resources/templates/house/update.html index b670d49..0671b0b 100644 --- a/src/main/resources/templates/house/update.html +++ b/src/main/resources/templates/house/update.html @@ -280,11 +280,16 @@
房主
-
+
+
+ +
@@ -327,11 +332,16 @@
托管人
-
+
+
+ +
@@ -521,19 +531,32 @@ var popuData = top.dialog.dialogData.popuData; $('#homeowner').val(popuData.name); $('#documentId').val('b7d74045-d984-4822-b0f3-711b15b933ca'); + $('#documentName').val('居民身份证'); $('#documentNum').val(popuData.idcard); $('#phone').val(popuData.phone); + $('#ownerPopulationId').val(popuData.populationInfoId); var selectObj = {}; selectObj['homeowner'] = popuData.name; selectObj['documentId'] = 'b7d74045-d984-4822-b0f3-711b15b933ca'; + selectObj['documentName'] = '居民身份证'; selectObj['documentNum'] = popuData.idcard; selectObj['phone'] = popuData.phone; + selectObj['ownerPopulationId'] = popuData.populationInfoId; form.val('dataForm', selectObj); } }); } + function clearOwner() { + $('#homeowner').val(''); + $('#documentId').val(''); + $('#documentName').val(''); + $('#documentNum').val(''); + $('#phone').val(''); + $('#ownerPopulationId').val(''); + } + // 托管人搜索 function custodianSearch() { top.dialog.open({ @@ -545,12 +568,32 @@ var popuData = top.dialog.dialogData.popuData; $('#custodian').val(popuData.name); $('#custodianDocumentId').val('b7d74045-d984-4822-b0f3-711b15b933ca'); + $('#custodianDocumentName').val('居民身份证'); $('#custodianDocumentNum').val(popuData.idcard); $('#custodianPhone').val(popuData.phone); + $('#custodianPopulationId').val(popuData.populationInfoId); + + var selectObj = {}; + selectObj['custodian'] = popuData.name; + selectObj['custodianDocumentId'] = 'b7d74045-d984-4822-b0f3-711b15b933ca'; + selectObj['custodianDocumentName'] = '居民身份证'; + selectObj['custodianDocumentNum'] = popuData.idcard; + selectObj['custodianPhone'] = popuData.phone; + selectObj['custodianPopulationId'] = popuData.populationInfoId; + form.val('dataForm', selectObj); } }); } + function clearCustodian() { + $('#custodian').val(''); + $('#custodianDocumentId').val(''); + $('#custodianDocumentName').val(''); + $('#custodianDocumentNum').val(''); + $('#custodianPhone').val(''); + $('#custodianPopulationId').val(''); + } + // 初始化单元/列数下拉列表 function initAffiliationUnit(num, selectValue) { var html = ''; @@ -992,10 +1035,19 @@ homeownerSearch(); }); + // 清除数据 + $('.clearOwner').on('click', function() { + clearOwner(); + }); + $('.custodianSearch').on('click', function() { custodianSearch(); }); + $('.clearCustodian').on('click', function() { + clearCustodian(); + }); + $('.cohabitSearch').on('click', function() { cohabitSearch(); });