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