人口基本信息- 修改人员选择页面

This commit is contained in:
java_cuibaocheng@163.com 2023-12-01 17:41:24 +08:00
parent 1f2e5853af
commit 2d2b7ea14f
4 changed files with 58 additions and 49 deletions

View File

@ -1,6 +1,7 @@
package com.cm.population.utils;
import com.cm.common.utils.DateUtil;
import com.cm.common.utils.UUIDUtil;
import java.text.ParseException;
import java.text.SimpleDateFormat;

View File

@ -550,22 +550,25 @@
title: '人员选择',
width: '80%',
height: '80%',
onClose: function(data) {
var list = top.dialog.dialogData.populationinfoQueryMultiple;
// 判断是否已选择
for(var i = 0 ; i < list.length ; i++){
var exists = false;
for(var j = 0 ; j < cohabitArray.length ; j++) {
if(list[i].populationInfoId == cohabitArray[j].populationInfoId) {
exists = true;
break;
onClose: function(data1) {
var data = window.sessionStorage.getItem("tempQueryMultiplePopulationInfo");
if(data != null && data != undefined && data != 'null') {
var list = eval("(" + data + ")");
// 判断是否已选择
for(var i = 0 ; i < list.length ; i++){
var exists = false;
for(var j = 0 ; j < cohabitArray.length ; j++) {
if(list[i].populationInfoId == cohabitArray[j].populationInfoId) {
exists = true;
break;
}
}
if (!exists) {
cohabitArray.push({populationId: "", populationInfoId: list[i].populationInfoId, cardNum: list[i].idcard, phone: list[i].phone, name: list[i].name, outHouse: "0"});
}
}
if (!exists) {
cohabitArray.push({populationId: "", populationInfoId: list[i].populationInfoId, cardNum: list[i].idcard, phone: list[i].phone, name: list[i].name, outHouse: "0"});
}
reloadCohabit();
}
reloadCohabit();
}
});
}

View File

@ -800,22 +800,25 @@
title: '人员选择',
width: '80%',
height: '80%',
onClose: function(data) {
var list = top.dialog.dialogData.populationinfoQueryMultiple;
// 判断是否已选择
for(var i = 0 ; i < list.length ; i++){
var exists = false;
for(var j = 0 ; j < cohabitArray.length ; j++) {
if(list[i].populationInfoId == cohabitArray[j].populationInfoId) {
exists = true;
break;
onClose: function(data1) {
var data = window.sessionStorage.getItem("tempQueryMultiplePopulationInfo");
if(data != null && data != undefined && data != 'null') {
var list = eval("(" + data + ")");
// 判断是否已选择
for(var i = 0 ; i < list.length ; i++){
var exists = false;
for(var j = 0 ; j < cohabitArray.length ; j++) {
if(list[i].populationInfoId == cohabitArray[j].populationInfoId) {
exists = true;
break;
}
}
if (!exists) {
cohabitArray.push({populationId: "", populationInfoId: list[i].populationInfoId, cardNum: list[i].idcard, phone: list[i].phone, name: list[i].name, outHouse: "0"});
}
}
if (!exists) {
cohabitArray.push({populationId: "", populationInfoId: list[i].populationInfoId, cardNum: list[i].idcard, phone: list[i].phone, name: list[i].name, outHouse: "0"});
}
reloadCohabit();
}
reloadCohabit();
}
});
}

View File

@ -223,33 +223,35 @@
title: '人员选择',
width: '80%',
height: '80%',
onClose: function(data) {
onClose: function(data1) {
var cohabitArray = new Array();
var list = top.dialog.dialogData.populationinfoQueryMultiple;
// 判断是否已选择
for(var i = 0 ; i < list.length ; i++){
var exists = false;
for(var j = 0 ; j < cohabitArray.length ; j++) {
if(list[i].populationInfoId == cohabitArray[j].populationInfoId) {
exists = true;
break;
var data = window.sessionStorage.getItem("tempQueryMultiplePopulationInfo");
if(data != null && data != undefined && data != 'null') {
var list = eval("(" + data + ")");
// 判断是否已选择
for(var i = 0 ; i < list.length ; i++){
var exists = false;
for(var j = 0 ; j < cohabitArray.length ; j++) {
if(list[i].populationInfoId == cohabitArray[j].populationInfoId) {
exists = true;
break;
}
}
cohabitArray.push({populationId: "", populationInfoId: list[i].populationInfoId, cardNum: list[i].idcard, phone: list[i].phone, name: list[i].name, outHouse: "0"});
}
cohabitArray.push({populationId: "", populationInfoId: list[i].populationInfoId, cardNum: list[i].idcard, phone: list[i].phone, name: list[i].name, outHouse: "0"});
// 保存
var loadLayerIndex;
top.restAjax.post(top.restAjax.path('api/population/save-all/{houseId}', [houseId]), cohabitArray, null, function(code, data) {
// 刷新列表
window.location.reload();
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
// 保存
var loadLayerIndex;
top.restAjax.post(top.restAjax.path('api/population/save-all/{houseId}', [houseId]), cohabitArray, null, function(code, data) {
// 刷新列表
window.location.reload();
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
});
} else if(layEvent === 'updateEvent') {