bug修改 --renpc
This commit is contained in:
parent
e4104b95ef
commit
2e893208fb
@ -35,7 +35,7 @@
|
|||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<input type="text" id="idcard" class="layui-input search-item" placeholder="请输入证件号">
|
<input type="text" id="idcard" class="layui-input search-item" placeholder="请输入证件号">
|
||||||
</div>
|
</div>
|
||||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
<button type="button" id="search" class="layui-btn layui-btn-sm layui-btn-disabled" disabled>
|
||||||
<i class="fa fa-lg fa-search"></i> 搜索
|
<i class="fa fa-lg fa-search"></i> 搜索
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -83,6 +83,7 @@
|
|||||||
var resizeTimeout = null;
|
var resizeTimeout = null;
|
||||||
var tableUrl = 'api/populationinfo/listpage';
|
var tableUrl = 'api/populationinfo/listpage';
|
||||||
top.dialog.dialogData.popuData = {};
|
top.dialog.dialogData.popuData = {};
|
||||||
|
var checkData = null;
|
||||||
|
|
||||||
// 初始化证件类型下拉选择
|
// 初始化证件类型下拉选择
|
||||||
function initIdcardTypeSelect() {
|
function initIdcardTypeSelect() {
|
||||||
@ -181,11 +182,16 @@
|
|||||||
'count': data.total,
|
'count': data.total,
|
||||||
'data': data.rows
|
'data': data.rows
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
done: function(res, curr, count){
|
||||||
|
$('#search').removeAttr("disabled");
|
||||||
|
$('#search').removeClass("layui-btn-disabled");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 重载表格
|
// 重载表格
|
||||||
function reloadTable(currentPage) {
|
function reloadTable(currentPage) {
|
||||||
|
checkData = null;
|
||||||
table.reload('dataTable', {
|
table.reload('dataTable', {
|
||||||
url: top.restAjax.path(tableUrl, []),
|
url: top.restAjax.path(tableUrl, []),
|
||||||
where: {
|
where: {
|
||||||
@ -223,13 +229,18 @@
|
|||||||
});
|
});
|
||||||
// 事件 - 搜索
|
// 事件 - 搜索
|
||||||
$(document).on('click', '#search', function() {
|
$(document).on('click', '#search', function() {
|
||||||
|
$(this).attr("disabled", "disabled");
|
||||||
|
$(this).addClass("layui-btn-disabled");
|
||||||
reloadTable(1);
|
reloadTable(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
table.on('radio(dataTable)', function(obj){
|
||||||
|
checkData = obj.data;
|
||||||
|
});
|
||||||
|
|
||||||
// 事件 - 增删改
|
// 事件 - 增删改
|
||||||
table.on('toolbar(dataTable)', function(obj) {
|
table.on('toolbar(dataTable)', function(obj) {
|
||||||
var layEvent = obj.event;
|
var layEvent = obj.event;
|
||||||
var checkStatus = table.checkStatus('dataTable');
|
|
||||||
var checkDatas = checkStatus.data;
|
|
||||||
if(layEvent === 'saveEvent') {
|
if(layEvent === 'saveEvent') {
|
||||||
top.layer.open({
|
top.layer.open({
|
||||||
type: 2,
|
type: 2,
|
||||||
@ -244,11 +255,16 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else if(layEvent === 'determineEvent') {
|
}else if(layEvent === 'determineEvent') {
|
||||||
|
if(!checkData) {
|
||||||
|
top.dialog.msg('必须勾选数据');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// 因为列表是脱敏数据 , 所以需要此处需要再次请求
|
// 因为列表是脱敏数据 , 所以需要此处需要再次请求
|
||||||
var data = checkDatas[0];
|
var data = checkData;
|
||||||
|
console.log(data)
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
top.restAjax.get(top.restAjax.path('api/populationinfo/get/{populationInfoId}', [data.populationInfoId]), {}, null, function(code, data) {
|
top.restAjax.get(top.restAjax.path('api/populationinfo/get/{populationInfoId}', [data.populationInfoId]), {}, null, function(code, data) {
|
||||||
top.dialog.dialogData.popuData = checkDatas[0];
|
top.dialog.dialogData.popuData = checkData;
|
||||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
||||||
parent.layer.close(index);
|
parent.layer.close(index);
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
|
@ -515,6 +515,11 @@
|
|||||||
$('#documentNum').val(popuData.idcard);
|
$('#documentNum').val(popuData.idcard);
|
||||||
$('#phone').val(popuData.phone);
|
$('#phone').val(popuData.phone);
|
||||||
|
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['homeowner'] = popuData.name;
|
||||||
|
selectObj['documentId'] = 'b7d74045-d984-4822-b0f3-711b15b933ca';
|
||||||
|
selectObj['documentNum'] = popuData.idcard;
|
||||||
|
selectObj['phone'] = popuData.phone;
|
||||||
form.val('dataForm', selectObj);
|
form.val('dataForm', selectObj);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user