Merge branch 'master' of e.coding.net:tsteam/urban-governance/system-city
This commit is contained in:
commit
698971901f
@ -40,6 +40,10 @@ public class BuildingHouseDTO {
|
||||
private String longitude;
|
||||
@ApiModelProperty(name = "latitude", value = "纬度")
|
||||
private String latitude;
|
||||
@ApiModelProperty(name = "rentalTime", value = "出租时间")
|
||||
private String rentalTime;
|
||||
@ApiModelProperty(name = "countMember", value = "家庭成员数量")
|
||||
private String countMember;
|
||||
|
||||
public String getBuildingHouseId() {
|
||||
return buildingHouseId == null ? "" : buildingHouseId.trim();
|
||||
@ -144,4 +148,20 @@ public class BuildingHouseDTO {
|
||||
public void setLatitude(String latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public String getRentalTime() {
|
||||
return rentalTime;
|
||||
}
|
||||
|
||||
public void setRentalTime(String rentalTime) {
|
||||
this.rentalTime = rentalTime;
|
||||
}
|
||||
|
||||
public String getCountMember() {
|
||||
return countMember;
|
||||
}
|
||||
|
||||
public void setCountMember(String countMember) {
|
||||
this.countMember = countMember;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ public class BuildingHouseUserDTO {
|
||||
private String buildingHouseId;
|
||||
@ApiModelProperty(name = "userType", value = "人员类型")
|
||||
private String userType;
|
||||
@ApiModelProperty(name = "relationship", value = "与户主关系")
|
||||
private String relationship;
|
||||
|
||||
public String getBuildingHouseUserId() {
|
||||
return buildingHouseUserId == null ? "" : buildingHouseUserId.trim();
|
||||
@ -104,4 +106,12 @@ public class BuildingHouseUserDTO {
|
||||
public void setUserType(String userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public String getRelationship() {
|
||||
return relationship;
|
||||
}
|
||||
|
||||
public void setRelationship(String relationship) {
|
||||
this.relationship = relationship;
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ public class BuildingHouseVO {
|
||||
private String longitude;
|
||||
@ApiModelProperty(name = "latitude", value = "纬度")
|
||||
private String latitude;
|
||||
@ApiModelProperty(name = "rentalTime", value = "出租时间")
|
||||
private String rentalTime;
|
||||
|
||||
public String getCityBuildingId() {
|
||||
return cityBuildingId == null ? "" : cityBuildingId.trim();
|
||||
@ -156,4 +158,12 @@ public class BuildingHouseVO {
|
||||
public void setLatitude(String latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public String getRentalTime() {
|
||||
return rentalTime;
|
||||
}
|
||||
|
||||
public void setRentalTime(String rentalTime) {
|
||||
this.rentalTime = rentalTime;
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,8 @@ public class BuildingHouseUserVO {
|
||||
private String buildingHouseId;
|
||||
@ApiModelProperty(name = "userType", value = "人员类型")
|
||||
private String userType;
|
||||
@ApiModelProperty(name = "relationship", value = "与户主关系")
|
||||
private String relationship;
|
||||
|
||||
public String getCardType() {
|
||||
return cardType == null ? "" : cardType.trim();
|
||||
@ -88,10 +90,18 @@ public class BuildingHouseUserVO {
|
||||
}
|
||||
|
||||
public String getUserType() {
|
||||
return userType;
|
||||
return userType == null ? "" : userType.trim();
|
||||
}
|
||||
|
||||
public void setUserType(String userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public String getRelationship() {
|
||||
return relationship;
|
||||
}
|
||||
|
||||
public void setRelationship(String relationship) {
|
||||
this.relationship = relationship;
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import com.cm.systemcity.dao.buildinghouse.IBuildingHouseDao;
|
||||
import com.cm.systemcity.pojo.dtos.buildinghouse.BuildingHouseDTO;
|
||||
import com.cm.systemcity.pojo.vos.buildinghouse.BuildingHouseVO;
|
||||
import com.cm.systemcity.service.buildinghouse.IBuildingHouseService;
|
||||
import com.cm.systemcity.service.buildinghouseuser.IBuildingHouseUserService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -28,6 +29,8 @@ public class BuildingHouseServiceImpl extends AbstractService implements IBuildi
|
||||
|
||||
@Autowired
|
||||
private IBuildingHouseDao buildingHouseDao;
|
||||
@Autowired
|
||||
private IBuildingHouseUserService buildingHouseUserService;
|
||||
|
||||
@Override
|
||||
public void save(BuildingHouseVO buildingHouseVO) throws Exception {
|
||||
@ -113,7 +116,15 @@ public class BuildingHouseServiceImpl extends AbstractService implements IBuildi
|
||||
|
||||
@Override
|
||||
public List<BuildingHouseDTO> list(Map<String, Object> params) {
|
||||
return buildingHouseDao.list(params);
|
||||
List<BuildingHouseDTO> list = buildingHouseDao.list(params);
|
||||
if(null != list && list.size() > 0) {
|
||||
for(BuildingHouseDTO buildingHouseDTO: list) {
|
||||
params.put("buildingHouseId", buildingHouseDTO.getBuildingHouseId());
|
||||
Integer count = buildingHouseUserService.count(params);
|
||||
buildingHouseDTO.setCountMember(count.toString());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,6 +16,7 @@
|
||||
<result column="owner_phone" property="ownerPhone"/>
|
||||
<result column="longitude" property="longitude"/>
|
||||
<result column="latitude" property="latitude"/>
|
||||
<result column="rental_time" property="rentalTime"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 新增房屋管理表 -->
|
||||
@ -34,6 +35,7 @@
|
||||
owner_phone,
|
||||
longitude,
|
||||
latitude,
|
||||
rental_time,
|
||||
creator,
|
||||
gmt_create,
|
||||
modifier,
|
||||
@ -53,6 +55,7 @@
|
||||
#{ownerPhone},
|
||||
#{longitude},
|
||||
#{latitude},
|
||||
#{rentalTime},
|
||||
#{creator},
|
||||
#{gmtCreate},
|
||||
#{modifier},
|
||||
@ -138,6 +141,9 @@
|
||||
<if test="latitude != null and latitude != ''">
|
||||
latitude = #{latitude},
|
||||
</if>
|
||||
<if test="rentalTime != null and rentalTime != ''">
|
||||
rental_time = #{rentalTime},
|
||||
</if>
|
||||
<if test="newHouseNumber != null and newHouseNumber != ''">
|
||||
<if test="oldHouseNumber != null and oldHouseNumber != ''">
|
||||
house_number = replace(house_number, #{oldHouseNumber}, #{newHouseNumber}),
|
||||
@ -174,6 +180,7 @@
|
||||
t1.owner_phone,
|
||||
t1.longitude,
|
||||
t1.latitude,
|
||||
t1.rental_time,
|
||||
t1.building_house_id
|
||||
FROM
|
||||
city_building_house t1
|
||||
@ -197,6 +204,7 @@
|
||||
<!-- 房屋管理表列表 -->
|
||||
<select id="list" parameterType="map" resultMap="buildingHouseDTO">
|
||||
SELECT
|
||||
DISTINCT
|
||||
t1.building_house_id,
|
||||
t1.city_building_id,
|
||||
t1.city_building_name,
|
||||
@ -210,6 +218,7 @@
|
||||
t1.owner_phone,
|
||||
t1.longitude,
|
||||
t1.latitude,
|
||||
t1.rental_time,
|
||||
1
|
||||
FROM
|
||||
city_building_house t1
|
||||
|
@ -12,6 +12,7 @@
|
||||
<result column="phone" property="phone"/>
|
||||
<result column="building_house_id" property="buildingHouseId"/>
|
||||
<result column="user_type" property="userType"/>
|
||||
<result column="relationship" property="relationship"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 新增人房绑定表 -->
|
||||
@ -26,6 +27,7 @@
|
||||
phone,
|
||||
building_house_id,
|
||||
user_type,
|
||||
relationship,
|
||||
creator,
|
||||
gmt_create,
|
||||
modifier,
|
||||
@ -41,6 +43,7 @@
|
||||
#{phone},
|
||||
#{buildingHouseId},
|
||||
#{userType},
|
||||
#{relationship},
|
||||
#{creator},
|
||||
#{gmtCreate},
|
||||
#{modifier},
|
||||
@ -115,6 +118,9 @@
|
||||
</if>
|
||||
<if test="userType != null and userType != ''">
|
||||
user_type = #{userType},
|
||||
</if>
|
||||
<if test="relationship != null and relationship != ''">
|
||||
relationship = #{relationship},
|
||||
</if>
|
||||
gmt_modified = #{gmtModified},
|
||||
modifier = #{modifier},
|
||||
@ -134,6 +140,7 @@
|
||||
t1.phone,
|
||||
t1.building_house_id,
|
||||
t1.user_type,
|
||||
t1.relationship,
|
||||
t1.building_house_user_id
|
||||
FROM
|
||||
city_building_house_user t1
|
||||
@ -164,6 +171,7 @@
|
||||
t1.sex,
|
||||
t1.phone,
|
||||
t1.user_type,
|
||||
t1.relationship,
|
||||
t1.building_house_id,
|
||||
1
|
||||
FROM
|
||||
@ -172,7 +180,6 @@
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
@ -212,6 +219,9 @@
|
||||
city_building_house_user t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="buildingHouseId != null and buildingHouseId != ''">
|
||||
AND t1.building_house_id = #{buildingHouseId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -253,6 +253,16 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'countMember', event:'countMember', width: 180, title: '家庭成员数量', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
rowData = '<span class="layui-badge layui-bg-blue" id="countMemberSpan">'+rowData+'</span>';
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'cityBuildingName', width: 180, title: '楼宇名称', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
@ -290,24 +300,6 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'dataType', width: 180, title: '数据生成方式', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
if('1' == rowData) {
|
||||
rowData = '自动生成';
|
||||
}
|
||||
if('2' == rowData) {
|
||||
rowData = '手动录入';
|
||||
}
|
||||
if('3' == rowData) {
|
||||
rowData = '批量导入';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'ownerName', width: 180, title: '房主姓名', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
@ -335,18 +327,18 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'houseStatus', fixed: 'right', width: 150, title: '租房记录', align:'center',
|
||||
{field: 'houseStatus', 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;
|
||||
}
|
||||
},
|
||||
{field: 'addUser', fixed: 'right', width: 150, title: '操作', align:'center',
|
||||
/*{field: 'addUser', fixed: 'right', width: 150, title: '操作', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = '<a class="layui-btn layui-btn-xs" lay-event="addUser">绑定人员</a>';
|
||||
return rowData;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
@ -360,6 +352,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
table.reload('dataTable', {
|
||||
@ -415,8 +408,8 @@
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/buildinghouseuser/list.html?buildingHouseId={buildingHouseId}', [data.buildingHouseId]),
|
||||
title: "房屋租住记录",
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
width: '98%',
|
||||
height: '98%',
|
||||
onClose: function() {
|
||||
reloadTable();
|
||||
}
|
||||
@ -514,6 +507,18 @@
|
||||
}
|
||||
});
|
||||
|
||||
function countMemberFun(data) {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/buildinghouseuser/list.html?buildingHouseId={buildingHouseId}', [data.buildingHouseId]),
|
||||
title: "房屋租住记录",
|
||||
width: '98%',
|
||||
height: '98%',
|
||||
onClose: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//监听行单击事件
|
||||
table.on('tool(dataTable)', function(obj){
|
||||
var data = obj.data;
|
||||
@ -522,6 +527,8 @@
|
||||
}else if('addUser' == obj.event) {
|
||||
console.log(data)
|
||||
addUser(data);
|
||||
}else if(obj.event === 'countMember'){
|
||||
countMemberFun(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -35,39 +35,50 @@
|
||||
<input type="text" id="houseNumber" name="houseNumber" class="layui-input" value="" placeholder="请输入房屋编号(名称)" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">小区名称<span style="color: red;vertical-align: middle;">*</span></label>
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">小区名称<span style="color: red;vertical-align: middle;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="districtName" name="districtName" class="layui-input" value="" placeholder="请输入小区名称" maxlength="255">
|
||||
<input type="hidden" id="districtId" name="districtId" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">房屋状态<span style="color: red;vertical-align: middle;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<select name="houseStatus" id="houseStatus" lay-filter="houseStatus" lay-verify="required">
|
||||
<option value="自住房">自住房</option>
|
||||
<option value="出租房">出租房</option>
|
||||
<option value="闲置">闲置</option>
|
||||
<option value="待查">待查</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" id="rentalTimeDiv" style="display: none;">
|
||||
<label class="layui-form-label">出租时间</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="districtName" name="districtName" class="layui-input" value="" placeholder="请输入小区名称" maxlength="255">
|
||||
<input type="hidden" id="districtId" name="districtId" />
|
||||
<input type="text" class="layui-input" readonly name="rentalTime" id="rentalTime" lay-filter="rentalTime" placeholder="出租时间">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">房屋状态<span style="color: red;vertical-align: middle;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<select name="houseStatus" id="houseStatus" lay-verify="required">
|
||||
<option value="自住房">自住房</option>
|
||||
<option value="出租房">出租房</option>
|
||||
<option value="闲置">闲置</option>
|
||||
</select>
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg4">
|
||||
<label class="layui-form-label">房主姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="ownerName" name="ownerName" class="layui-input" value="" placeholder="请输入房主姓名" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">房主姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="ownerName" name="ownerName" class="layui-input" value="" placeholder="请输入房主姓名" maxlength="255">
|
||||
<div class="layui-col-lg4">
|
||||
<label class="layui-form-label" style="width: 120px;">房主身份证号</label>
|
||||
<div class="layui-input-block" style="margin-left: 120px;">
|
||||
<input type="text" id="ownerCard" name="ownerCard" class="layui-input" value="" placeholder="请输入房主身份证号" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 120px;">房主身份证号</label>
|
||||
<div class="layui-input-block" style="margin-left: 120px;">
|
||||
<input type="text" id="ownerCard" name="ownerCard" class="layui-input" value="" placeholder="请输入房主身份证号" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 120px;">房主联系方式</label>
|
||||
<div class="layui-input-block" style="margin-left: 120px;">
|
||||
<input type="text" id="ownerPhone" name="ownerPhone" class="layui-input" value="" placeholder="请输入房主联系方式" maxlength="11">
|
||||
<div class="layui-col-lg4">
|
||||
<label class="layui-form-label" style="width: 120px;">房主联系方式</label>
|
||||
<div class="layui-input-block" style="margin-left: 120px;">
|
||||
<input type="text" id="ownerPhone" name="ownerPhone" class="layui-input" value="" placeholder="请输入房主联系方式" maxlength="11">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row">
|
||||
@ -121,6 +132,15 @@
|
||||
var viewerObj = {};
|
||||
var selectedCommunities = [];
|
||||
|
||||
form.on('select(houseStatus)', function(data){
|
||||
if('出租房' == data.value) {
|
||||
$('#rentalTimeDiv').show();
|
||||
initDate();
|
||||
}else {
|
||||
$('#rentalTimeDiv').hide();
|
||||
}
|
||||
})
|
||||
|
||||
function initMap() {
|
||||
map = new BMap.Map("mapContainer", {enableMapClick: false,});
|
||||
var point = new BMap.Point('109.85017859252311', '40.66017700460503');
|
||||
@ -197,59 +217,16 @@
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
function initDate() {
|
||||
laydate.render({
|
||||
elem: '#rentalTime',
|
||||
format: 'yyyy-MM-dd'
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
callback(fileName, []);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
if(callback) {
|
||||
callback(fileName, data);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化视频
|
||||
function initVideo(fileName, data) {
|
||||
for(var i = 0, item; item = data[i++];) {
|
||||
var player = new ckplayer({
|
||||
container: '#'+ fileName + i,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
video: {
|
||||
file: 'route/file/download/true/'+ item.fileId,
|
||||
type: 'video/mp4'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
initDate();
|
||||
}
|
||||
initData();
|
||||
|
||||
@ -285,10 +262,6 @@
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
@ -35,39 +35,56 @@
|
||||
<input type="text" id="houseNumber" name="houseNumber" class="layui-input" value="" placeholder="请输入房屋编号(名称)" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">小区名称<span style="color: red;vertical-align: middle;">*</span></label>
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">小区名称<span style="color: red;vertical-align: middle;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="districtName" name="districtName" class="layui-input" value="" placeholder="请输入小区名称" maxlength="255">
|
||||
<input type="hidden" id="districtId" name="districtId" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">房屋状态<span style="color: red;vertical-align: middle;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<select name="houseStatus" id="houseStatus" lay-filter="houseStatus" lay-verify="required">
|
||||
<option value="自住房">自住房</option>
|
||||
<option value="出租房">出租房</option>
|
||||
<option value="闲置">闲置</option>
|
||||
<option value="待查">待查</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" id="rentalTimeDiv" style="display: none;">
|
||||
<label class="layui-form-label">出租时间</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="districtName" name="districtName" class="layui-input" value="" placeholder="请输入小区名称" maxlength="255">
|
||||
<input type="hidden" id="districtId" name="districtId" />
|
||||
<input type="text" class="layui-input" readonly name="rentalTime" id="rentalTime" lay-filter="rentalTime" placeholder="出租时间">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg4">
|
||||
<label class="layui-form-label">房主姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="ownerName" name="ownerName" class="layui-input" value="" placeholder="请输入房主姓名" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg4">
|
||||
<label class="layui-form-label" style="width: 120px;">房主身份证号</label>
|
||||
<div class="layui-input-block" style="margin-left: 120px;">
|
||||
<input type="text" id="ownerCard" name="ownerCard" class="layui-input" value="" placeholder="请输入房主身份证号" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg4">
|
||||
<label class="layui-form-label" style="width: 120px;">房主联系方式</label>
|
||||
<div class="layui-input-block" style="margin-left: 120px;">
|
||||
<input type="text" id="ownerPhone" name="ownerPhone" class="layui-input" value="" placeholder="请输入房主联系方式" maxlength="11">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">房屋状态<span style="color: red;vertical-align: middle;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<select name="houseStatus" id="houseStatus" lay-verify="required">
|
||||
<option value="自住房">自住房</option>
|
||||
<option value="出租房">出租房</option>
|
||||
<option value="闲置">闲置</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">房主姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="ownerName" name="ownerName" class="layui-input" value="" placeholder="请输入房主姓名" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 120px;">房主身份证号</label>
|
||||
<div class="layui-input-block" style="margin-left: 120px;">
|
||||
<input type="text" id="ownerCard" name="ownerCard" class="layui-input" value="" placeholder="请输入房主身份证号" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 120px;">房主联系方式</label>
|
||||
<div class="layui-input-block" style="margin-left: 120px;">
|
||||
<input type="text" id="ownerPhone" name="ownerPhone" class="layui-input" value="" placeholder="请输入房主联系方式" maxlength="11">
|
||||
<label class="layui-form-label" style="width: 160px;">家庭成员数量<span class="layui-badge layui-bg-blue" id="countMemberSpan">0</span></label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<input type="text" id="countMember" name="countMember" class="layui-input" value="" readonly placeholder="点击填写家庭成员" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row">
|
||||
@ -123,6 +140,54 @@
|
||||
var viewerObj = {};
|
||||
var selectedCommunities = [];
|
||||
|
||||
// 点击小区名称选择输入框,弹出层方法
|
||||
$(document).on('click', '#countMember', function() {
|
||||
rentalHis();
|
||||
});
|
||||
|
||||
function rentalHis(data) {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/buildinghouseuser/list.html?buildingHouseId={buildingHouseId}', [buildingHouseId]),
|
||||
title: "房屋租住记录",
|
||||
width: '98%',
|
||||
height: '98%',
|
||||
onClose: function() {
|
||||
getUserCount();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getUserCount() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/buildinghouseuser/count?buildingHouseId={buildingHouseId}', [buildingHouseId]), {}, null, function(code, data) {
|
||||
console.log(data)
|
||||
$('#countMemberSpan').html(data.data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
|
||||
form.on('select(houseStatus)', function(data){
|
||||
if('出租房' == data.value) {
|
||||
$('#rentalTimeDiv').show();
|
||||
initDate();
|
||||
}else {
|
||||
$('#rentalTimeDiv').hide();
|
||||
}
|
||||
})
|
||||
|
||||
function initDate(value) {
|
||||
laydate.render({
|
||||
elem: '#rentalTime',
|
||||
format: 'yyyy-MM-dd',
|
||||
value: value
|
||||
});
|
||||
}
|
||||
|
||||
function initMap(longitude,latitude) {
|
||||
map = new BMap.Map("mapContainer", {enableMapClick: false,});
|
||||
var point = new BMap.Point(longitude, latitude);
|
||||
@ -211,15 +276,6 @@
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
@ -232,8 +288,13 @@
|
||||
id:data.districtId,
|
||||
name:data.districtName
|
||||
});
|
||||
getUserCount();
|
||||
initMap(dataFormData['longitude'],dataFormData['latitude']);
|
||||
readonlyFun(data.dataType);
|
||||
if(data.houseStatus == '出租房') {
|
||||
$('#rentalTimeDiv').show();
|
||||
initDate(data.houseStatus)
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
}, function(code, data) {
|
||||
@ -278,10 +339,6 @@
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
@ -31,6 +31,20 @@
|
||||
</button>
|
||||
</div>-->
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
<!-- 表头按钮组 -->
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
||||
<i class="fa fa-lg fa-plus"></i> 新增
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||
<i class="fa fa-lg fa-trash"></i> 删除
|
||||
</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -59,6 +73,7 @@
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
toolbar: '#headerToolBar',
|
||||
url: top.restAjax.path(tableUrl, [buildingHouseId]),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 90,
|
||||
@ -70,6 +85,7 @@
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'name', width: 180, title: '姓名', align:'center',
|
||||
templet: function(row) {
|
||||
@ -98,15 +114,6 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'cardTypeName', width: 180, title: '证件类型名称', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'cardNumber', width: 180, title: '证件号码', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
@ -115,7 +122,16 @@
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
}
|
||||
},
|
||||
{field: 'relationship', width: 180, title: '与户主关系', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
@ -132,7 +148,7 @@
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
table.reload('dataTable', {
|
||||
url: top.restAjax.path(tableUrl, []),
|
||||
url: top.restAjax.path(tableUrl, [buildingHouseId]),
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
@ -204,7 +220,7 @@
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/buildinghouseuser/save.html', []),
|
||||
content: top.restAjax.path('route/buildinghouseuser/save.html?buildingHouseId={buildingHouseId}', [buildingHouseId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
|
@ -22,46 +22,85 @@
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item" style="display: none;">
|
||||
<label class="layui-form-label">证件类型ID</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="cardType" name="cardType" class="layui-input" value="" placeholder="请输入证件类型ID" maxlength="36">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item" style="display: none;">
|
||||
<label class="layui-form-label">证件类型名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="cardTypeName" name="cardTypeName" class="layui-input" value="" placeholder="请输入证件类型名称" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">证件号码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="cardNumber" name="cardNumber" class="layui-input" value="" placeholder="请输入证件号码" maxlength="255">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">身份证</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="idCardNumber" name="idCardNumber" style="width: 230px;" class="layui-input" value="" placeholder="请输入公民身份证进行检索">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3" style="margin-left: 50px;">
|
||||
<div style="margin: 4px 4px;">
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="name" name="name" class="layui-input" value="" placeholder="请输入姓名" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">性别</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="sex" name="sex" class="layui-input" value="" placeholder="请输入性别" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">证件号码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="cardNumber" name="cardNumber" class="layui-input" value="" placeholder="请输入证件号码" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">联系方式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系方式" maxlength="11">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<label class="layui-form-label">与户主关系</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="name" name="name" class="layui-input" value="" placeholder="请输入姓名" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">性别</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="sex" name="sex" class="layui-input" value="" placeholder="请输入性别" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">联系方式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系方式" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">房屋ID</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="buildingHouseId" name="buildingHouseId" class="layui-input" value="" placeholder="请输入房屋ID" maxlength="36">
|
||||
<select name="relationship" id="relationship" lay-filter="relationship">
|
||||
<option value="">请选择与户主关系</option>
|
||||
<option value="户主">户主</option>
|
||||
<option value="配偶">配偶</option>
|
||||
<option value="子女">子女</option>
|
||||
<option value="儿媳">儿媳</option>
|
||||
<option value="女婿">女婿</option>
|
||||
<option value="孙女">孙女</option>
|
||||
<option value="孙子">孙子</option>
|
||||
<option value="父母">父母</option>
|
||||
<option value="祖父母">祖父母</option>
|
||||
<option value="外祖父母">外祖父母</option>
|
||||
<option value="兄弟">兄弟</option>
|
||||
<option value="姐妹">姐妹</option>
|
||||
<option value="外孙">外孙</option>
|
||||
<option value="外孙女">外孙女</option>
|
||||
<option value="旁系亲属">旁系亲属</option>
|
||||
<option value="其他亲属">其他亲属</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
@ -93,62 +132,43 @@
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
var buildingHouseId = top.restAjax.params(window.location.href).buildingHouseId;
|
||||
|
||||
$(document).on('click','#search',function(){
|
||||
queryBasePopulationInfo($('#idCardNumber').val());
|
||||
});
|
||||
|
||||
function queryBasePopulationInfo(idCardNumber){
|
||||
if(!idCardNumber){
|
||||
top.dialog.msg('请输入身份证号进行查询');
|
||||
return false;
|
||||
}
|
||||
var loadIndex = layer.load(0);
|
||||
top.restAjax.get(top.restAjax.path('api/buildinghouseuser/userMsg/{idCard}', [idCardNumber]),
|
||||
{}, null, function(code, data) {
|
||||
console.log(data.data);
|
||||
if(!data.data) {
|
||||
$('#cardNumber').val(idCardNumber);
|
||||
return false;
|
||||
}else {
|
||||
$('#name').val(data.data.name);
|
||||
$('#sex').val(data.data.sex);
|
||||
$('#phone').val(data.data.phone);
|
||||
$('#cardNumber').val(idCardNumber);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
},function(){
|
||||
|
||||
},function () {
|
||||
layer.close(loadIndex);
|
||||
});
|
||||
}
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
callback(fileName, []);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
if(callback) {
|
||||
callback(fileName, data);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化视频
|
||||
function initVideo(fileName, data) {
|
||||
for(var i = 0, item; item = data[i++];) {
|
||||
var player = new ckplayer({
|
||||
container: '#'+ fileName + i,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
video: {
|
||||
file: 'route/file/download/true/'+ item.fileId,
|
||||
type: 'video/mp4'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
}
|
||||
@ -156,6 +176,7 @@
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
formData.field['buildingHouseId'] = buildingHouseId;
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
@ -186,10 +207,6 @@
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
@ -22,52 +22,91 @@
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item" style="display: none;">
|
||||
<label class="layui-form-label">证件类型ID</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="cardType" name="cardType" class="layui-input" value="" placeholder="请输入证件类型ID" maxlength="36">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item" style="display: none;">
|
||||
<label class="layui-form-label">证件类型名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="cardTypeName" name="cardTypeName" class="layui-input" value="" placeholder="请输入证件类型名称" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">证件号码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="cardNumber" name="cardNumber" class="layui-input" value="" placeholder="请输入证件号码" maxlength="255">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">身份证</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="idCardNumber" name="idCardNumber" style="width: 230px;" class="layui-input" value="" placeholder="请输入公民身份证进行检索">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3" style="margin-left: 50px;">
|
||||
<div style="margin: 4px 4px;">
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="name" name="name" class="layui-input" value="" placeholder="请输入姓名" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">性别</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="sex" name="sex" class="layui-input" value="" placeholder="请输入性别" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">证件号码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="cardNumber" name="cardNumber" class="layui-input" value="" placeholder="请输入证件号码" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">联系方式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系方式" maxlength="11">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<label class="layui-form-label">与户主关系</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="name" name="name" class="layui-input" value="" placeholder="请输入姓名" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">性别</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="sex" name="sex" class="layui-input" value="" placeholder="请输入性别" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">联系方式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系方式" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">房屋ID</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="buildingHouseId" name="buildingHouseId" class="layui-input" value="" placeholder="请输入房屋ID" maxlength="36">
|
||||
<select name="relationship" id="relationship" lay-filter="relationship">
|
||||
<option value="">请选择与户主关系</option>
|
||||
<option value="户主">户主</option>
|
||||
<option value="配偶">配偶</option>
|
||||
<option value="子女">子女</option>
|
||||
<option value="儿媳">儿媳</option>
|
||||
<option value="女婿">女婿</option>
|
||||
<option value="孙女">孙女</option>
|
||||
<option value="孙子">孙子</option>
|
||||
<option value="父母">父母</option>
|
||||
<option value="祖父母">祖父母</option>
|
||||
<option value="外祖父母">外祖父母</option>
|
||||
<option value="兄弟">兄弟</option>
|
||||
<option value="姐妹">姐妹</option>
|
||||
<option value="外孙">外孙</option>
|
||||
<option value="外孙女">外孙女</option>
|
||||
<option value="旁系亲属">旁系亲属</option>
|
||||
<option value="其他亲属">其他亲属</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button>
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -96,61 +135,41 @@
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
|
||||
$(document).on('click','#search',function(){
|
||||
queryBasePopulationInfo($('#idCardNumber').val());
|
||||
});
|
||||
|
||||
function queryBasePopulationInfo(idCardNumber){
|
||||
if(!idCardNumber){
|
||||
top.dialog.msg('请输入身份证号进行查询');
|
||||
return false;
|
||||
}
|
||||
var loadIndex = layer.load(0);
|
||||
top.restAjax.get(top.restAjax.path('api/buildinghouseuser/userMsg/{idCard}', [idCardNumber]),
|
||||
{}, null, function(code, data) {
|
||||
console.log(data.data);
|
||||
if(!data.data) {
|
||||
$('#cardNumber').val(idCardNumber);
|
||||
return false;
|
||||
}else {
|
||||
$('#name').val(data.data.name);
|
||||
$('#sex').val(data.data.sex);
|
||||
$('#phone').val(data.data.phone);
|
||||
$('#cardNumber').val(idCardNumber);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
},function(){
|
||||
|
||||
},function () {
|
||||
layer.close(loadIndex);
|
||||
});
|
||||
}
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
callback(fileName, []);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
if(callback) {
|
||||
callback(fileName, data);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化视频
|
||||
function initVideo(fileName, data) {
|
||||
for(var i = 0, item; item = data[i++];) {
|
||||
var player = new ckplayer({
|
||||
container: '#'+ fileName + i,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
video: {
|
||||
file: 'route/file/download/true/'+ item.fileId,
|
||||
type: 'video/mp4'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
@ -203,10 +222,6 @@
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user