以人找房功能bug修改

This commit is contained in:
Renpc-kilig 2021-10-20 20:47:28 +08:00
parent ec2e07c6ba
commit 07cf27da63
3 changed files with 8 additions and 7 deletions

View File

@ -117,7 +117,7 @@
return rowData;
}
},
{field: 'houseStatus', fixed: 'right', width: 150, title: '租房记录', align:'center',
{field: 'rentalHis', fixed: 'right', width: 150, title: '租房记录', align:'center',
templet: function(row) {
var rowData = '<a class="layui-btn layui-btn-xs" lay-event="rentalHis">租住记录</a>';
return rowData;
@ -222,7 +222,7 @@
// 房屋租住记录
function rentalHis(data) {
top.dialog.open({
url: top.restAjax.path('route/houseuser/list?buildingHouseId={buildingHouseId}', [data.buildingHouseId]),
url: top.restAjax.path('route/houseuser/list?buildingHouseId={buildingHouseId}&keywords={keywords}', [data.buildingHouseId, keywords]),
title: "房屋租住记录",
width: '80%',
height: '80%',

View File

@ -37,7 +37,7 @@
<div class="layui-form-item">
<label class="layui-form-label" style="width: 145px;">房屋编号(名称)</label>
<div class="layui-input-block" style="margin-left: 145px;">
<input type="text" id="houseNumber" name="houseNumber" class="layui-input" value="" placeholder="请输入房屋编号(名称)" maxlength="255" readonly>
<input type="text" id="houseNumber" name="houseNumber" class="layui-input" value="" placeholder="请输入房屋编号(名称)" maxlength="255">
</div>
</div>
<div class="layui-form-item">

View File

@ -64,15 +64,16 @@
var admin = layui.admin;
var laydate = layui.laydate;
var resizeTimeout = null;
var tableUrl = 'api/houseuser/listpage?buildingHouseId={buildingHouseId}';
var tableUrl = 'api/houseuser/listpage?buildingHouseId={buildingHouseId}&keywords={keywords}';
var buildingHouseId = top.restAjax.params(window.location.href).buildingHouseId;
var keywords = top.restAjax.params(window.location.href).keywords;
// 初始化表格
function initTable() {
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, [buildingHouseId]),
url: top.restAjax.path(tableUrl, [buildingHouseId, keywords]),
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 90,
limit: 20,
@ -162,7 +163,7 @@
// 重载表格
function reloadTable(currentPage) {
table.reload('dataTable', {
url: top.restAjax.path(tableUrl, []),
url: top.restAjax.path(tableUrl, [buildingHouseId, keywords]),
where: {
keywords: $('#keywords').val(),
startTime: $('#startTime').val(),
@ -234,7 +235,7 @@
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/houseuser/save?buildingHouseId={buildingHouseId}', [buildingHouseId]),
content: top.restAjax.path('route/houseuser/save?buildingHouseId={buildingHouseId}&keywords={keywords}', [buildingHouseId, keywords]),
end: function() {
reloadTable();
}